2 # This file is used as the template to create the
3 # Makefile for the RedHat specific installation.
5 # 15 November 2001 -- 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
23 @if test x$(DESTDIR) = x -a -f /etc/rc.d/init.d/bacula-fd; then \
24 /sbin/chkconfig --del bacula-fd; \
26 @$(INSTALL_PROGRAM) bacula-fd $(DESTDIR)/etc/rc.d/init.d/bacula-fd
27 # set symlinks for script at startup and shutdown
28 @if test x$(DESTDIR) = x ; then \
29 /sbin/chkconfig --add bacula-fd; \
34 @if test x$(DESTDIR) = x -a -f /etc/rc.d/init.d/bacula-sd; then \
35 /sbin/chkconfig --del bacula-sd; \
37 @$(INSTALL_PROGRAM) bacula-sd $(DESTDIR)/etc/rc.d/init.d/bacula-sd
38 # set symlinks for script at startup and shutdown
39 @if test x$(DESTDIR) = x ; then \
40 /sbin/chkconfig --add bacula-sd; \
44 install-autostart-dir:
45 @if test x$(DESTDIR) = x -a -f /etc/rc.d/init.d/bacula-dir; then \
46 /sbin/chkconfig --del bacula-dir; \
48 @$(INSTALL_PROGRAM) bacula-dir $(DESTDIR)/etc/rc.d/init.d/bacula-dir
49 # set symlinks for script at startup and shutdown
50 @if test x$(DESTDIR) = x ; then \
51 /sbin/chkconfig --add bacula-dir; \
55 uninstall: uninstall-autostart
57 uninstall-autostart: uninstall-autostart-fd uninstall-autostart-sd uninstall-autostart-dir
60 @rm -f $(DESTDIR)/etc/logrotate.d/bacula
62 uninstall-autostart-fd:
63 @if test x$(DESTDIR) = x -a -f /etc/rc.d/init.d/bacula-fd; then \
64 /sbin/chkconfig --del bacula-fd; \
66 @rm -f $(DESTDIR)/etc/rc.d/init.d/bacula-fd
69 uninstall-autostart-sd:
70 @if test x$(DESTDIR) = x -a -f /etc/rc.d/init.d/bacula-sd; then \
71 /sbin/chkconfig --del bacula-sd; \
73 @rm -f $(DESTDIR)/etc/rc.d/init.d/bacula-sd
75 uninstall-autostart-dir:
76 @if test x$(DESTDIR) = x -a -f /etc/rc.d/init.d/bacula-dir; then \
77 /sbin/chkconfig --del bacula-dir; \
79 @rm -f $(DESTDIR)/etc/rc.d/init.d/bacula-dir
85 @rm -f Makefile bacula-*.spec bacula.*.spec bacula.spec
86 @rm -f bacula-sd bacula-fd bacula-dir
89 @rm -f Makefile bacula-*.spec bacula.*.spec bacula.spec
90 @rm -f bacula-sd bacula-fd bacula-dir