]> hackdaworld.org Git - hdw-linux/hdw-linux.git/blob - packages/base/udev/udev
fixed font problem within ghostscript
[hdw-linux/hdw-linux.git] / packages / base / udev / udev
1 # hdw - linux udev package
2 #
3 # author: hackbard@hackdaworld.dyndns.org
4 #
5 # [V] 025
6 # [S] 1-9 2-15
7 # [D] udev-027.tar.bz2 http://www.kernel.org/pub/linux/utils/kernel/hotplug/
8
9 make_conf="udevdir=/dev $make_conf"
10 install_conf="udevdir=/dev"
11
12 u_root=$root
13 [ "$hdw_status" = "1" ] && u_root=/${s1_prefix}
14
15 if [ "$hdw_status" = "1" ] ; then
16         make_conf="prefix=$prefix etcdir=$prefix/etc $make_conf"
17         install_conf="DESTDIR=$prefix $install_conf"
18         pre_install()   {
19                 mv udevstart.c udevstart.c.orig
20                 sed "s%/sbin/udev%$u_root/sbin/udev%g" udevstart.c.orig > \
21                         udevstart.c
22                 mv etc/udev/udev.conf.in etc/udev/udev.conf.in.orig
23                 sed "s%/etc%$u_root/etc%g" etc/udev/udev.conf.in.orig > \
24                         etc/udev/udev.conf.in
25                         }
26 fi
27
28 post_install()  {
29         # subsys folder for locking
30         mkdir -p $root/var/lock/subsys
31         # documentation
32         rm -rf $docdir ; mkdir -p $docdir
33         cp -r docs FAQ HOWTO-udev_for_dev README* TODO $docdir
34         # config stuff
35         mkdir -p $u_root/etc/udev/{rules,permissions}.d
36         cp etc/udev/udev.rules* $u_root/etc/udev/rules.d/
37         cp etc/udev/udev.permissions* $u_root/etc/udev/permissions.d/
38         mv $u_root/etc/udev/rules.d/udev.rules{,.orig}
39         mv $u_root/etc/udev/permissions.d/udev.permissions{,.orig}
40         ln -svf udev.rules.devfs $u_root/etc/udev/rules.d/udev.rules
41         ln -svf udev.permissions.gentoo \
42                 $u_root/etc/udev/permissions.d/udev.permissions
43         # init script
44         if [ "$hdw_status" = "2" ] ; then
45                 cp $confdir/init_udev.sh $u_root/etc/init.d/udev
46                 chmod 750 $u_root/etc/init.d/udev
47         fi
48                 }