source: systemd-units/Makefile@ 7178f6d

krejzi/svn
Last change on this file since 7178f6d was 7178f6d, checked in by Krejzi <krejzi@…>, 10 years ago

Rebrand. Import systemd-units from systemd branch. Reset changelog.

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

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