]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/alsa/alsa-driver_0.9.6-hh4c.bb
82412746dee13bb7291afe82aa3d4407a8e4d4a5
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / alsa / alsa-driver_0.9.6-hh4c.bb
1 DESCRIPTION = "Alsa Drivers"
2 MAINTAINER = "Rene Wagner <rw@handhelds.org>"
3 SECTION = "base"
4 LICENSE = "GPL"
5 PR = "r7"
6
7 DEPENDS += "fakeroot-native virtual/kernel"
8
9 SRC_URI = "ftp://ftp.handhelds.org/packages/alsa-driver/alsa-driver-${PV}.tar.gz \
10         file://sound.p.patch;patch=1 \
11         file://h5400.patch;patch=1 \
12         file://sa11xx.patch;patch=1 \
13         file://adriver.h.patch;patch=1"
14
15 inherit autotools module
16
17 # avoid miscompilation
18 KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_ARCH}"
19
20 EXTRA_OECONF = "--with-sequencer=yes \
21         --with-isapnp=no \
22         --with-oss=yes \
23         --with-kernel=${STAGING_KERNEL_DIR} \
24         --with-kernel-version=${KERNEL_VERSION}"
25
26 PACKAGES =+ "${PN}-midi ${PN}-misc"
27 FILES_${PN} = "/lib/modules/*/misc/snd* \
28         ${sysconfdir}/modutils/*"
29 midi_modules = "snd-seq-midi-emul.o \
30         snd-seq-midi-event.o \
31         snd-seq-midi.o \
32         snd-seq-virmidi.o \
33         snd-seq-oss.o" 
34 FILES_${PN}-midi = "${@' '.join(map ((lambda x: '/lib/modules/*/misc/%s' % x), bb.data.getVar('midi_modules', d).split()))}"
35 misc_modules = "snd-gus-synth.o \
36         snd-emu8000-synth.o \
37         snd-emux-synth.o \
38         snd-ainstr-fm.o \
39         snd-ainstr-gf1.o \
40         snd-ainstr-iw.o \
41         snd-ainstr-simple.o"
42 FILES_${PN}-misc = "${@' '.join(map ((lambda x: '/lib/modules/*/misc/%s' % x), bb.data.getVar('misc_modules', d).split()))}"
43
44 # put in-kernel headers first in the include search path.
45 # without this all configure checks fail
46 CFLAGS =+ "-I${STAGING_KERNEL_DIR}/include"
47
48 do_configure() {
49
50 cards=
51 if egrep "CONFIG_SA1100_H3[168]00=y" "${STAGING_KERNEL_DIR}/.config" ; then
52   cards="$cards,sa11xx-uda1341"
53   familiar_arch=ipaqsa
54 fi
55 if grep "CONFIG_ARCH_H3900=y" "${STAGING_KERNEL_DIR}/.config" ; then
56   cards="$cards,pxa-uda1380,h5400-ak4535"
57   familiar_arch=ipaqpxa
58 fi
59 cards="$cards,bluez-sco,pdaudiocf"
60
61    oe_runconf --with-cards=${cards}
62 }
63
64
65 do_install() {
66
67 if egrep "CONFIG_SA1100_H3[168]00=y" "${STAGING_KERNEL_DIR}/.config" ; then
68   familiar_arch=ipaqsa
69 fi
70 if grep "CONFIG_ARCH_H3900=y" "${STAGING_KERNEL_DIR}/.config" ; then
71   familiar_arch=ipaqpxa
72 fi
73
74       fakeroot make -k NODEPMOD=yes DESTDIR=${D} install; 
75
76       if [ -d ${D}${sysconfdir}/modutils/ ] ; then 
77          rm -r ${D}${sysconfdir}/modutils/ ;
78       fi
79       mkdir -p ${D}${sysconfdir}/modutils/
80       cp familiar/alsa-modules-${familiar_arch} ${D}${sysconfdir}/modutils/
81 }
82