1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
#!/usr/bin/make -f
PACKAGE := gnugk
DEBVERSION := $(shell head -n 1 debian/changelog \
| sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
DEB_NOEPOCH_VERSION:=$(shell echo $(DEBVERSION) | cut -d':' -f 2)
DEB_SRC_VERSION:=$(shell echo $(DEB_NOEPOCH_VERSION) | sed -e 's/-[^-]\+$$//')
UPVERSION := $(shell echo $(DEB_SRC_VERSION) | sed 's/~dfsg//')
FILENAME := $(PACKAGE)_$(DEB_SRC_VERSION).orig.tar.gz
UPFILENAME := $(PACKAGE)-$(UPVERSION).tar.gz
URL := http://qa.debian.org/watch/sf.php/openh323gk/$(UPFILENAME)
## pwlib_compat.h does not set this on OpenH323 >= 1.19 by mistake
export STDCCFLAGS+= -DhasSRV=1
export PREFIX=/usr/
export OPENH323DIR=/usr/share/openh323
export OPENH323MAKEDIR=/usr/share/openh323
export OH323_LIBDIR=/usr/lib
export PTLIB_CONFIG=/usr/share/ptlib/make/ptlib-config
export PTLIBDIR=$(shell [ -x /usr/share/ptlib/make/ptlib-config ]&& /usr/share/ptlib/make/ptlib-config --ptlibdir)
%:
dh $@ --parallel --with autotools_dev
override_dh_auto_configure:
dh_auto_configure -- --with-pgsql-include-dir=`/usr/bin/pg_config --includedir` --disable-unixodbc
override_dh_auto_build:
dh_auto_build -- opt doc
$(MAKE) -C addpasswd opt
override_dh_auto_test:
# #obj*/gnugk -h > /dev/null
override_dh_installchangelogs:
dh_installchangelogs changes.txt
override_dh_install_init:
dh_install_init -- defaults 90 10
override_dh_installdocs:
dh_installdocs -X.cvsignore
override_dh_auto_install:
$(MAKE) install DESTDIR=$(CURDIR)/debian/gnugk INSTALL_DIR=$(CURDIR)/debian/gnugk/usr INSTALLBIN_DIR=$(CURDIR)/debian/gnugk/usr/sbin
install --mode=640 --owner=root --group=root \
etc/complete.ini $(CURDIR)/debian/gnugk/etc/gatekeeper.ini
override_dh_fixperms:
dh_fixperms
chmod -x debian/gnugk/usr/share/doc/gnugk/examples/odbc.ini
get-orig-source:
@@if [ -x /usr/bin/wget ];then \
echo 'Grabbing original upstream tarball...' ; \
wget -nv --content-disposition $(URL) ; \
echo 'Repacking as DFSG-free (removing configure.exe)' ; \
mkdir gnugk-tmp ; cd gnugk-tmp ; tar xf "../$(UPFILENAME)" ; \
rm -f gnugk*/configure.exe ../$(UPFILENAME) ; \
echo "Writing new archive $(FILENAME)" ; \
tar cfz ../$(FILENAME) gnugk-* ; \
echo "Cleaning up..." ; \
cd .. ; rm -rf gnugk-tmp ; \
else \
echo "Please install wget and run again."; \
fi
|