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