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@
15 install: install-autostart
17 install-autostart: install-autostart-fd install-autostart-sd install-autostart-dir
21 @if test -f $(DESTDIR)/etc/rc.d/init.d/bacula-fd; then \
22 /sbin/chkconfig --del bacula-fd; \
24 @$(INSTALL_PROGRAM) -m 744 bacula-fd $(DESTDIR)/etc/rc.d/init.d/bacula-fd
25 # set symlinks for script at startup and shutdown
26 @/sbin/chkconfig --add bacula-fd
30 @if test -f $(DESTDIR)/etc/rc.d/init.d/bacula-sd; then \
31 /sbin/chkconfig --del bacula-sd; \
33 @$(INSTALL_PROGRAM) -m 744 bacula-sd $(DESTDIR)/etc/rc.d/init.d/bacula-sd
34 # set symlinks for script at startup and shutdown
35 @/sbin/chkconfig --add bacula-sd
38 install-autostart-dir:
39 @if test -f $(DESTDIR)/etc/rc.d/init.d/bacula-dir; then \
40 /sbin/chkconfig --del bacula-dir; \
42 @$(INSTALL_PROGRAM) -m 744 bacula-dir $(DESTDIR)/etc/rc.d/init.d/bacula-dir
43 # set symlinks for script at startup and shutdown
44 @/sbin/chkconfig --add bacula-dir
47 uninstall: uninstall-autostart
49 uninstall-autostart: uninstall-autostart-fd uninstall-autostart-sd uninstall-autostart-dir
51 uninstall-autostart-fd:
52 @if test -f $(DESTDIR)/etc/rc.d/init.d/bacula-fd; then \
53 /sbin/chkconfig --del bacula-fd; \
55 @rm -f $(DESTDIR)/etc/rc.d/init.d/bacula-fd
58 uninstall-autostart-sd:
59 @if test -f $(DESTDIR)/etc/rc.d/init.d/bacula-sd; then \
60 /sbin/chkconfig --del bacula-sd; \
62 @rm -f $(DESTDIR)/etc/rc.d/init.d/bacula-sd
64 uninstall-autostart-dir:
65 @if test -f $(DESTDIR)/etc/rc.d/init.d/bacula-dir; then \
66 /sbin/chkconfig --del bacula-dir; \
68 @rm -f $(DESTDIR)/etc/rc.d/init.d/bacula-dir
73 @rm -f Makefile bacula-*.spec bacula.*.spec
74 @rm -f bacula-sd bacula-fd bacula-dir