[go: up one dir, main page]

File: rules

package info (click to toggle)
swig1.3 1.3.24-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 19,336 kB
  • ctags: 10,604
  • sloc: cpp: 27,917; ansic: 24,160; yacc: 4,412; python: 4,255; java: 4,156; makefile: 3,735; sh: 3,552; cs: 2,250; ruby: 2,150; lisp: 1,605; tcl: 1,136; perl: 980; php: 879; ml: 825
file content (156 lines) | stat: -rwxr-xr-x 4,496 bytes parent folder | download
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# This version is for a hypothetical package that builds an
# architecture-dependant package, as well as an architecture-independent
# package.

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

# XXX: patch to pike detection submitted upstream, need to adapt
# configure args
MAKEOPTS =
CONFIGURE_ARGS := \
	--prefix=/usr --mandir=/usr/share/man	\
	--with-tclconfig=/usr/lib/tcl8.4		\
	--with-tclincl=/usr/include/tcl8.4		\
	--with-python=/usr/bin/python2.3		\
	--with-ruby=/usr/bin/ruby1.8			\
	--with-pike=/usr/bin/pike7.6			\
	--with-pikeincl=/usr/include/pike/7.6.24	\
	--with-swiglibdir=/usr/share/swig1.3		\
	--with-release-suffix=-1.3.22

DEB_TARGET_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)

with_java := yes
no_java_archs := hppa hurd-i386 mips mipsel freebsd-i386 netbsd-i386
ifneq ($(DEB_TARGET_ARCH),i386)
  ifeq ($(DEB_TARGET_ARCH), $(findstring $(DEB_TARGET_ARCH),$(no_java_archs)))
    with_java := disabled for architecure $(DEB_TARGET_ARCH)
    NO_PACKAGES +=
  endif
endif

with_chicken := yes
no_chicken_archs := m68k mips mipsel
ifeq ($(DEB_TARGET_ARCH), $(findstring $(DEB_TARGET_ARCH),$(no_chicken_archs)))
  with_chicken := disabled for architecure $(DEB_TARGET_ARCH)
  NO_PACKAGES += libswig1.3.22-chicken
endif

NO_PACKAGES_ARGS = $(foreach p,$(NO_PACKAGES),-N$(p))

ifeq ($(with_java),yes)
  CONFIGURE_ARGS += \
	--with-java=/usr/bin/java \
	--with-javac=/usr/bin/javac
else
  CONFIGURE_ARGS += --without-java
  MAKEOPTS += skip-java=true
endif

ifeq ($(with_chicken),yes)
  CONFIGURE_ARGS += \
	--with-chicken=/usr/bin/chicken \
	--with-chickencfg=/usr/bin/chicken-config
else
  CONFIGURE_ARGS += --without-chicken
  MAKEOPTS += skip-chicken=true
endif

configure: configure-stamp
configure-stamp:
	dh_testdir
	touch aclocal.m4
	touch configure
	touch Source/Makefile.in
	PHP4INC="`php-config --includes`" \
	CFLAGS="`perl -e 'use Config; print $$Config{ccflags};'`" \
	./configure $(CONFIGURE_ARGS)
	touch configure-stamp

build: build-stamp
build-stamp: configure-stamp
	dh_testdir
	$(MAKE) $(MAKEOPTS)
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f configure-stamp build-stamp install-stamp
	-$(MAKE) $(MAKEOPTS) distclean
	rm -f Examples/php4/*/Makefile preinst-swig
	rm -f Source/Include/swigconfig.h Source/Include/stamp-h1
	rm -f `find -name Makefile.in|sed 's,\.in$$,,'`
	rm -Rf Source/.deps

	dh_clean

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	$(MAKE) $(MAKEOPTS) DESTDIR=`pwd`/debian/tmp install
	mv debian/tmp/usr/bin/swig-1.3.22 debian/tmp/usr/bin/swig-1.3

	dh_movefiles $(NO_PACKAGES_ARGS)
	touch install-stamp

# Build architecture-independent files here.
# We don't need a dependency on build or install since these are the plain
# documentation files as included in the distribution.
binary-indep:	
	dh_testdir
	dh_testroot
	dh_clean -i -k
	dh_installdirs -i
	dh_installdocs -i
	dh_installexamples -i
	cd debian/swig-examples/usr/share/doc/swig-examples && mv examples/* . && rmdir examples
	cp debian/swig-examples.override debian/swig-examples/usr/share/lintian/overrides/swig-examples
	perl -pi -e 's,^SWIG.*=.*$$,SWIG      = swig,' \
		`find debian/swig-examples/usr/share/doc/swig-examples -name Makefile`
	dh_installchangelogs -i
	dh_link -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs -a $(NO_PACKAGES_ARGS) README NEW
	dh_installexamples -a $(NO_PACKAGES_ARGS)
	dh_installmenu -a $(NO_PACKAGES_ARGS)
#	dh_installemacsen -a $(NO_PACKAGES_ARGS)
#	dh_installinit -a $(NO_PACKAGES_ARGS)
	dh_installcron -a $(NO_PACKAGES_ARGS)
	dh_installman -a debian/swig.1
#	dh_undocumented
	dh_installchangelogs -a $(NO_PACKAGES_ARGS) CHANGES
	dh_link -a $(NO_PACKAGES_ARGS)
	dh_strip -a $(NO_PACKAGES_ARGS)
	dh_compress -a $(NO_PACKAGES_ARGS)
	dh_fixperms -a $(NO_PACKAGES_ARGS)
	dh_installdeb -a $(NO_PACKAGES_ARGS)
	dh_shlibdeps -a $(NO_PACKAGES_ARGS)
	dh_gencontrol -a $(NO_PACKAGES_ARGS)
	dh_makeshlibs -a $(NO_PACKAGES_ARGS)
	dh_md5sums -a $(NO_PACKAGES_ARGS)
	dh_builddeb -a $(NO_PACKAGES_ARGS)

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install