]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - lfs/udev
Merge remote-tracking branch 'origin/next' into thirteen
[people/pmueller/ipfire-2.x.git] / lfs / udev
CommitLineData
90d372c4 1###############################################################################
90d372c4 2# #
70df8302 3# IPFire.org - A linux based firewall #
cb6ed508 4# Copyright (C) 2007-2012 IPFire Team <info@ipfire.org> #
70df8302
MT
5# #
6# This program is free software: you can redistribute it and/or modify #
90d372c4 7# it under the terms of the GNU General Public License as published by #
70df8302 8# the Free Software Foundation, either version 3 of the License, or #
90d372c4
MT
9# (at your option) any later version. #
10# #
70df8302 11# This program is distributed in the hope that it will be useful, #
90d372c4
MT
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
70df8302 17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
90d372c4
MT
18# #
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
1ea989eb 27VER = 125
90d372c4
MT
28
29THISAPP = udev-$(VER)
1ea989eb 30DL_FILE = $(THISAPP).tar.gz
90d372c4
MT
31DL_FROM = $(URL_IPFIRE)
32DIR_APP = $(DIR_SRC)/$(THISAPP)
b7d60471 33TARGET = $(DIR_INFO)/$(THISAPP)
90d372c4
MT
34
35###############################################################################
36# Top-level Rules
37###############################################################################
38
39objects = $(DL_FILE) udev-config-6.2.tar.bz2
40
41$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
42udev-config-6.2.tar.bz2 = $(DL_FROM)/udev-config-6.2.tar.bz2
43
1ea989eb 44$(DL_FILE)_MD5 = be98e04cefdd9ca76b8fe7e92735ce29
90d372c4
MT
45udev-config-6.2.tar.bz2_MD5 = 9ff2667ab0f7bfe8182966ef690078a0
46
47install : $(TARGET)
48
49check : $(patsubst %,$(DIR_CHK)/%,$(objects))
50
51download :$(patsubst %,$(DIR_DL)/%,$(objects))
52
53md5 : $(subst %,%_MD5,$(objects))
54
55###############################################################################
56# Downloading, checking, md5sum
57###############################################################################
58
59$(patsubst %,$(DIR_CHK)/%,$(objects)) :
60 @$(CHECK)
61
62$(patsubst %,$(DIR_DL)/%,$(objects)) :
63 @$(LOAD)
64
65$(subst %,%_MD5,$(objects)) :
66 @$(MD5)
67
68###############################################################################
69# Installation Details
70###############################################################################
71
72$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
73 @$(PREBUILD)
1ea989eb 74 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
a500f481 75 cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/udev-125-netif_rename.patch
cb6ed508 76 cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/udev-125-ext4_wo_journal.patch
ef6396c0 77 rm -rf /lib/udev/devices
90d372c4 78 cd $(DIR_APP) && tar jxf $(DIR_DL)/udev-config-6.2.tar.bz2
d004707e 79 cd $(DIR_APP) && patch -Np0 -i $(DIR_SRC)/src/patches/udev-config-6.2_persistent-storage-fix.patch
88f84919 80 cd $(DIR_APP) && patch -Np0 -i $(DIR_SRC)/src/patches/udev-config-6.2_remove-lfs-usb-rule.patch
c674e147
AF
81 install -dv /lib/{firmware,udev/devices/{pts,shm}}
82 echo "Put device firmwares here ..." > /lib/firmware/dirinfo
90d372c4
MT
83 mknod -m0666 /lib/udev/devices/null c 1 3
84 ln -sv /proc/self/fd /lib/udev/devices/fd
85 ln -sv /proc/self/fd/0 /lib/udev/devices/stdin
86 ln -sv /proc/self/fd/1 /lib/udev/devices/stdout
87 ln -sv /proc/self/fd/2 /lib/udev/devices/stderr
88 ln -sv /proc/kcore /lib/udev/devices/core
89 cd $(DIR_APP) && make $(MAKETUNING) EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id \
90 extras/firmware extras/floppy extras/path_id \
91 extras/scsi_id extras/usb_id extras/volume_id"
92 cd $(DIR_APP) && make DESTDIR=/ EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id \
93 extras/firmware extras/floppy extras/path_id \
94 extras/scsi_id extras/usb_id extras/volume_id" install
95 cd $(DIR_APP) && cp -v udev-config-6.2/[0-9]* /etc/udev/rules.d/
debeaeaa 96 cp -rf $(DIR_SRC)/config/udev/10-dvb.rules /etc/udev/rules.d/
c7445b87 97 cp -rf $(DIR_SRC)/config/udev/55-scsi-cdrom.rules /etc/udev/rules.d/
debeaeaa 98 chmod 644 /etc/udev/rules.d/10-dvb.rules
c7445b87 99 chmod 644 /etc/udev/rules.d/55-scsi-cdrom.rules
debeaeaa
AF
100 cp -rf $(DIR_SRC)/config/udev/dvb.sh /etc/udev/
101 chmod 755 /etc/udev/dvb.sh
59de0b00 102 touch /etc/udev/rules.d/30-persistent-network.rules
ef6396c0 103 cp -vf $(DIR_SRC)/config/udev/blacklist /etc/modprobe.d/blacklist
3e78d712
MT
104
105 # Install codel rules.
106 install -v -m 644 $(DIR_SRC)/config/udev/99-codel.rules \
107 /lib/udev/rules.d
108 install -m 755 $(DIR_SRC)/config/udev/enable_codel \
109 /lib/udev/enable_codel
90d372c4
MT
110 @rm -rf $(DIR_APP)
111 @$(POSTBUILD)