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