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
|
#!/usr/bin/make -f
# -*- makefile -*-
# debian/rules file for the Debian/GNU Linux tcp4u package
# Copyright (C) 1998 by Dirk Eddelbuettel <edd@debian.org>
source := $(shell head -1 debian/changelog | awk '{print $$1}')
version := $(shell head -1 debian/changelog | \
perl -nle 'm/\S+\s+\((\S+)\)/ && print $$1')
major := $(shell head -1 debian/changelog | \
perl -nle 'm/\S+\s+\((\d+).*\)/ && print $$1')
package := lib$(source)$(major)
libmaj := lib$(source).so.$(major)
lib := lib$(source).so
liba := lib$(source).a
debtmp := $(shell pwd)/debian/tmp
devpack := lib$(source)$(major)-dev
devdir := $(shell pwd)/debian/$(devpack)
devdoc := $(devdir)/usr/doc/$(devpack)
# export DH_VERBOSE=1
foo:
@echo $(package) $(devpack)
build: build-stamp
build-stamp:
dh_testdir
cd src && make -f ../debian/Makefile
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
dh_clean lib/*so* build/*.so*
#if [ ! -f Makefile ]; then ./configure --prefix=/usr ; fi
#-$(MAKE) distclean
cd src && make -f ../debian/Makefile clean
binary-indep: build
binary-arch: build
dh_testdir
dh_testroot
dh_clean
dh_installdirs usr/lib usr/include
##$(MAKE) install installprefix=`pwd`/debian/tmp
## install the library (see Packaging Manual, Section 12)
cp -av src/$(libmaj).* $(debtmp)/usr/lib
cp -av src/$(libmaj) $(debtmp)/usr/lib
cp -av src/$(lib) $(debtmp)/usr/lib
cp -av src/$(liba) $(debtmp)/usr/lib
## install the headers
cp -av Include/*.h $(debtmp)/usr/include
dh_movefiles
dh_installdocs -p$(devpack) README TODO tcp4u331.txt doc/*
## fix the atrocious .htm endings
cd $(devdoc) && \
for i in *.htm; do \
p=`basename $$i .htm`; \
perl -p -i -e 's/\.htm\"/\.html\"/g; \
s/\.htm\#/\.html\#/g;' $$i; \
mv $$i $$p.html; \
done
dh_installdocs
dh_installexamples -p$(devpack) Samples/*
rm -v $(devdir)/usr/doc/$(package)-dev/GLGPL.txt
# dh_installmenu
# dh_installcron
# dh_installmanpages
dh_installchangelogs src/histo.txt
dh_strip
dh_compress
dh_makeshlibs
dh_installdeb
dh_shlibdeps src/$(libmaj).*
dh_gencontrol
dh_fixperms
# dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
|