]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - systemd/systemd.nm
nss_ldap: Fix dependency to pam_ldap and move all to /usr.
[people/amarx/ipfire-3.x.git] / systemd / systemd.nm
CommitLineData
c8ef6def 1###############################################################################
802ea3af
MT
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
c8ef6def
SS
4###############################################################################
5
802ea3af 6name = systemd
6793fec1 7version = 44
0976fbe4 8release = 4
c8ef6def 9
802ea3af
MT
10maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
11groups = System/Base
12url = http://www.freedesktop.org/wiki/Software/systemd
13license = GPLv2+
14summary = A System and Service Manager.
c8ef6def 15
802ea3af
MT
16description
17 systemd is a system and service manager for Linux, compatible with
c8ef6def 18 SysV and LSB init scripts.
802ea3af
MT
19end
20
5e38e9bb 21source_dl = http://cgit.freedesktop.org/systemd/systemd/snapshot/
802ea3af
MT
22
23build
6793fec1
MT
24 unitdir = %{prefix}/lib/systemd/system
25
802ea3af
MT
26 requires
27 audit-devel
28 automake
29 autoconf
30 cryptsetup-luks-devel
31 dbus-devel
fe6e3719
SS
32 docbook-utils
33 docbook-xsl
802ea3af 34 gperf
bfabb323 35 gettext-devel
802ea3af 36 intltool
6793fec1 37 kmod-devel >= 5
2a824e90 38 libacl-devel
802ea3af
MT
39 libcap-devel
40 libselinux-devel
41 libtool
6793fec1 42 libudev-devel >= 172
802ea3af 43 pam-devel
53a325cb 44 vala
6793fec1 45 xz-devel
802ea3af
MT
46 end
47
48 configure_options += \
2d32bcae 49 --libexecdir=%{libdir} \
e36f27e1 50 --with-udevrulesdir=%{prefix}/lib/udev/rules.d \
6793fec1 51 --with-distro=ipfire
802ea3af
MT
52
53 prepare_cmds
54 ./autogen.sh ac
55 end
56
57 test
58 make check
59 end
60
61 install_cmds
62 # Create sysv compatible symlinks.
6793fec1
MT
63 mkdir -pv %{BUILDROOT}%{sbindir}
64 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
65 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
66 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
67 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
68 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
69 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
802ea3af
MT
70
71 # Create empty machine-id file.
72 touch %{BUILDROOT}/etc/machine-id
73
74 # Copy locale and console settings
6793fec1
MT
75 mkdir -pv %{BUILDROOT}%{sysconfdir}
76 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
802ea3af
MT
77
78 # Recreate all targets
0976fbe4
SS
79 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
80 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
81 multi-user.target.wants syslog.target.wants; do
82 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
6793fec1 83 done
802ea3af
MT
84
85 # Remove runlevel targets and graphical.target
6793fec1
MT
86 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
87 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
802ea3af
MT
88
89 # Set default target to multi-user
6793fec1 90 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
802ea3af
MT
91
92 # Replace absolute symlinks by relative ones.
6793fec1
MT
93 cd %{BUILDROOT}%{unitdir}/../user
94 for i in bluetooth local-fs printer remote-fs shutdown sockets sound swap; do
95 ln -svf ../system/${i}.target ${i}.target || exit 1
96 done
97
98 # Replace absolute symlink for getty@tty1.service.
99 ln -svf ../../../../%{unitdir}/getty@.service \
100 %{BUILDROOT}%{sysconfdir}/systemd/system/getty.target.wants/getty@tty1.service
101
102 # Replace absolute symlink for remote-fs.target.
103 ln -svf ../../../../%{unitdir}/remote-fs.target \
104 %{BUILDROOT}%{sysconfdir}/systemd/system/multi-user.target.wants/remote-fs.target
802ea3af
MT
105
106 # Remove tmpfile for X11
107 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
108
109 # Remove unneeded symlink for xdg
110 rm -rfv %{BUILDROOT}/etc/xdg/systemd
111 end
112end
113
114packages
115 package %{name}
6793fec1
MT
116 prerequires += authconfig
117
514357ad
SS
118 requires
119 dbus
120 python-cairo
1d40b321 121 python-dbus
214d8f27 122 %{name}-units=%{thisver}
1d40b321 123 udev>=172
514357ad
SS
124 util-linux>=2.19
125 end
1d40b321 126
216fde50
SS
127 provides
128 /bin/systemd
129 /sbin/halt
130 /sbin/init
131 /sbin/poweroff
132 /sbin/reboot
133 /sbin/shutdown
134 end
135
6793fec1
MT
136 conflicts
137 filesystem < 002
138 upstart
139 end
ef438375 140
1d40b321
SS
141 script postin
142 # Generate Machine ID.
6793fec1 143 /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
1d40b321
SS
144
145 # Reexec systemd daemon.
6793fec1 146 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
1d40b321
SS
147
148 # Make sure pam_systemd is enabled
6793fec1
MT
149 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
150 authconfig --update --nostart >/dev/null 2>&1 || :
1d40b321
SS
151
152 # Try harder
6793fec1 153 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
1d40b321
SS
154 fi
155 end
156
157 script postup
158 # Restart login service after update
6793fec1 159 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
1d40b321 160 end
802ea3af 161 end
1f9bc2f0 162
802ea3af
MT
163 # Package information for systemd-units
164 package %{name}-units
165 summary = Configuration files, directories and installation tool for systemd.
166 description
167 This package contains all needed configuration files, directories
168 and installation / configuration tool for systemd.
169 end
1f9bc2f0 170
5e38e9bb
SS
171 prerequires
172 /bin/sh
173 coreutils
174 end
175
6793fec1 176 provides
802ea3af 177 /bin/systemctl
802ea3af 178 end
1d40b321 179
6793fec1
MT
180 conflicts
181 filesystem < 002
1d40b321
SS
182 end
183
6793fec1
MT
184 files
185 %{sysconfdir}/etc/systemd/system
186 %{sysconfdir}/tmpfiles.d
187 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
188 %{unitdir}
189 %{bindir}/systemctl
190 %{bindir}/systemd-tmpfiles
191 %{mandir}/man1/systemctl.*
1d40b321
SS
192 end
193
194 script postup
195 # Reload service files
6793fec1 196 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
1d40b321 197 end
802ea3af 198 end
1f9bc2f0 199
802ea3af
MT
200 package %{name}-devel
201 template DEVEL
6793fec1
MT
202
203 files += %{prefix}/lib/pakfire/macros/
802ea3af 204 end
1f9bc2f0
MT
205
206 package %{name}-debuginfo
207 template DEBUGINFO
208 end
802ea3af 209end