source: systemd-units/Makefile@ be67218

systemd-11177
Last change on this file since be67218 was be67218, checked in by Krejzi <krejzi@…>, 10 years ago

Merge more Christopher's work. Import systemd units.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@13507 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 12.9 KB
Line 
1SHELL=/bin/bash
2
3EXTDIR=${DESTDIR}/etc
4DEFAULTSDIR=${DESTDIR}/etc/default
5SERVICEDIR=${DESTDIR}/lib/services
6TMPFILESDIR=${DESTDIR}/usr/lib/tmpfiles.d
7UNITSDIR=${DESTDIR}/lib/systemd/system
8MODE=755
9DIRMODE=755
10CONFMODE=644
11
12all:
13 @grep "^install" Makefile.systemd | cut -d ":" -f 1
14 @echo "Select an appropriate install target from the above list"
15
16create-dirs:
17 install -d -m ${DIRMODE} ${DEFAULTSDIR}
18 install -d -m ${DIRMODE} ${TMPFILESDIR}
19 install -d -m ${DIRMODE} ${UNITSDIR}
20
21create-service-dir:
22 install -d -m ${DIRMODE} ${EXTDIR}/sysconfig/network-devices/services
23 install -d -m ${DIRMODE} ${SERVICEDIR}
24
25install-service-dhclient: create-service-dir
26 install -m ${MODE} blfs/services/dhclient ${SERVICEDIR}
27
28install-service-dhcpcd: create-service-dir
29 install -m ${MODE} blfs/services/dhcpcd ${SERVICEDIR}
30
31install-service-bridge: create-service-dir
32 install -m ${MODE} blfs/services/bridge ${SERVICEDIR}
33
34install-service-wpa: create-service-dir
35 install -m ${MODE} blfs/services/wpa ${SERVICEDIR}
36
37install-acpid: create-dirs
38 install -m ${CONFMODE} blfs/units/acpid.service ${UNITSDIR}/
39 install -m ${CONFMODE} blfs/units/acpid.socket ${UNITSDIR}/
40 systemctl enable acpid.socket
41
42install-dhcpd: create-dirs
43 install -m ${CONFMODE} blfs/default/dhcpd ${DEFAULTSDIR}/
44 install -m ${CONFMODE} blfs/units/dhcpd.service ${UNITSDIR}/
45 systemctl enable dhcpd.service
46
47install-exim: create-dirs
48 install -m ${CONFMODE} blfs/units/exim.service ${UNITSDIR}/
49 systemctl enable exim.service
50
51install-git: create-dirs
52 install -m ${CONFMODE} blfs/units/git-daemonat.service ${UNITSDIR}/git-daemon@.service
53 install -m ${CONFMODE} blfs/units/git-daemon.socket ${UNITSDIR}/
54 systemctl enable git-daemon.socket
55
56install-gpm: create-dirs
57 install -m ${CONFMODE} blfs/units/gpm.service ${UNITSDIR}/
58 systemctl enable gpm.service
59
60install-httpd: create-dirs
61 install -m ${CONFMODE} blfs/tmpfiles/httpd.conf ${TMPFILESDIR}/
62 install -m ${CONFMODE} blfs/units/httpd.service ${UNITSDIR}/
63 systemd-tmpfiles --create httpd.conf
64 systemctl enable httpd.service
65
66install-kdm: create-dirs
67 install -m ${CONFMODE} blfs/units/kdm.service ${UNITSDIR}/
68 systemctl enable kdm.service
69
70install-krb5: create-dirs
71 install -m ${CONFMODE} blfs/units/krb5-kdc.service ${UNITSDIR}/
72 install -m ${CONFMODE} blfs/units/krb5-kpropd.service ${UNITSDIR}/
73 install -m ${CONFMODE} blfs/units/krb5-kadmind.service ${UNITSDIR}/
74 systemctl enable krb5-kdc.service
75 systemctl enable krb5-kpropd.service
76 systemctl enable krb5-kadmind.service
77
78install-mysqld: create-dirs
79 install -m ${CONFMODE} blfs/tmpfiles/mysqld.conf ${TMPFILESDIR}/
80 install -m ${CONFMODE} blfs/units/mysqld.service ${UNITSDIR}/
81 systemd-tmpfiles --create mysqld.conf
82 systemctl enable mysqld.service
83
84install-named: create-dirs
85 install -m ${CONFMODE} blfs/tmpfiles/named.conf ${TMPFILESDIR}/
86 install -m ${CONFMODE} blfs/units/named.service ${UNITSDIR}/
87 systemd-tmpfiles --create named.conf
88 systemctl enable named.service
89
90install-nfs-client: create-dirs
91 install -m ${CONFMODE} blfs/default/nfs-utils ${DEFAULTSDIR}/
92 install -m ${CONFMODE} blfs/units/rpc-statd.service ${UNITSDIR}/
93 install -m ${CONFMODE} blfs/units/nfs-client.target ${UNITSDIR}/
94 systemctl enable rpc-statd.service
95
96install-nfs-server: install-nfs-client
97 install -m ${CONFMODE} blfs/units/nfsd.service ${UNITSDIR}/
98 install -m ${CONFMODE} blfs/units/rpc-mountd.service ${UNITSDIR}/
99 install -m ${CONFMODE} blfs/units/nfs-server.target ${UNITSDIR}/
100 install -m ${CONFMODE} blfs/units/proc-fs-nfsd.mount ${UNITSDIR}/
101 systemctl enable nfsd.service
102 systemctl enable rpc-mountd.service
103
104install-ntpd: create-dirs
105 install -m ${CONFMODE} blfs/units/ntpd.service ${UNITSDIR}/
106 install -d -m ${DIRMODE} ${DESTDIR}/usr/lib/systemd/ntp-units.d
107 echo "ntpd.service" > ${DESTDIR}/usr/lib/systemd/ntp-units.d/ntp.list
108 systemctl enable ntpd.service
109
110install-postfix: create-dirs
111 install -m ${CONFMODE} blfs/units/postfix.service ${UNITSDIR}/
112 systemctl enable postfix.service
113
114install-postgresql: create-dirs
115 install -m ${CONFMODE} blfs/tmpfiles/postgresql.conf ${TMPFILESDIR}/
116 install -m ${CONFMODE} blfs/units/postgresql.service ${UNITSDIR}/
117 systemd-tmpfiles --create postgresql.conf
118 systemctl enable postgresql.service
119
120install-proftpd: create-dirs
121 install -m ${CONFMODE} blfs/units/proftpd.service ${UNITSDIR}/
122 systemctl enable proftpd.service
123
124install-rpcbind: create-dirs
125 install -m ${CONFMODE} blfs/units/rpcbind.service ${UNITSDIR}/
126 systemctl enable rpcbind.service
127
128install-rsyncd: create-dirs
129 install -m ${CONFMODE} blfs/units/rsyncd.service ${UNITSDIR}/
130 install -m ${CONFMODE} blfs/units/rsyncdat.service ${UNITSDIR}/rsyncd@.service
131 install -m ${CONFMODE} blfs/units/rsyncd.socket ${UNITSDIR}/
132 systemctl enable rsyncd.service
133
134install-samba: create-dirs
135 install -m ${CONFMODE} blfs/default/samba ${DEFAULTSDIR}/
136 install -m ${CONFMODE} blfs/tmpfiles/samba.conf ${TMPFILESDIR}/
137 install -m ${CONFMODE} blfs/units/nmbd.service ${UNITSDIR}/
138 install -m ${CONFMODE} blfs/units/smbd.service ${UNITSDIR}/
139 install -m ${CONFMODE} blfs/units/smbdat.service ${UNITSDIR}/smbd@.service
140 install -m ${CONFMODE} blfs/units/smbd.socket ${UNITSDIR}/
141 systemd-tmpfiles --create samba.conf
142 systemctl enable nmbd.service
143 systemctl enable smbd.service
144
145install-saslauthd: create-dirs
146 install -m ${CONFMODE} blfs/default/saslauthd ${DEFAULTSDIR}/
147 install -m ${CONFMODE} blfs/tmpfiles/saslauthd.conf ${TMPFILESDIR}/
148 install -m ${CONFMODE} blfs/units/saslauthd.service ${UNITSDIR}/
149 systemd-tmpfiles --create saslauthd.conf
150 systemctl enable saslauthd.service
151
152install-sendmail: create-dirs
153 install -m ${CONFMODE} blfs/default/sendmail ${DEFAULTSDIR}/
154 install -m ${CONFMODE} blfs/units/sm-client.service ${UNITSDIR}/
155 install -m ${CONFMODE} blfs/units/sendmail.service ${UNITSDIR}/
156 systemctl enable sendmail.service
157
158install-slapd: create-dirs
159 install -m ${CONFMODE} blfs/default/slapd ${DEFAULTSDIR}/
160 install -m ${CONFMODE} blfs/tmpfiles/slapd.conf ${TMPFILESDIR}/
161 install -m ${CONFMODE} blfs/units/slapd.service ${UNITSDIR}/
162 systemd-tmpfiles --create slapd.conf
163 systemctl enable slapd.service
164
165install-sshd: create-dirs
166 install -m ${CONFMODE} blfs/units/sshd.service ${UNITSDIR}/
167 install -m ${CONFMODE} blfs/units/sshdat.service ${UNITSDIR}/sshd@.service
168 install -m ${CONFMODE} blfs/units/sshd.socket ${UNITSDIR}/
169 systemctl enable sshd.service
170
171install-svnserve: create-dirs
172 install -m ${CONFMODE} blfs/default/svnserve ${DEFAULTSDIR}/
173 install -m ${CONFMODE} blfs/tmpfiles/svnserve.conf ${TMPFILESDIR}/
174 install -m ${CONFMODE} blfs/units/svnserve.service ${UNITSDIR}/
175 systemd-tmpfiles --create svnserve.conf
176 systemctl enable svnserve.service
177
178install-unbound: create-dirs
179 install -m ${CONFMODE} blfs/units/unbound.service ${UNITSDIR}/
180 systemctl enable unbound.service
181
182install-vsftpd: create-dirs
183 install -m ${CONFMODE} blfs/units/vsftpd.service ${UNITSDIR}/
184 systemctl enable vsftpd.service
185
186install-winbindd: install-samba
187 install -m ${CONFMODE} blfs/units/winbindd.service ${UNITSDIR}/
188 systemctl enable winbindd.service
189
190install-xinetd: create-dirs
191 install -m ${CONFMODE} blfs/units/xinetd.service ${UNITSDIR}/
192 systemctl enable xinetd.service
193
194uninstall-acpid:
195 systemctl stop acpid.service
196 systemctl disable acpid.socket
197 rm -f ${UNITSDIR}/acpid.service ${UNITSDIR}/acpid.socket
198
199uninstall-dhcpd:
200 systemctl stop dhcpd.service
201 systemctl disable dhcpd.service
202 rm -f ${DEFAULTSDIR}/dhcpd ${UNITSDIR}/dhcpd.service
203
204uninstall-exim:
205 systemctl stop exim.service
206 systemctl disable exim.service
207 rm -f ${UNITSDIR}/exim.service
208
209uninstall-git:
210 systemctl stop git-daemon.socket
211 systemctl disable git-daemon.socket
212 rm -f ${UNITSDIR}/git-daemon@.service ${UNITSDIR}/git-daemon.socket
213
214uninstall-gpm:
215 systemctl stop gpm.service
216 systemctl disable gpm.service
217 rm -f ${UNITSDIR}/gpm.service
218
219uninstall-httpd:
220 systemctl stop httpd.service
221 systemctl disable httpd.service
222 rm -f ${TMPFILESDIR}/httpd.conf ${UNITSDIR}/httpd.service
223
224uninstall-kdm:
225 systemctl stop kdm.service
226 systemctl disable kdm.service
227 rm -f ${UNITSDIR}/kdm.service
228
229uninstall-krb5:
230 systemctl stop krb5-kadmind.service
231 systemctl stop krb5-kpropd.service
232 systemctl stop krb5-kdc.service
233 systemctl disable krb5-kadmind.service
234 systemctl disable krb5-kpropd.service
235 systemctl disable krb5-kdc.service
236 rm -f ${UNITSDIR}/krb5-kadmind.service ${UNITSDIR}/krb5-kpropd.service ${UNITSDIR}/krb5-kdc.service
237
238uninstall-mysqld:
239 systemctl stop mysqld.service
240 systemctl disable mysqld.service
241 rm -f ${TMPFILESDIR}/mysqld.conf ${UNITSDIR}/mysqld.service
242
243uninstall-named:
244 systemctl stop named.service
245 systemctl disable named.service
246 rm -f ${TMPFILESDIR}/named.conf ${UNITSDIR}/named.service
247
248uninstall-nfs-client: uninstall-nfs-server
249 systemctl stop rpc-statd.service
250 systemctl disable rpc-statd.service
251 systemctl disable nfs-client.target
252 rm -f ${DEFAULTSDIR}/nfs-utils ${UNITSDIR}/rpc-statd.service
253 rm -f ${UNITSDIR}/nfs-client.target
254
255uninstall-nfs-server:
256 [ -e ${UNITSDIR}/rpc-mountd.service ] && systemctl stop rpc-mountd.service
257 [ -e ${UNITSDIR}/nfsd.service ] && systemctl stop nfsd.service
258 systemctl disable rpc-mountd.service
259 systemctl disable nfsd.service
260 systemctl disable nfs-server.target
261 rm -f ${UNITSDIR}/nfsd.service ${UNITSDIR}/rpc-mountd.service
262 rm -f ${UNITSDIR}/nfs-server.target ${UNITSDIR}/proc-fs-nfsd.mount
263
264uninstall-ntpd:
265 systemctl stop ntpd.service
266 systemctl disable ntpd.service
267 rm -f ${UNITSDIR}/ntpd.service ${DESTDIR}/usr/lib/systemd/ntp-units.d/ntp.list
268
269uninstall-postfix:
270 systemctl stop postfix.service
271 systemctl disable postfix.service
272 rm -f ${UNITSDIR}/postfix.service
273
274uninstall-postgresql:
275 systemctl stop postgresql.service
276 systemctl disable postgresql.service
277 rm -f ${TMPFILESDIR}/postgresql.conf ${UNITSDIR}/postgresql.service
278
279uninstall-proftpd:
280 systemctl stop proftpd.service
281 systemctl disable proftpd.service
282 rm -f ${UNITSDIR}/proftpd.service
283
284uninstall-rpcbind:
285 systemctl stop rpcbind.service
286 systemctl disable rpcbind.service
287 rm -f ${UNITSDIR}/rpcbind.service
288
289uninstall-rsyncd:
290 systemctl stop rsyncd.socket
291 systemctl stop rsyncd.service
292 rm -f ${UNITSDIR}/rsyncd.service ${UNITSDIR}/rsyncd@.service
293 rm -f ${UNITSDIR}/rsyncd.socket
294
295uninstall-samba: uninstall-winbindd
296 systemctl stop smbd.socket
297 systemctl stop smbd.service
298 systemctl stop nmbd.service
299 systemctl disable smbd.socket
300 systemctl disable smbd.service
301 systemctl disable nmbd.service
302 rm -f ${DEFAULTSDIR}/samba ${TMPFILESDIR}/samba.conf ${UNITSDIR}/nmbd.service
303 rm -f ${UNITSDIR}/smbd.service ${UNITSDIR}/smbd@.service ${UNITSDIR}/smbd.socket
304
305uninstall-saslauthd:
306 systemctl stop saslauthd.service
307 systemctl disable saslauthd.service
308 rm -f ${DEFAULTSDIR}/saslauthd ${TMPFILESDIR}/saslauthd.conf ${UNITSDIR}/saslauthd.service
309
310uninstall-sendmail:
311 systemctl stop sendmail.service
312 systemctl disable sendmail.service
313 rm -f ${DEFAULTSDIR}/sendmail ${UNITSDIR}/sm-client.service ${UNITSDIR}/sendmail.service
314
315uninstall-slapd:
316 systemctl stop slapd.service
317 systemctl disable slapd.service
318 rm -f ${DEFAULTSDIR}/slapd ${TMPFILESDIR}/slapd.conf ${UNITSDIR}/slapd.service
319
320uninstall-sshd:
321 systemctl stop sshd.socket
322 systemctl stop sshd.service
323 systemctl disable sshd.socket
324 systemctl disable sshd.service
325 rm -f ${UNITSDIR}/sshd.service ${UNITSDIR}/sshd@.service ${UNITSDIR}/sshd.socket
326
327uninstall-svnserve:
328 systemctl stop svnserve.service
329 systemctl disable svnserve.service
330 rm -f ${DEFAULTSDIR}/svnserve ${TMPFILESDIR}/svnserve.conf ${UNITSDIR}/svnserve.service
331
332uninstall-unbound:
333 systemctl stop unbound.service
334 systemctl disable unbound.service
335 rm -f ${UNITSDIR}/unbound.service
336
337uninstall-vsftpd:
338 systemctl stop vsftpd.service
339 systemctl disable vsftpd.service
340 rm -f ${UNITSDIR}/vsftpd.service
341
342uninstall-winbindd:
343 systemctl stop winbindd.service
344 systemctl disable winbindd.service
345 rm -f ${UNITSDIR}/winbindd.service
346
347uninstall-xinetd:
348 systemctl stop xinetd.service
349 systemctl disable xinetd.service
350 rm -f ${UNITSDIR}/xinetd.service
351
352.PHONY: all create-dirs create-service-dir \
353 install-service-dhclient \
354 install-service-dhcpcd \
355 install-service-bridge \
356 install-service-ipx \
357 install-service-pppoe \
358 install-service-wpa \
359 install-acpid \
360 install-dhcpd \
361 install-exim \
362 install-git \
363 install-gpm \
364 install-httpd \
365 install-kdm \
366 install-krb5 \
367 install-mysqld \
368 install-named \
369 install-nfs-client \
370 install-nfs-server \
371 install-ntp \
372 install-postfix \
373 install-postgresql \
374 install-proftpd \
375 install-rpcbind \
376 install-rsyncd \
377 install-samba \
378 install-saslauthd \
379 install-sendmail \
380 install-slapd \
381 install-sshd \
382 install-svnserve \
383 install-unbound \
384 install-vsftpd \
385 install-winbindd \
386 install-xinetd \
387 uninstall-acpid \
388 uninstall-dhcpd \
389 uninstall-exim \
390 uninstall-git \
391 uninstall-gpm \
392 uninstall-httpd \
393 uninstall-kdm \
394 uninstall-krb5 \
395 uninstall-mysqld \
396 uninstall-named \
397 uninstall-nfs-client \
398 uninstall-nfs-server \
399 uninstall-ntpd \
400 uninstall-postfix \
401 uninstall-postgresql \
402 uninstall-proftpd \
403 uninstall-rpcbind \
404 uninstall-rsyncd \
405 uninstall-samba \
406 uninstall-saslauthd \
407 uninstall-sendmail \
408 uninstall-slapd \
409 uninstall-sshd \
410 uninstall-svnserve \
411 uninstall-unbound \
412 uninstall-vsftpd \
413 uninstall-winbindd \
414 uninstall-xinetd
Note: See TracBrowser for help on using the repository browser.