2 # This file is used as the template to create the
3 # Makefile for the Debian/Ubuntu/Kubuntu specific installation.
5 # 21 March 2008 -- Kern Sibbald
7 # for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
11 INSTALL_PROGRAM = @INSTALL_PROGRAM@ -m 754
15 install: install-autostart
17 install-autostart: install-autostart-fd install-autostart-sd install-autostart-dir
20 @$(INSTALL_PROGRAM) ../../scripts/logrotate $(DESTDIR)/etc/logrotate.d/bacula
22 install-autostart-fd: uninstall-autostart-fd
23 @echo "Installing bacula-fd boot script ..."
24 @$(INSTALL_PROGRAM) bacula-fd $(DESTDIR)/etc/init.d/bacula-fd
25 @echo "Installing bacula-fd symlinks ..."
26 @if test x$(DESTDIR) = x ; then \
27 /usr/sbin/update-rc.d bacula-fd start 91 2 3 4 5 . stop 9 0 1 6 .; \
31 install-autostart-sd: uninstall-autostart-sd
32 @echo "Installing bacula-sd boot script ..."
33 @$(INSTALL_PROGRAM) bacula-sd $(DESTDIR)/etc/init.d/bacula-sd
34 @echo "Installing bacula-sd symlinks ..."
35 @if test "x$(DESTDIR)" = "x" ; then \
36 /usr/sbin/update-rc.d bacula-sd start 91 2 3 4 5 . stop 9 0 1 6 .; \
40 install-autostart-dir: uninstall-autostart-dir
41 @echo "Installing bacula-dir boot script ..."
42 @$(INSTALL_PROGRAM) bacula-dir $(DESTDIR)/etc/init.d/bacula-dir
43 @echo "Installing bacula-dir symlinks ..."
44 @if test "x$(DESTDIR)" = "x" ; then \
45 /usr/sbin/update-rc.d bacula-dir start 90 2 3 4 5 . stop 9 0 1 6 .; \
49 uninstall: uninstall-autostart
51 uninstall-autostart: uninstall-autostart-fd uninstall-autostart-sd uninstall-autostart-dir
54 @rm -f $(DESTDIR)/etc/logrotate.d/bacula
56 uninstall-autostart-fd:
57 @if test "x$(DESTDIR)" = "x" -a -f /etc/init.d/bacula-fd; then \
58 /etc/init.d/bacula-fd stop; \
59 rm -f $(DESTDIR)/etc/init.d/bacula-fd; \
60 /usr/sbin/update-rc.d bacula-fd remove; \
64 uninstall-autostart-sd:
65 @if test "x$(DESTDIR)" = "x" -a -f /etc/init.d/bacula-sd; then \
66 /etc/init.d/bacula-sd stop; \
67 rm -f $(DESTDIR)/etc/init.d/bacula-sd; \
68 /usr/sbin/update-rc.d bacula-sd remove; \
71 uninstall-autostart-dir:
72 @if test "x$(DESTDIR)" = "x" -a -f /etc/init.d/bacula-dir; then \
73 /etc/init.d/bacula-dir stop; \
74 rm -f $(DESTDIR)/etc/init.d/bacula-dir; \
75 /usr/sbin/update-rc.d bacula-dir remove; \
77 @rm -f $(DESTDIR)/etc/init.d/bacula-dir
84 @rm -f bacula-sd bacula-fd bacula-dir
88 @rm -f bacula-sd bacula-fd bacula-dir