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 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
|
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
package=tsocks
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
# This is the debhelper compatability version to use.
export DH_COMPAT=2
build: build-stamp
build-stamp:
dh_testdir
-rm -f config.{cache,status} .ChangeLog.swp
cp /usr/share/misc/config.guess .
cp /usr/share/misc/config.sub .
./configure --prefix=/usr \
--libdir=/usr/lib \
--mandir=/usr/share/man \
--with-conf=/etc/tsocks.conf \
--enable-hostnames \
#--enable-socksdns \
$(MAKE) CFLAGS="-O2 -g -Wall"
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp install-stamp
-$(MAKE) distclean
-rm -f `find . -name "*~"`
-rm -rf debian/$(package) debian/files* core debian/substvars
#-rm -rf debian/plus/tsocks.8*
-rm -rf debian/conffiles
dh_clean
install: install-stamp
install-stamp: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) install prefix=`pwd`/debian/$(package)/usr \
libdir=`pwd`/debian/$(package)/usr/lib \
mandir=`pwd`/debian/$(package)/usr/share/man
install -m 600 tsocks.conf.complex.example `pwd`/debian/$(package)/etc/tsocks.conf
install validateconf $(CURDIR)/debian/$(package)/usr/bin
install inspectsocks $(CURDIR)/debian/$(package)/usr/bin
install saveme $(CURDIR)/debian/$(package)/usr/bin
#in the upstream now:
#rm -f $(CURDIR)/debian/$(package)/usr/bin/tsocks
install -m 755 $(CURDIR)/debian/plus/tsocks $(CURDIR)/debian/$(package)/usr/bin
touch install-stamp
binary-indep: build install
# There are no architecture-independent files to be uploaded
# generated by this package. If there were any they would be
# made here.
binary-arch: build install
# -rm -rf debian/$(package)
dh_testroot
dh_testdir
# dpkg-gencontrol -isp
dh_undocumented
dh_installdocs
#dh_installdebconf
#how to solve that with dh_installman? (buggy manpage replacing)
#rm -f $(CURDIR)/debian/$(package)/usr/share/man/man8/tsocks.8
##in the upstream now:
##sed s:/lib/:/usr/lib/:g $(CURDIR)/tsocks.8 > $(CURDIR)/debian/plus/tsocks.8
###dh_compress $(CURDIR)/debian/plus/tsocks.8
###dh_compress $(CURDIR)/debian/plus/tsocks.1
#install -o root -g root $(CURDIR)/debian/plus/tsocks.8 $(CURDIR)/debian/$(package)/usr/share/man/man8/
install -o root -g root $(CURDIR)/debian/plus/tsocks.1 $(CURDIR)/debian/$(package)/usr/share/man/man1/
dh_installman
dh_installchangelogs ChangeLog upstream
dh_installchangelogs
dh_link
dh_strip
dh_compress
dh_fixperms
dh_makeshlibs
#create conffiles automagically:
find $(CURDIR)/debian/$(package)/etc -type f|sed s:$(CURDIR)/debian/$(package):: >$(CURDIR)/debian/conffiles
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|