Commit | Line | Data |
---|---|---|
6dca1d21 JB |
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 | |
be0c29c6 | 4 | # Arch Maintainer: CRUX ARM System Team, crux-arm at mikeux dot dyndns dot org |
6dca1d21 JB |
5 | # Depends on: |
6 | ||
7 | name=udev | |
be0c29c6 | 8 | version=149 |
6aaab859 | 9 | release=2 |
6dca1d21 | 10 | source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/$name-$version.tar.bz2 \ |
be0c29c6 | 11 | http://crux.nu/files/distfiles/udev-config-20090523.tar.bz2 \ |
6dca1d21 JB |
12 | start_udev) |
13 | ||
14 | build() { | |
be0c29c6 JB |
15 | cd udev-$version |
16 | ||
17 | ./configure --build=$CHOST \ | |
6dca1d21 JB |
18 | --host=$CTARGET \ |
19 | --prefix=/usr \ | |
20 | --exec-prefix= \ | |
21 | --sysconfdir=/etc \ | |
be0c29c6 JB |
22 | --libexecdir=/lib/udev \ |
23 | --mandir=/usr/man \ | |
24 | --disable-extras \ | |
25 | --disable-introspection | |
26 | ||
27 | make | |
28 | make install DESTDIR=$PKG \ | |
29 | pkgconfigdir=/usr/lib/pkgconfig | |
30 | ||
31 | mkdir -p $PKG/lib/{firmware,udev/devices/{pts,shm}} | |
32 | mkdir -p $PKG/usr/lib | |
33 | ||
34 | # Fix location of devel lib | |
35 | rm $PKG/lib/libudev.so | |
6aaab859 | 36 | ln -sf ../../lib/libudev.so.0.5.1 $PKG/usr/lib/libudev.so |
be0c29c6 JB |
37 | |
38 | # Populate nodes | |
39 | mknod -m 600 $PKG/lib/udev/devices/console c 5 1 | |
40 | mknod -m 666 $PKG/lib/udev/devices/null c 1 3 | |
41 | mknod -m 666 $PKG/lib/udev/devices/zero c 1 5 | |
42 | ln -s /proc/self/fd $PKG/lib/udev/devices/fd | |
43 | ln -s /proc/self/fd/0 $PKG/lib/udev/devices/stdin | |
44 | ln -s /proc/self/fd/1 $PKG/lib/udev/devices/stdout | |
45 | ln -s /proc/self/fd/2 $PKG/lib/udev/devices/stderr | |
46 | ln -s /proc/kcore $PKG/lib/udev/devices/core | |
47 | ||
48 | # Add CRUX items + LFS rules | |
49 | install -m 0755 $SRC/start_udev $PKG/sbin | |
50 | ||
51 | pushd $SRC/udev-config-20090523 | |
52 | make DESTDIR=$PKG RULES_DIR=/lib/udev/rules.d install | |
53 | popd | |
54 | ||
55 | # Keep udevinfo for legacy support | |
56 | mkdir -p $PKG/usr/bin | |
57 | ln -s /sbin/udevadm $PKG/usr/bin/udevinfo | |
58 | ||
59 | # Remove junk | |
60 | rm -rf $PKG/usr/share/{gtk-,}doc | |
61 | rm $PKG/lib/libudev.la | |
6dca1d21 | 62 | } |
6aaab859 JB |
63 | # Fix location of devel lib |
64 | rm $PKG/lib/libudev.so | |
65 | ln -sf ../../lib/libudev.so.0.5.1 $PKG/usr/lib/libudev.so |