source: systemd-units/Makefile@ 31973174

systemd-13485
Last change on this file since 31973174 was ac38e9dc, checked in by Douglas R. Reno <renodr@…>, 9 years ago

Import back into SVN from Github

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

  • Property mode set to 100644
File size: 16.8 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 test -n "${DESTDIR}" || systemctl enable acpid.socket
41
42install-dhclient: create-dirs
43 install -m ${CONFMODE} blfs/units/dhclientat.service ${UNITSDIR}/dhclient@.service
44
45install-dhcpcd: create-dirs
46 install -m ${CONFMODE} blfs/units/dhcpcdat.service ${UNITSDIR}/dhcpcd@.service
47
48install-dhcpd: create-dirs
49 install -m ${CONFMODE} blfs/default/dhcpd ${DEFAULTSDIR}/
50 install -m ${CONFMODE} blfs/units/dhcpd.service ${UNITSDIR}/
51 test -n "${DESTDIR}" || systemctl enable dhcpd.service
52
53install-exim: create-dirs
54 install -m ${CONFMODE} blfs/units/exim.service ${UNITSDIR}/
55 test -n "${DESTDIR}" || systemctl enable exim.service
56
57install-git: create-dirs
58 install -m ${CONFMODE} blfs/units/git-daemonat.service ${UNITSDIR}/git-daemon@.service
59 install -m ${CONFMODE} blfs/units/git-daemon.socket ${UNITSDIR}/
60 test -n "${DESTDIR}" || systemctl enable git-daemon.socket
61
62install-gpm: create-dirs
63 install -m ${CONFMODE} blfs/units/gpm.service ${UNITSDIR}/
64 test -n "${DESTDIR}" || systemctl enable gpm.service
65
66install-haveged: create-dirs
67 install -m ${CONFMODE} blfs/units/haveged.service ${UNITSDIR}/
68 test -n "${DESTDIR}" || systemctl enable haveged.service
69
70install-httpd: create-dirs
71 install -m ${CONFMODE} blfs/tmpfiles/httpd.conf ${TMPFILESDIR}/
72 install -m ${CONFMODE} blfs/units/httpd.service ${UNITSDIR}/
73 systemd-tmpfiles --create httpd.conf
74 test -n "${DESTDIR}" || systemctl enable httpd.service
75
76install-iptables: create-dirs
77 install -m ${CONFMODE} blfs/units/iptables.service ${UNITSDIR}/
78 test -n "${DESTDIR}" || systemctl enable iptables.service
79
80install-kdm: create-dirs
81 install -m ${CONFMODE} blfs/units/kdm.service ${UNITSDIR}/
82 test -n "${DESTDIR}" || systemctl enable kdm.service
83
84install-krb5: create-dirs
85 install -m ${CONFMODE} blfs/units/krb5-kdc.service ${UNITSDIR}/
86 install -m ${CONFMODE} blfs/units/krb5-kpropd.service ${UNITSDIR}/
87 install -m ${CONFMODE} blfs/units/krb5-kadmind.service ${UNITSDIR}/
88 test -n "${DESTDIR}" || systemctl enable krb5-kdc.service
89 test -n "${DESTDIR}" || systemctl enable krb5-kpropd.service
90 test -n "${DESTDIR}" || systemctl enable krb5-kadmind.service
91
92install-mysqld: create-dirs
93 install -m ${CONFMODE} blfs/tmpfiles/mysqld.conf ${TMPFILESDIR}/
94 install -m ${CONFMODE} blfs/units/mysqld.service ${UNITSDIR}/
95 systemd-tmpfiles --create mysqld.conf
96 test -n "${DESTDIR}" || systemctl enable mysqld.service
97
98install-named: create-dirs
99 install -m ${CONFMODE} blfs/tmpfiles/named.conf ${TMPFILESDIR}/
100 install -m ${CONFMODE} blfs/units/named.service ${UNITSDIR}/
101 systemd-tmpfiles --create named.conf
102 test -n "${DESTDIR}" || systemctl enable named.service
103
104install-nfs-client: create-dirs
105 install -m ${CONFMODE} blfs/default/nfs-utils ${DEFAULTSDIR}/
106 install -m ${CONFMODE} blfs/units/rpc-statd.service ${UNITSDIR}/
107 install -m ${CONFMODE} blfs/units/rpc-statd-notify.service ${UNITSDIR}/
108 install -m ${CONFMODE} blfs/units/nfs-client.service ${UNITSDIR}/
109 install -m ${CONFMODE} blfs/units/nfs-client.target ${UNITSDIR}/
110 test -n "${DESTDIR}" || systemctl enable nfs-client.target
111
112install-nfs-server: install-nfs-client
113 install -m ${CONFMODE} blfs/units/nfs-server.service ${UNITSDIR}/
114 install -m ${CONFMODE} blfs/units/rpc-mountd.service ${UNITSDIR}/
115 install -m ${CONFMODE} blfs/units/proc-fs-nfsd.mount ${UNITSDIR}/
116 test -n "${DESTDIR}" || systemctl enable nfs-server.service
117
118install-nfsv4-server: install-nfs-server
119 install -m ${CONFMODE} blfs/units/rpc-idmapd.service ${UNITSDIR}/
120 install -m ${CONFMODE} blfs/units/var-lib-nfs-rpc_pipefs.mount ${UNITSDIR}/
121
122install-ntpd: create-dirs
123 install -m ${CONFMODE} blfs/units/ntpd.service ${UNITSDIR}/
124 install -d -m ${DIRMODE} ${DESTDIR}/usr/lib/systemd/ntp-units.d
125 test -n "${DESTDIR}" || systemctl enable ntpd.service
126
127install-php-fpm: create-dirs
128 install -m ${CONFMODE} blfs/units/php-fpm.service ${UNITSDIR}/
129 test -n "${DESTDIR}" || systemctl enable php-fpm.service
130
131install-postfix: create-dirs
132 install -m ${CONFMODE} blfs/units/postfix.service ${UNITSDIR}/
133 test -n "${DESTDIR}" || systemctl enable postfix.service
134
135install-postgresql: create-dirs
136 install -m ${CONFMODE} blfs/tmpfiles/postgresql.conf ${TMPFILESDIR}/
137 install -m ${CONFMODE} blfs/units/postgresql.service ${UNITSDIR}/
138 systemd-tmpfiles --create postgresql.conf
139 test -n "${DESTDIR}" || systemctl enable postgresql.service
140
141install-proftpd: create-dirs
142 install -m ${CONFMODE} blfs/units/proftpd.service ${UNITSDIR}/
143 test -n "${DESTDIR}" || systemctl enable proftpd.service
144
145install-rpcbind: create-dirs
146 install -m ${CONFMODE} blfs/units/rpcbind.service ${UNITSDIR}/
147 install -m ${CONFMODE} blfs/units/rpcbind.socket ${UNITSDIR}/
148 test -n "${DESTDIR}" || systemctl enable rpcbind.socket
149
150install-rsyncd: create-dirs
151 install -m ${CONFMODE} blfs/units/rsyncd.service ${UNITSDIR}/
152 install -m ${CONFMODE} blfs/units/rsyncdat.service ${UNITSDIR}/rsyncd@.service
153 install -m ${CONFMODE} blfs/units/rsyncd.socket ${UNITSDIR}/
154 test -n "${DESTDIR}" || systemctl enable rsyncd.service
155
156install-samba: create-dirs
157 install -m ${CONFMODE} blfs/default/samba ${DEFAULTSDIR}/
158 install -m ${CONFMODE} blfs/tmpfiles/samba.conf ${TMPFILESDIR}/
159 install -m ${CONFMODE} blfs/units/nmbd.service ${UNITSDIR}/
160 install -m ${CONFMODE} blfs/units/smbd.service ${UNITSDIR}/
161 install -m ${CONFMODE} blfs/units/smbdat.service ${UNITSDIR}/smbd@.service
162 install -m ${CONFMODE} blfs/units/smbd.socket ${UNITSDIR}/
163 systemd-tmpfiles --create samba.conf
164 test -n "${DESTDIR}" || systemctl enable nmbd.service
165 test -n "${DESTDIR}" || systemctl enable smbd.service
166
167install-saslauthd: create-dirs
168 install -m ${CONFMODE} blfs/default/saslauthd ${DEFAULTSDIR}/
169 install -m ${CONFMODE} blfs/tmpfiles/saslauthd.conf ${TMPFILESDIR}/
170 install -m ${CONFMODE} blfs/units/saslauthd.service ${UNITSDIR}/
171 systemd-tmpfiles --create saslauthd.conf
172 test -n "${DESTDIR}" || systemctl enable saslauthd.service
173
174install-sendmail: create-dirs
175 install -m ${CONFMODE} blfs/default/sendmail ${DEFAULTSDIR}/
176 install -m ${CONFMODE} blfs/units/sm-client.service ${UNITSDIR}/
177 install -m ${CONFMODE} blfs/units/sendmail.service ${UNITSDIR}/
178 test -n "${DESTDIR}" || systemctl enable sendmail.service
179
180install-slapd: create-dirs
181 install -m ${CONFMODE} blfs/default/slapd ${DEFAULTSDIR}/
182 install -m ${CONFMODE} blfs/tmpfiles/slapd.conf ${TMPFILESDIR}/
183 install -m ${CONFMODE} blfs/units/slapd.service ${UNITSDIR}/
184 systemd-tmpfiles --create slapd.conf
185 test -n "${DESTDIR}" || systemctl enable slapd.service
186
187install-sshd: create-dirs
188 install -m ${CONFMODE} blfs/units/sshd.service ${UNITSDIR}/
189 install -m ${CONFMODE} blfs/units/sshdat.service ${UNITSDIR}/sshd@.service
190 install -m ${CONFMODE} blfs/units/sshd.socket ${UNITSDIR}/
191 test -n "${DESTDIR}" || systemctl enable sshd.service
192
193install-svnserve: create-dirs
194 install -m ${CONFMODE} blfs/default/svnserve ${DEFAULTSDIR}/
195 install -m ${CONFMODE} blfs/tmpfiles/svnserve.conf ${TMPFILESDIR}/
196 install -m ${CONFMODE} blfs/units/svnserve.service ${UNITSDIR}/
197 systemd-tmpfiles --create svnserve.conf
198 test -n "${DESTDIR}" || systemctl enable svnserve.service
199
200install-unbound: create-dirs
201 install -m ${CONFMODE} blfs/units/unbound.service ${UNITSDIR}/
202 test -n "${DESTDIR}" || systemctl enable unbound.service
203
204install-vsftpd: create-dirs
205 install -m ${CONFMODE} blfs/units/vsftpd.service ${UNITSDIR}/
206 test -n "${DESTDIR}" || systemctl enable vsftpd.service
207
208install-winbindd: install-samba
209 install -m ${CONFMODE} blfs/units/winbindd.service ${UNITSDIR}/
210 test -n "${DESTDIR}" || systemctl enable winbindd.service
211
212install-xinetd: create-dirs
213 install -m ${CONFMODE} blfs/units/xinetd.service ${UNITSDIR}/
214 test -n "${DESTDIR}" || systemctl enable xinetd.service
215
216uninstall-acpid:
217 test -n "${DESTDIR}" || systemctl stop acpid.service
218 test -n "${DESTDIR}" || systemctl disable acpid.socket
219 rm -f ${UNITSDIR}/acpid.service ${UNITSDIR}/acpid.socket
220
221uninstall-dhclient:
222 rm -f ${UNITSDIR}/dhclient@.service
223
224uninstall-dhcpcd:
225 rm -f ${UNITSDIR}/dhcpcd@.service
226
227uninstall-dhcpd:
228 test -n "${DESTDIR}" || systemctl stop dhcpd.service
229 test -n "${DESTDIR}" || systemctl disable dhcpd.service
230 rm -f ${DEFAULTSDIR}/dhcpd ${UNITSDIR}/dhcpd.service
231
232uninstall-exim:
233 test -n "${DESTDIR}" || systemctl stop exim.service
234 test -n "${DESTDIR}" || systemctl disable exim.service
235 rm -f ${UNITSDIR}/exim.service
236
237uninstall-git:
238 test -n "${DESTDIR}" || systemctl stop git-daemon.socket
239 test -n "${DESTDIR}" || systemctl disable git-daemon.socket
240 rm -f ${UNITSDIR}/git-daemon@.service ${UNITSDIR}/git-daemon.socket
241
242uninstall-gpm:
243 test -n "${DESTDIR}" || systemctl stop gpm.service
244 test -n "${DESTDIR}" || systemctl disable gpm.service
245 rm -f ${UNITSDIR}/gpm.service
246
247uninstall-haveged:
248 test -n "${DESTDIR}" || systemctl stop haveged.service
249 test -n "${DESTDIR}" || systemctl disable haveged.service
250 rm -f ${UNITSDIR}/haveged.service
251
252uninstall-httpd:
253 test -n "${DESTDIR}" || systemctl stop httpd.service
254 test -n "${DESTDIR}" || systemctl disable httpd.service
255 rm -f ${TMPFILESDIR}/httpd.conf ${UNITSDIR}/httpd.service
256
257uninstall-iptables:
258 test -n "${DESTDIR}" || systemctl disable iptables.service
259 rm -f ${UNITSDIR}/iptables.service
260
261uninstall-kdm:
262 test -n "${DESTDIR}" || systemctl stop kdm.service
263 test -n "${DESTDIR}" || systemctl disable kdm.service
264 rm -f ${UNITSDIR}/kdm.service
265
266uninstall-krb5:
267 test -n "${DESTDIR}" || systemctl stop krb5-kadmind.service
268 test -n "${DESTDIR}" || systemctl stop krb5-kpropd.service
269 test -n "${DESTDIR}" || systemctl stop krb5-kdc.service
270 test -n "${DESTDIR}" || systemctl disable krb5-kadmind.service
271 test -n "${DESTDIR}" || systemctl disable krb5-kpropd.service
272 test -n "${DESTDIR}" || systemctl disable krb5-kdc.service
273 rm -f ${UNITSDIR}/krb5-kadmind.service ${UNITSDIR}/krb5-kpropd.service ${UNITSDIR}/krb5-kdc.service
274
275uninstall-mysqld:
276 test -n "${DESTDIR}" || systemctl stop mysqld.service
277 test -n "${DESTDIR}" || systemctl disable mysqld.service
278 rm -f ${TMPFILESDIR}/mysqld.conf ${UNITSDIR}/mysqld.service
279
280uninstall-named:
281 test -n "${DESTDIR}" || systemctl stop named.service
282 test -n "${DESTDIR}" || systemctl disable named.service
283 rm -f ${TMPFILESDIR}/named.conf ${UNITSDIR}/named.service
284
285uninstall-nfs-client: uninstall-nfs-server
286 test -n "${DESTDIR}" || systemctl stop nfs-client.target
287 test -n "${DESTDIR}" || systemctl disable nfs-client.target
288 rm -f ${DEFAULTSDIR}/nfs-utils ${UNITSDIR}/nfs-client.target
289 rm -f ${UNITSDIR}/nfs-client.service ${UNITSDIR}/rpc-statd.service ${UNITSDIR}/rpc-statd-notify.service
290
291uninstall-nfs-server: uninstall-nfsv4-server
292 if [[ -z "${DESTDIR}" ]]; then test -e "${UNITSDIR}/nfs-server.service" && systemctl stop nfs-server.service; fi
293 if [[ -z "${DESTDIR}" ]]; then test -e "${UNITSDIR}/nfs-server.service" && systemctl disable nfs-server.service; fi
294 rm -f ${UNITSDIR}/nfs-server.service ${UNITSDIR}/rpc-mountd.service
295 rm -f ${UNITSDIR}/proc-fs-nfsd.mount
296
297uninstall-nfsv4-server:
298 rm -f ${UNITSDIR}/rpc-idmapd.service
299 rm -f ${UNITSDIR}/var-lib-nfs-rpc_pipefs.mount
300
301uninstall-ntpd:
302 test -n "${DESTDIR}" || systemctl stop ntpd.service
303 test -n "${DESTDIR}" || systemctl disable ntpd.service
304 rm -f ${UNITSDIR}/ntpd.service
305
306uninstall-php-fpm:
307 test -n "${DESTDIR}" || systemctl stop php-fpm.service
308 test -n "${DESTDIR}" || systemctl disable php-fpm.service
309 rm -f ${UNITSDIR}/php-fpm.service
310
311uninstall-postfix:
312 test -n "${DESTDIR}" || systemctl stop postfix.service
313 test -n "${DESTDIR}" || systemctl disable postfix.service
314 rm -f ${UNITSDIR}/postfix.service
315
316uninstall-postgresql:
317 test -n "${DESTDIR}" || systemctl stop postgresql.service
318 test -n "${DESTDIR}" || systemctl disable postgresql.service
319 rm -f ${TMPFILESDIR}/postgresql.conf ${UNITSDIR}/postgresql.service
320
321uninstall-proftpd:
322 test -n "${DESTDIR}" || systemctl stop proftpd.service
323 test -n "${DESTDIR}" || systemctl disable proftpd.service
324 rm -f ${UNITSDIR}/proftpd.service
325
326uninstall-rpcbind:
327 test -n "${DESTDIR}" || systemctl stop rpcbind.socket
328 test -n "${DESTDIR}" || systemctl disable rpcbind.socket
329 rm -f ${UNITSDIR}/rpcbind.service ${UNITSDIR}/rpcbind.socket
330
331uninstall-rsyncd:
332 test -n "${DESTDIR}" || systemctl stop rsyncd.socket
333 test -n "${DESTDIR}" || systemctl stop rsyncd.service
334 rm -f ${UNITSDIR}/rsyncd.service ${UNITSDIR}/rsyncd@.service
335 rm -f ${UNITSDIR}/rsyncd.socket
336
337uninstall-samba: uninstall-winbindd
338 test -n "${DESTDIR}" || systemctl stop smbd.socket
339 test -n "${DESTDIR}" || systemctl stop smbd.service
340 test -n "${DESTDIR}" || systemctl stop nmbd.service
341 test -n "${DESTDIR}" || systemctl disable smbd.socket
342 test -n "${DESTDIR}" || systemctl disable smbd.service
343 test -n "${DESTDIR}" || systemctl disable nmbd.service
344 rm -f ${DEFAULTSDIR}/samba ${TMPFILESDIR}/samba.conf ${UNITSDIR}/nmbd.service
345 rm -f ${UNITSDIR}/smbd.service ${UNITSDIR}/smbd@.service ${UNITSDIR}/smbd.socket
346
347uninstall-saslauthd:
348 test -n "${DESTDIR}" || systemctl stop saslauthd.service
349 test -n "${DESTDIR}" || systemctl disable saslauthd.service
350 rm -f ${DEFAULTSDIR}/saslauthd ${TMPFILESDIR}/saslauthd.conf ${UNITSDIR}/saslauthd.service
351
352uninstall-sendmail:
353 test -n "${DESTDIR}" || systemctl stop sendmail.service
354 test -n "${DESTDIR}" || systemctl disable sendmail.service
355 rm -f ${DEFAULTSDIR}/sendmail ${UNITSDIR}/sm-client.service ${UNITSDIR}/sendmail.service
356
357uninstall-slapd:
358 test -n "${DESTDIR}" || systemctl stop slapd.service
359 test -n "${DESTDIR}" || systemctl disable slapd.service
360 rm -f ${DEFAULTSDIR}/slapd ${TMPFILESDIR}/slapd.conf ${UNITSDIR}/slapd.service
361
362uninstall-sshd:
363 test -n "${DESTDIR}" || systemctl stop sshd.socket
364 test -n "${DESTDIR}" || systemctl stop sshd.service
365 test -n "${DESTDIR}" || systemctl disable sshd.socket
366 test -n "${DESTDIR}" || systemctl disable sshd.service
367 rm -f ${UNITSDIR}/sshd.service ${UNITSDIR}/sshd@.service ${UNITSDIR}/sshd.socket
368
369uninstall-svnserve:
370 test -n "${DESTDIR}" || systemctl stop svnserve.service
371 test -n "${DESTDIR}" || systemctl disable svnserve.service
372 rm -f ${DEFAULTSDIR}/svnserve ${TMPFILESDIR}/svnserve.conf ${UNITSDIR}/svnserve.service
373
374uninstall-unbound:
375 test -n "${DESTDIR}" || systemctl stop unbound.service
376 test -n "${DESTDIR}" || systemctl disable unbound.service
377 rm -f ${UNITSDIR}/unbound.service
378
379uninstall-vsftpd:
380 test -n "${DESTDIR}" || systemctl stop vsftpd.service
381 test -n "${DESTDIR}" || systemctl disable vsftpd.service
382 rm -f ${UNITSDIR}/vsftpd.service
383
384uninstall-winbindd:
385 test -n "${DESTDIR}" || systemctl stop winbindd.service
386 test -n "${DESTDIR}" || systemctl disable winbindd.service
387 rm -f ${UNITSDIR}/winbindd.service
388
389uninstall-xinetd:
390 test -n "${DESTDIR}" || systemctl stop xinetd.service
391 test -n "${DESTDIR}" || systemctl disable xinetd.service
392 rm -f ${UNITSDIR}/xinetd.service
393
394.PHONY: all create-dirs create-service-dir \
395 install-acpid \
396 install-dhclient \
397 install-dhcpcd \
398 install-dhcpd \
399 install-exim \
400 install-git \
401 install-gpm \
402 install-httpd \
403 install-iptables \
404 install-kdm \
405 install-krb5 \
406 install-mysqld \
407 install-named \
408 install-nfs-client \
409 install-nfs-server \
410 install-nfsv4-server \
411 install-ntp \
412 install-php-fpm \
413 install-postfix \
414 install-postgresql \
415 install-proftpd \
416 install-rpcbind \
417 install-rsyncd \
418 install-samba \
419 install-saslauthd \
420 install-sendmail \
421 install-slapd \
422 install-sshd \
423 install-svnserve \
424 install-unbound \
425 install-vsftpd \
426 install-winbindd \
427 install-xinetd \
428 uninstall-acpid \
429 uninstall-dhclient \
430 uninstall-dhcpcd \
431 uninstall-dhcpd \
432 uninstall-exim \
433 uninstall-git \
434 uninstall-gpm \
435 uninstall-httpd \
436 uninstall-iptables \
437 uninstall-kdm \
438 uninstall-krb5 \
439 uninstall-mysqld \
440 uninstall-named \
441 uninstall-nfs-client \
442 uninstall-nfs-server \
443 uninstall-nfsv4-server \
444 uninstall-ntpd \
445 uninstall-php-fpm \
446 uninstall-postfix \
447 uninstall-postgresql \
448 uninstall-proftpd \
449 uninstall-rpcbind \
450 uninstall-rsyncd \
451 uninstall-samba \
452 uninstall-saslauthd \
453 uninstall-sendmail \
454 uninstall-slapd \
455 uninstall-sshd \
456 uninstall-svnserve \
457 uninstall-unbound \
458 uninstall-vsftpd \
459 uninstall-winbindd \
460 uninstall-xinetd
Note: See TracBrowser for help on using the repository browser.