64 lines
2.2 KiB
Makefile
Executable File
64 lines
2.2 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
# -*- makefile -*-
|
|
# Sample debian/rules that uses debhelper.
|
|
#
|
|
# This file was originally written by Joey Hess and Craig Small.
|
|
# As a special exception, when this file is copied by dh-make into a
|
|
# dh-make output file, you may use that output file without restriction.
|
|
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
|
#
|
|
# Modified to make a template file for a multi-binary package with separated
|
|
# build-arch and build-indep targets by Bill Allombert 2001
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
#export DH_VERBOSE=1
|
|
|
|
# This has to be exported to make some magic below work.
|
|
export DH_OPTIONS
|
|
|
|
# smokeping doesn't like building with your locale
|
|
unexport LC_ALL
|
|
|
|
TMP=$(CURDIR)/debian/smokeping
|
|
|
|
SUBDIRS="doc etc htdocs lib bin"
|
|
|
|
override_dh_auto_configure:
|
|
dh_auto_configure -- --prefix=/usr --with-htdocs-dir=/usr/share/smokeping/www --bindir=/usr/sbin --sysconfdir=/usr/share/doc/smokeping/ --libdir=/usr/share/perl5
|
|
|
|
override_dh_auto_build:
|
|
dh_auto_build -- SUBDIRS=$(SUBDIRS)
|
|
|
|
override_dh_auto_test:
|
|
dh_auto_test -- SUBDIRS=$(SUBDIRS)
|
|
|
|
override_dh_auto_install:
|
|
dh_auto_install -- SUBDIRS=$(SUBDIRS)
|
|
|
|
# Move Perl modules to correct location
|
|
mkdir -p $(TMP)/usr/share/perl5
|
|
if [ -d $(TMP)/usr/lib/Smokeping ] || [ -f $(TMP)/usr/lib/Smokeping.pm ]; then \
|
|
mv -v $(TMP)/usr/lib/Smokeping* $(TMP)/usr/share/perl5/; \
|
|
fi
|
|
|
|
install -v -m 644 $(CURDIR)/htdocs/js/smokeping.js $(TMP)/usr/share/smokeping/www/js
|
|
|
|
mkdir -p $(TMP)/etc/smokeping/config.d
|
|
mkdir -p $(TMP)/usr/lib/cgi-bin
|
|
|
|
mv -v $(TMP)/usr/share/doc/smokeping/*.dist $(TMP)/etc/smokeping/
|
|
rename -v 's/\.dist$$//' $(TMP)/etc/smokeping/*.dist
|
|
rm -vf $(TMP)/usr/share/smokeping/smokeping.fcgi.dist
|
|
rm -vf $(TMP)/usr/share/perl5/BER.pm $(TMP)/usr/share/perl5/SNMP_*
|
|
mv -v $(TMP)/usr/sbin/smokeping_cgi $(TMP)/usr/share/smokeping/smokeping.cgi
|
|
install -v -m 755 $(CURDIR)/debian/smokeping.cgi $(TMP)/usr/lib/cgi-bin/smokeping.cgi
|
|
$(CURDIR)/debian/split_config $(TMP)
|
|
install -v -m 644 $(CURDIR)/debian/default-config $(TMP)/etc/smokeping/config
|
|
|
|
override_dh_link:
|
|
find $(TMP)/usr/share/smokeping/www/js/ -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} +
|
|
dh_link
|
|
|
|
%:
|
|
dh $@ --with apache2
|