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
# This script uses debhelper by Joey Hess
#export DH_VERBOSE=1
DEB=$(CURDIR)/debian/tmp
DEV=debian/libsocksd0-dev
# Aim for the top, adapt if anything should break on the buildds.
DEB_BUILD_MAINT_OPTIONS= hardening=+all
export DEB_BUILD_MAINT_OPTIONS
override_dh_auto_configure:
dh_auto_configure -- \
--with-socks-conf=/etc/dante.conf \
--with-sockd-conf=/etc/danted.conf \
--with-pidfile=/var/run/danted.pid \
--without-gssapi
cp lib/config_parse.c lib/config_scan.c dlib/
cp lib/config_parse.c lib/config_scan.c sockd/
override_dh_auto_clean:
dh_auto_clean
for d in sockd dlib; do \
cd $$d; \
for i in *; do \
if [ -L "$$i" ]; then rm $$i; cp -a ../lib/$$i . ; fi \
done; \
cd ..; \
done
rm -rf example/renamed
override_dh_install:
cp $(DEB)/usr/share/man/man5/socks.conf.5 $(DEB)/usr/share/man/man5/dante.conf.5
cp $(DEB)/usr/share/man/man5/sockd.conf.5 $(DEB)/usr/share/man/man5/danted.conf.5
cp $(DEB)/usr/share/man/man8/sockd.8 $(DEB)/usr/share/man/man8/danted.8
cp $(DEB)/usr/sbin/sockd $(DEB)/usr/sbin/danted
mkdir -p example/renamed
for i in example/sockd*.conf; do \
sed -e 's/sample sockd.conf/sample danted.conf/' < "$$i" > example/renamed/"`basename $$i | sed -e s/sockd/danted/`"; \
done
for i in example/socks*.conf; do \
sed -e 's/sample socks.conf/sample dante.conf/' < "$$i" > example/renamed/"`basename $$i | sed -e s/socks/dante/`"; \
done
dh_install
override_dh_installdocs:
dh_installdocs -A README doc/README.usage doc/README.survey BUGS CREDITS SUPPORT
dh_installdocs -pdante-client doc/README.socksify
dh_installdocs -pdante-client -pdante-server
dh_installdocs -pdante-server doc/SOCKS4.protocol
override_dh_installchangelogs:
dh_installchangelogs
set -e; for p in $$(dh_listpackages); do \
install -m 644 NEWS "debian/$$p/usr/share/doc/$$p/"; \
done
override_dh_installinit:
dh_installinit -pdante-server --name=danted --error-handler=dante_service_error
override_dh_installsystemd:
dh_installsystemd -pdante-server --name=danted
override_dh_missing:
dh_missing --fail-missing
%:
dh '$@'
|