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