1 # Description: Userspace device management daemon
2 # URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
3 # Maintainer: CRUX System Team, core-ports at crux dot nu
4 # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
10 source=(http://dev.gentoo.org/~blueness/$name/$name-$version.tar.gz
11 81-crux.rules start_udev)
14 # backup for next build of udevadm on host and use it to gnerate hwdb
15 cp -r $name-$version $name-$version-host
18 sed -i '/^Libs:/s/-ludev/-ludev -lrt/' src/libudev/libudev.pc.in
20 ./configure --build=$CHOST \
23 --sbindir=/sbin --bindir=/sbin \
26 --with-rootlibdir=/lib \
28 --disable-introspection \
33 make CFLAGS="$CFLAGS -D_GNU_SOURCE"
34 make install DESTDIR=$PKG
35 make -C man install DESTDIR=$PKG
37 # udevadm build to use it later on host to generate hwdb
38 pushd $SRC/$name-$version-host
39 unset CC CXX AR AS RANLIB LD CFLAGS CXXFLAGS LDFLAGS
40 export CFLAGS="-L/usr/lib -I/usr/include -D_GNU_SOURCE"
42 ./configure --prefix=/usr \
43 --sbindir=/sbin --bindir=/sbin \
46 --with-rootlibdir=/lib \
48 --disable-introspection \
54 cp src/udev/udevadm $WORK/
58 LD_LIBRARY_PATH=$PKG/lib \
59 $WORK/udevadm hwdb --update --root=$PKG
62 mkdir -p $PKG/lib/{firmware,udev/devices/{pts,shm}}
63 mkdir -p $PKG/{lib,sbin,run}
66 install -m 0755 $SRC/start_udev $PKG/sbin
67 install -m 0644 $SRC/81-crux.rules $PKG/lib/udev/rules.d