2 # Copyright (C) 2000-2015 Kern Sibbald
3 # License: BSD 2-Clause; see file LICENSE-FOSS
5 # This file is used as the template to create the
6 # Makefile for the Debian/Ubuntu/Kubuntu specific installation.
8 # 21 March 2008 -- Kern Sibbald
10 # for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
14 INSTALL_PROGRAM = @INSTALL_PROGRAM@ -m 754
18 install: install-autostart
20 install-autostart: install-autostart-fd install-autostart-sd install-autostart-dir
23 @$(INSTALL_PROGRAM) ../../scripts/logrotate $(DESTDIR)/etc/logrotate.d/bacula
25 install-autostart-fd: uninstall-autostart-fd
26 @echo "Installing bacula-fd boot script ..."
27 @$(INSTALL_PROGRAM) bacula-fd $(DESTDIR)/etc/init.d/bacula-fd
28 @echo "Installing bacula-fd symlinks ..."
29 @if test x$(DESTDIR) = x ; then \
30 /usr/sbin/update-rc.d bacula-fd start 91 2 3 4 5 . stop 9 0 1 6 .; \
34 install-autostart-sd: uninstall-autostart-sd
35 @echo "Installing bacula-sd boot script ..."
36 @$(INSTALL_PROGRAM) bacula-sd $(DESTDIR)/etc/init.d/bacula-sd
37 @echo "Installing bacula-sd symlinks ..."
38 @if test "x$(DESTDIR)" = "x" ; then \
39 /usr/sbin/update-rc.d bacula-sd start 91 2 3 4 5 . stop 9 0 1 6 .; \
43 install-autostart-dir: uninstall-autostart-dir
44 @echo "Installing bacula-dir boot script ..."
45 @$(INSTALL_PROGRAM) bacula-dir $(DESTDIR)/etc/init.d/bacula-dir
46 @echo "Installing bacula-dir symlinks ..."
47 @if test "x$(DESTDIR)" = "x" ; then \
48 /usr/sbin/update-rc.d bacula-dir start 90 2 3 4 5 . stop 9 0 1 6 .; \
52 uninstall: uninstall-autostart
54 uninstall-autostart: uninstall-autostart-fd uninstall-autostart-sd uninstall-autostart-dir
57 @rm -f $(DESTDIR)/etc/logrotate.d/bacula
59 uninstall-autostart-fd:
60 @if test "x$(DESTDIR)" = "x" -a -f /etc/init.d/bacula-fd; then \
61 /etc/init.d/bacula-fd stop; \
62 rm -f $(DESTDIR)/etc/init.d/bacula-fd; \
63 /usr/sbin/update-rc.d bacula-fd remove; \
67 uninstall-autostart-sd:
68 @if test "x$(DESTDIR)" = "x" -a -f /etc/init.d/bacula-sd; then \
69 /etc/init.d/bacula-sd stop; \
70 rm -f $(DESTDIR)/etc/init.d/bacula-sd; \
71 /usr/sbin/update-rc.d bacula-sd remove; \
74 uninstall-autostart-dir:
75 @if test "x$(DESTDIR)" = "x" -a -f /etc/init.d/bacula-dir; then \
76 /etc/init.d/bacula-dir stop; \
77 rm -f $(DESTDIR)/etc/init.d/bacula-dir; \
78 /usr/sbin/update-rc.d bacula-dir remove; \
80 @rm -f $(DESTDIR)/etc/init.d/bacula-dir
87 @rm -f bacula-sd bacula-fd bacula-dir
91 @rm -f bacula-sd bacula-fd bacula-dir