]> git.ipfire.org Git - ipfire-3.x.git/blob - lfs/udev
Added the missing patches for download
[ipfire-3.x.git] / lfs / udev
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007 Michael Tremer & Christian Schmidt #
5 # #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
10 # #
11 # This program is distributed in the hope that it will be useful, #
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 #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
18 # #
19 ###############################################################################
20
21 ###############################################################################
22 # Definitions
23 ###############################################################################
24
25 include Config
26
27 PKG_NAME = udev
28 VER = 113
29 CONFVER = 20070731
30
31 THISAPP = $(PKG_NAME)-$(VER)
32 DL_FILE = $(THISAPP).tar.bz2
33 DIR_APP = $(DIR_SRC)/$(THISAPP)
34
35 TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
36
37 ###############################################################################
38 # Top-level Rules
39 ###############################################################################
40
41 objects = $(DL_FILE) $(THISAPP)-usb_id-1.patch \
42 $(PKG_NAME)-config-$(CONFVER).tar.bz2
43
44 install : $(TARGET)
45
46 download : $(patsubst %,$(DIR_DL)/%,$(objects))
47
48 $(patsubst %,$(DIR_DL)/%,$(objects)) :
49 @$(LOAD)
50
51 ###############################################################################
52 # Installation Details
53 ###############################################################################
54
55 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
56 @$(PREBUILD)
57 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
58 cd $(DIR_APP) && tar -xvf $(DIR_DL)/$(PKG_NAME)-config-$(CONFVER).tar.bz2
59
60 install -dv /lib/{firmware,udev/devices/{pts,shm}}
61 -mknod -m0666 /lib/udev/devices/null c 1 3
62 ln -sfv /proc/self/fd /lib/udev/devices/fd
63 ln -sfv /proc/self/fd/0 /lib/udev/devices/stdin
64 ln -sfv /proc/self/fd/1 /lib/udev/devices/stdout
65 ln -sfv /proc/self/fd/2 /lib/udev/devices/stderr
66 ln -sfv /proc/kcore /lib/udev/devices/core
67
68 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-usb_id-1.patch
69
70 cd $(DIR_APP) && make EXTRAS="`echo extras/*/`" -j $(PARALLELISM)
71 cd $(DIR_APP) && make DESTDIR=/ EXTRAS="`echo extras/*/`" install
72
73 cd $(DIR_APP) && cp -v etc/udev/rules.d/[0-9]* /etc/udev/rules.d/
74
75 cd $(DIR_APP)/$(PKG_NAME)-config-$(CONFVER) && make install
76
77 @rm -rf $(DIR_APP)
78 @$(POSTBUILD)