]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - initscripts/initscripts.nm
Merge remote-tracking branch 'arne_f/autoconf'
[people/ms/ipfire-3.x.git] / initscripts / initscripts.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = initscripts
7 epoch = 1
8 version = 2.99
9 release = 17
10
11 groups = System/Boot
12 url =
13 license = GPLv3+
14 summary = The set of scripts that initalize the system.
15
16 description
17 The initscripts package contains the basic system scripts used to boot \
18 your system and shut the system down cleanly.
19 end
20
21 # Nothing to download.
22 sources =
23
24 build
25 requires
26 glib2-devel
27 popt-devel
28 shadow-utils
29 systemd-units
30 end
31
32 DIR_APP = %{DIR_SOURCE}
33
34 prepare_cmds
35 cd src && make clean
36 end
37
38 build
39 cd src && make %{PARALLELISMFLAGS}
40 end
41
42 test
43 cd src && make test
44 end
45
46 install
47 cd src && make install clean DESTDIR=%{BUILDROOT}
48
49 # Install rc.local
50 install -v -m 755 %{DIR_SOURCE}/rc.local %{BUILDROT}/etc/rc.local
51
52 # Install udev rules
53 mkdir -pv %{BUILDROOT}%{prefix}/lib/udev/rules.d/
54 cp -vf %{DIR_SOURCE}/udev/* %{BUILDROOT}%{prefix}/lib/udev/rules.d/
55 end
56 end
57
58 packages
59 package %{name}
60 groups += Base
61
62 requires
63 bash
64 coreutils
65 e2fsprogs
66 grep
67 iproute2
68 module-init-tools
69 procps
70 sed
71 system-release
72 udev
73 util-linux
74 end
75
76 provides
77 /bin/ipcalc
78 end
79
80 conflicts
81 filesystem < 002
82 end
83
84 configfiles
85 /etc/rc.local
86 end
87
88 prerequires
89 coreutils
90 shadow-utils
91 end
92
93 script prein
94 groupadd -g 22 -r -f utmp
95 end
96
97 script postin
98 touch /var/log/{b,w}tmp /var/run/utmp
99 chown root:utmp /var/log/{b,w}tmp /var/run/utmp
100 chmod 664 /var/log/wtmp /var/run/utmp
101 chmod 600 /var/log/btmp
102
103 # Just search for new unit files that were just installed.
104 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
105
106 # Enable rc.local as default.
107 /bin/systemctl --no-reload enable rc-local.service >/dev/null 2>&1 || :
108 end
109
110 # Disable the service that is to be removed and stop it if it is still running.
111 script preun
112 /bin/systemctl --no-reload disable rc-local.service >/dev/null 2>&1 || :
113 /bin/systemctl stop rc-local.service >/dev/null 2>&1 || :
114 end
115
116 # Just tell systemd that unitfiles have been removed.
117 script postun
118 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
119 end
120 end
121
122 package %{name}-debuginfo
123 template DEBUGINFO
124 end
125 end