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 | |
b751b192 | 4 | # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu |
6dca1d21 JB |
5 | # Depends on: |
6 | ||
7 | name=udev | |
22789207 JB |
8 | version=141 |
9 | release=1 | |
6dca1d21 | 10 | source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/$name-$version.tar.bz2 \ |
22789207 JB |
11 | http://crux.nu/files/distfiles/udev-config-20081015.tar.bz2 \ |
12 | start_udev) | |
6dca1d21 JB |
13 | |
14 | build() { | |
be0c29c6 | 15 | cd udev-$version |
22789207 | 16 | |
be0c29c6 | 17 | ./configure --build=$CHOST \ |
6dca1d21 JB |
18 | --host=$CTARGET \ |
19 | --prefix=/usr \ | |
20 | --exec-prefix= \ | |
21 | --sysconfdir=/etc \ | |
22789207 | 22 | --mandir=/usr/man |
be0c29c6 JB |
23 | |
24 | make | |
22789207 | 25 | make install DESTDIR=$PKG |
be0c29c6 | 26 | |
22789207 JB |
27 | # scsi_id + vol_id need to be multi-path |
28 | (cd $PKG/sbin; ln -s ../lib/udev/vol_id vol_id) | |
29 | (cd $PKG/sbin; ln -s ../lib/udev/scsi_id scsi_id) | |
be0c29c6 | 30 | |
22789207 | 31 | mkdir -p $PKG/lib/{firmware,udev/devices/{pts,shm}} |
be0c29c6 JB |
32 | |
33 | # Populate nodes | |
34 | mknod -m 600 $PKG/lib/udev/devices/console c 5 1 | |
35 | mknod -m 666 $PKG/lib/udev/devices/null c 1 3 | |
36 | mknod -m 666 $PKG/lib/udev/devices/zero c 1 5 | |
37 | ln -s /proc/self/fd $PKG/lib/udev/devices/fd | |
38 | ln -s /proc/self/fd/0 $PKG/lib/udev/devices/stdin | |
39 | ln -s /proc/self/fd/1 $PKG/lib/udev/devices/stdout | |
40 | ln -s /proc/self/fd/2 $PKG/lib/udev/devices/stderr | |
41 | ln -s /proc/kcore $PKG/lib/udev/devices/core | |
42 | ||
22789207 JB |
43 | # Install some upstream rules |
44 | cp -a rules/packages/40-alsa.rules $PKG/lib/udev/rules.d/ | |
45 | ||
be0c29c6 JB |
46 | # Add CRUX items + LFS rules |
47 | install -m 0755 $SRC/start_udev $PKG/sbin | |
48 | ||
22789207 | 49 | pushd $SRC/udev-config-20081015 |
be0c29c6 JB |
50 | make DESTDIR=$PKG RULES_DIR=/lib/udev/rules.d install |
51 | popd | |
52 | ||
22789207 JB |
53 | # Comment uucp lines in default rules |
54 | sed -i 's|.*uucp.*|#&|g' $PKG/lib/udev/rules.d/50-udev-default.rules | |
55 | sed -i 's|.*uucp.*|#&|g' $PKG/lib/udev/rules.d/55-lfs.rules | |
56 | ||
be0c29c6 JB |
57 | # Keep udevinfo for legacy support |
58 | mkdir -p $PKG/usr/bin | |
59 | ln -s /sbin/udevadm $PKG/usr/bin/udevinfo | |
6dca1d21 | 60 | } |