]> git.ipfire.org Git - ipfire-3.x.git/blame - systemd/systemd.nm
systemd: Update to 36.
[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
ef438375
SS
7version = 36
8release = 1
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
21conflicts += upstart
22
23source_dl = http://cgit.freedesktop.org/systemd/snapshot/
24
25build
26 requires
27 audit-devel
28 automake
29 autoconf
30 cryptsetup-luks-devel
31 dbus-devel
32 gperf
33 intltool
34 libcap-devel
35 libselinux-devel
36 libtool
37 libudev-devel>=172
38 pam-devel
39 end
40
41 configure_options += \
42 --sysconfdir=/etc \
43 --libexecdir=/usr/lib \
44 --with-rootdir= \
45 --with-distro=other \
46 --with-sysvinit-path= \
47 --with-sysvrcd-path= \
48 --with-udevrulesdir=/lib/udev/rules.d/ \
49 --with-pamlibdir=/lib/security
50
51 prepare_cmds
52 ./autogen.sh ac
53 end
54
55 test
56 make check
57 end
58
59 install_cmds
60 # Create sysv compatible symlinks.
61 mkdir -pv %{BUILDROOT}/sbin
62 ln -svf ../bin/systemd %{BUILDROOT}/sbin/init
63 ln -svf ../bin/systemctl %{BUILDROOT}/sbin/reboot
64 ln -svf ../bin/systemctl %{BUILDROOT}/sbin/halt
65 ln -svf ../bin/systemctl %{BUILDROOT}/sbin/poweroff
66 ln -svf ../bin/systemctl %{BUILDROOT}/sbin/shutdown
67
68 # Create empty machine-id file.
69 touch %{BUILDROOT}/etc/machine-id
70
71 # Copy locale and console settings
72 mkdir -pv %{BUILDROOT}/etc
73 cp -vf %{DIR_SOURCE}/locale.conf %{BUILDROOT}/etc/
74 cp -vf %{DIR_SOURCE}/vconsole.conf %{BUILDROOT}/etc/
75
76 # Recreate all targets
77 rm -rfv %{BUILDROOT}/etc/systemd/system/*.target.wants
78 mkdir -pv %{BUILDROOT}/lib/systemd/system/basic.target.wants
79 mkdir -pv %{BUILDROOT}/lib/systemd/system/default.target.wants
80 mkdir -pv %{BUILDROOT}/lib/systemd/system/dbus.target.wants
81 mkdir -pv %{BUILDROOT}/lib/systemd/system/syslog.target.wants
82
83 # Remove runlevel targets and graphical.target
84 rm -rfv %{BUILDROOT}/lib/systemd/system/runlevel*
85 rm -rfv %{BUILDROOT}/lib/systemd/system/graphical.target
86
87 # Set default target to multi-user
88 cd %{BUILDROOT}/lib/systemd/system && ln -svf multi-user.target default.target
89
90 # Replace absolute symlinks by relative ones.
91 cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/bluetooth.target bluetooth.target
92 cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/local-fs.target local-fs.target
93 cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/printer.target printer.target
94 cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/shutdown.target shutdown.target
95 cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/sockets.target sockets.target
96 cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/sound.target sound.target
97 cd %{BUILDROOT}/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/swap.target swap.target
98
99 # Remove tmpfile for X11
100 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
101
102 # Remove unneeded symlink for xdg
103 rm -rfv %{BUILDROOT}/etc/xdg/systemd
104 end
105end
106
107packages
108 package %{name}
514357ad
SS
109 requires
110 dbus
111 python-cairo
1d40b321
SS
112 python-dbus
113 udev>=172
514357ad
SS
114 util-linux>=2.19
115 end
1d40b321 116
ef438375
SS
117 prerequires += authconfig
118
1d40b321
SS
119 script postin
120 # Generate Machine ID.
121 /bin/systemd-machine-id-setup > /dev/null 2>&1 || :
122
123 # Reexec systemd daemon.
124 /bin/systemctl daemon-reexec > /dev/null 2>&1 || :
125
126 # Make sure pam_systemd is enabled
127 if ! /bin/grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
128 /usr/sbin/authconfig --update --nostart >/dev/null 2>&1 || :
129
130 # Try harder
131 /bin/grep -q pam_systemd /etc/pam.d/system-auth-ac || /usr/sbin/authconfig --updateall --nostart >/dev/null 2>&1 || :
132 fi
133 end
134
135 script postup
136 # Restart login service after update
137 /bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
138 end
802ea3af 139 end
26bf0839 140
802ea3af
MT
141 # Package information for systemd-units
142 package %{name}-units
143 summary = Configuration files, directories and installation tool for systemd.
144 description
145 This package contains all needed configuration files, directories
146 and installation / configuration tool for systemd.
147 end
baec4059 148
802ea3af
MT
149 files
150 /etc/systemd/system
151 /etc/tmpfiles.d
152 /etc/bash_completion.d/systemctl-bash-completion.sh
153 /lib/systemd/system
154 /bin/systemctl
155 /bin/systemd-tmpfiles
156 /usr/share/man/man1/systemctl.*
157 end
1d40b321
SS
158
159 script postin
160 # Enable default services.
161 systemctl enable \
162 getty@.service \
163 remote-fs.target > /dev/null 2>&1 || :
164 end
165
166 script preun
167 # Disable default services.
168 systemctl disable \
169 getty@.service \
170 remote-fs.target > /dev/null 2>&1 || :
171 end
172
173 script postup
174 # Reload service files
175 systemctl daemon-reload > /dev/null 2>&1 || :
176 end
802ea3af
MT
177 end
178
179 package %{name}-devel
180 template DEVEL
181 end
182end