]> git.ipfire.org Git - ipfire-3.x.git/blob - initscripts/initscripts.nm
Drop epoch from all files
[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 version = 2.99
8 release = 19
9
10 groups = System/Boot
11 url =
12 license = GPLv3+
13 summary = The set of scripts that initalize the system.
14
15 description
16 The initscripts package contains the basic system scripts used to boot
17 your system and shut the system down cleanly.
18 end
19
20 # Nothing to download.
21 sources =
22
23 build
24 requires
25 glib2-devel
26 popt-devel
27 shadow-utils
28 systemd-units
29 end
30
31 DIR_APP = %{DIR_SOURCE}
32
33 prepare_cmds
34 cd src && make clean
35 end
36
37 build
38 cd src && make %{PARALLELISMFLAGS}
39 end
40
41 test
42 cd src && make test
43 end
44
45 install
46 cd src && make install clean DESTDIR=%{BUILDROOT}
47
48 # Install rc.local
49 mkdir -pv %{BUILDROOT}%{sysconfdir}
50 install -v -m 755 %{DIR_SOURCE}/rc.local %{BUILDROOT}%{sysconfdir}/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 datafiles
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