#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 TCL_VERSION=8.6 package=libapache2-mod-rivet RIVETLIB_DIR=/usr/lib/tcltk/rivet3.1 TCLSH_PROG=/usr/bin/tclsh export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk # Don't let the configure script guess our platform. DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp rm -f _configs.sed dh_auto_clean dh_clean build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: configure-stamp dh_testdir $(MAKE) touch build-stamp configure-stamp: dh_testdir dh_autoreconf_clean dh_autoreconf chmod +x ./configure CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ ./configure --host=$(DEB_HOST_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \ --with-tcl=/usr/lib/ \ --with-apache=/usr \ --with-apxs=/usr/bin/apxs \ --with-tclsh=$(TCLSH_PROG) \ --with-rivet-target-dir=$(RIVETLIB_DIR) \ --enable-version-display touch configure-stamp binary-indep: build libapache2-mod-rivet-doc binary-arch: build libapache2-mod-rivet binary: build binary-arch binary-indep libapache2-mod-rivet: build dh_testdir -a dh_testroot -a dh_clean dh_installdirs -p$@ dh_installchangelogs ChangeLog dh_installdocs -p$@ dh_install -a dh_apache2 dh_installexamples -a -p$@ dh_auto_install -a -p$@ --destdir=$(CURDIR)/debian/$@ # Remove README* files in bogus places. #@echo "removing unwanted README and .la files" #find $(CURDIR)/debian/$@/usr/lib/tcltk -name 'README*' -exec rm -v {} \; #find $(CURDIR)/debian/$@/usr/lib/tcltk -name '*.la' -exec rm -v {} \; dh_install -a -p$@ #cp -vr rivet/packages $(CURDIR)/debian/$@$(RIVETLIB_DIR) #@echo "creating pkgIndex.tcl files for libapache2-mod-rivet" #find $(CURDIR)/debian/$@$(RIVETLIB_DIR) -name 'pkgIndex.tcl' -exec rm -v {} \; #-( cd $(CURDIR)/debian/$@$(RIVETLIB_DIR); \ # echo 'eval pkg_mkIndex -verbose [pwd] [glob init.tcl [file join packages * *.tcl] [file join *[info sharedlibextension]]]' | $(TCLSH_PROG) ; ) dh_installman -p$@ dh_link -p$@ dh_strip -p$@ dh_compress -p$@ dh_fixperms -p$@ dh_makeshlibs -p$@ dh_installdeb -p$@ dh_shlibdeps -p$@ dh_gencontrol -p$@ dh_md5sums -p$@ dh_builddeb -p$@ libapache2-mod-rivet-doc: build dh_testdir dh_testroot dh_installdirs -p$@ dh_installchangelogs ChangeLog dh_installdocs -p$@ --exclude=Rivetlogo_small.png #find $(CURDIR)/debian/$@/usr/share/doc/libapache2-mod-rivet-doc/html/images/ -name 'Rivetlogo_small.png' -exec rm -v {} \; dh_compress -p$@ dh_fixperms -p$@ dh_installdeb -p$@ dh_gencontrol -p$@ dh_md5sums -p$@ dh_builddeb -p$@ .PHONY: build clean binary binary-indep binary-arch