File: rules

package info (click to toggle)
biosquid 1.9g+cvs20050121-11
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,616 kB
  • sloc: ansic: 12,750; sh: 1,412; perl: 243; makefile: 230
file content (72 lines) | stat: -rwxr-xr-x 2,599 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

include /usr/share/dpkg/default.mk
LIBNAME	       := libsquid

%:
	dh $@

override_dh_auto_clean:
	dh_auto_clean
	rm -f configure

override_dh_auto_configure:
	# autoreconf && true
	autoconf
	dh_auto_configure --  --enable-lfs --enable-pvm
	# avoid duplicated definition of PACKAGE_NAME (basically conflicting with hmmer2 when used together)
	sed -i -e '/^#define PACKAGE_NAME /i #ifndef PACKAGE_NAME' \
	       -e '/^#define PACKAGE_NAME /a #endif' \
	       -e '/^#define PACKAGE_VERSION /i #ifndef PACKAGE_VERSION' \
	       -e '/^#define PACKAGE_VERSION /a #endif' \
	       -e '/^#define _LARGEFILE_SOURCE /i #ifndef _LARGEFILE_SOURCE' \
	       -e '/^#define _LARGEFILE_SOURCE /a #endif' \
	       -e '/^#define _LARGEFILE64_SOURCE /i #ifndef _LARGEFILE64_SOURCE' \
	       -e '/^#define _LARGEFILE64_SOURCE /a #endif' \
	       -e '/^#define VERSION /i #ifndef VERSION' \
	       -e '/^#define VERSION /a #endif' \
	       squidconf.h

override_dh_install:
	mv $(CURDIR)/debian/tmp/usr/bin/translate $(CURDIR)/debian/tmp/usr/bin/stranslate
	dh_install
	d-shlibmove --commit \
		    --multiarch \
		    --devunversioned \
		    --exclude-la \
		    --override s/libpvm3-3-dev/pvm-dev/ \
		    --movedev debian/tmp/usr/include/* usr/include \
		    --movedev squid.h usr/include/$(DEB_SOURCE) \
		    --movedev squidconf.h usr/include/$(DEB_SOURCE) \
		    --movedev "debian/tmp/usr/lib/*/pkgconfig/*.pc" usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
		    debian/tmp/usr/lib/*/$(LIBNAME).so
	# resolve @LICENSE@ by text in header files
	for HEADER in $(CURDIR)/debian/$(LIBNAME)-dev/usr/include/$(DEB_SOURCE)/*.h ; do \
	  if grep -q '@LICENSE@' $${HEADER} ; then \
	    sed '/@LICENSE@/,$$d' $${HEADER} > $${HEADER}_tmp ; \
	    sed 's/^/ * /' Licenses/gnu     >> $${HEADER}_tmp ; \
	    sed '0,/@LICENSE@/d' $${HEADER} >> $${HEADER}_tmp ; \
	    mv $${HEADER}_tmp $${HEADER} ; \
	  fi ; \
	done

override_dh_installexamples:
	dh_installexamples
	cd $(CURDIR)/debian/biosquid-dev/usr/share/doc/biosquid-dev/examples/Testsuite; make clean
	sed -i 's#/usr/local/bin/perl#/usr/bin/perl#' $(CURDIR)/debian/$(LIBNAME)-dev/usr/share/doc/$(LIBNAME)-dev/examples/Formats/*.pl

override_dh_auto_test:
	chmod u+x Testsuite/x-base-* Testsuite/bug-1-sfetch*
	ln -s .libs/libsquid.a
	dh_auto_test

override_dh_installman:
	dh_installman
	for manpage in Man/*.man; do \
	    cp -a $${manpage} $(CURDIR)/debian/biosquid/usr/share/man/man1/`basename $${manpage} .man`.1 ; \
	done