Code

-bin.pnp_gearman_worker.{default,init}: Init script for Gearman worker.
[pkg-pnp4nagios.git] / debian / rules
index 4630b6afb989229c3e2fe0d93f6abca498f14176..9f9611aa186511ef772dc2ff2b68e6af34dd8967 100755 (executable)
@@ -32,11 +32,10 @@ config.status: configure
 
        ./configure $(CROSS) \
                                --with-layout=debian \
-                               --prefix=/usr \
-                               --mandir=\$${prefix}/share/man \
-                               --infodir=\$${prefix}/share/info \
+                               --mandir=/usr/share/man \
+                               --infodir=/usr/share/info \
                                --without-kohana \
-                               --with-kohana_system=/usr/share/php/kohana/system \
+                               --with-kohana_system=/usr/share/php/kohana2/system \
                                --with-httpd-conf=/etc/apache2/conf.d \
                                CFLAGS="$(CFLAGS)"
 
@@ -70,7 +69,10 @@ clean: unpatch
 
        [ ! -f Makefile ] || $(MAKE) distclean
 
+       rm -f scripts/rc.pnp_gearman_worker
+
        dh_clean
+       debconf-updatepo
 
 install: build
        dh_testdir
@@ -96,11 +98,6 @@ install: build
        mkdir -p debian/tmp/usr/sbin/
        mv debian/tmp/usr/bin/npcd \
                debian/tmp/usr/sbin/
-       mv debian/tmp/etc/pnp4nagios/npcd.cfg-sample \
-               debian/tmp/etc/pnp4nagios/npcd.cfg
-
-       mv debian/tmp/etc/pnp4nagios/process_perfdata.cfg-sample \
-               debian/tmp/etc/pnp4nagios/process_perfdata.cfg
 
        mv debian/tmp/etc/pnp4nagios/rra.cfg-sample \
                debian/tmp/etc/pnp4nagios/rra.cfg
@@ -142,6 +139,10 @@ install: build
 
        cp -av sample-config/httpd.conf debian/tmp/etc/pnp4nagios/apache.conf
 
+       # Remove unnecessary config files (duplicates)
+       rm -f debian/tmp/etc/pnp4nagios/config_local.php
+       rm -f debian/tmp/etc/pnp4nagios/config.php.0.6*
+
        # Add subdirs to /var/spool/pnp4nagios/ to prepare for different modes
        mkdir debian/tmp/var/spool/pnp4nagios/nagios
        mkdir debian/tmp/var/spool/pnp4nagios/npcd
@@ -161,6 +162,7 @@ binary-indep: build install
        dh_installchangelogs -i ChangeLog
        dh_installdocs -A -i AUTHORS README debian/README.Debian
        dh_installexamples -i
+       dh_installdebconf -i
        dh_installinit -i
        dh_installman -i
        dh_link -i
@@ -178,9 +180,10 @@ binary-arch: build install
        dh_installchangelogs -a ChangeLog
        dh_installdocs -A -a AUTHORS README debian/README.Debian
        dh_installexamples -a
+       dh_installdebconf -a
        dh_installinit -ppnp4nagios-bin --name=npcd
-       dh_installinit -a -Npnp4nagios-bin
-       dh_installman -a man/npcd.8
+       dh_installinit -ppnp4nagios-bin --name=pnp_gearman_worker
+       dh_installman -a
        dh_link -a
        dh_strip -a
        dh_compress -a