Code

rules: Do not install config_local.php and config.php.$PKG_VERSION.
[pkg-pnp4nagios.git] / debian / rules
index 1fcf7ba73b4f6716eb5433004beafffe4d70fc1e..149f56eef60942afbf0dd248a09a897bedc514f6 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)"
 
@@ -71,6 +70,7 @@ clean: unpatch
        [ ! -f Makefile ] || $(MAKE) distclean
 
        dh_clean
+       debconf-updatepo
 
 install: build
        dh_testdir
@@ -96,11 +96,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 +137,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
@@ -159,8 +158,9 @@ binary-indep: build install
        dh_testdir
        dh_testroot
        dh_installchangelogs -i ChangeLog
-       dh_installdocs -A -i AUTHORS README README.Debian
+       dh_installdocs -A -i AUTHORS README debian/README.Debian
        dh_installexamples -i
+       dh_installdebconf -i
        dh_installinit -i
        dh_installman -i
        dh_link -i
@@ -176,11 +176,11 @@ binary-arch: build install
        dh_testdir
        dh_testroot
        dh_installchangelogs -a ChangeLog
-       dh_installdocs -A -a AUTHORS README README.Debian
+       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_installman -a
        dh_link -a
        dh_strip -a
        dh_compress -a