Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 63 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 magnus 1
#!/usr/bin/make -f
2
#
3
# To build the packages, run `dpkg-buildpackage' or `debuild' from the
4
# parent directory of this file. (You may need to specify the `-rfakeroot'
5
# option if you are using dpkg-buildpackage and are not running as root)
6
#
43 magnus 7
# Copyright © 1999, 2000, 2001, 2002  Timshel Knoll <timshel@debian.org>
8
# Copyright © 2008, 2009, 2010, 2012  Magnus Holmgren <holmgren@debian.org>
3 magnus 9
# Licensed under the terms of the GNU General Public License
10
#
11
# Based originally on Sample debian/rules that uses debhelper, from dh-make,
12
# GNU copyright 1997 to 1999 by Joey Hess.
13
 
14
# Uncomment this to turn on verbose mode.
15
#export DH_VERBOSE=1
16
 
17
# These are used for cross-compiling and for saving the configure script
18
# from having to guess our platform (since we know it already)
19
DEB_HOST_GNU_TYPE       ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
20
DEB_BUILD_GNU_TYPE      ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
21
 
42 magnus 22
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
23
  buildflags := --build=$(DEB_BUILD_GNU_TYPE)
3 magnus 24
else
42 magnus 25
  buildflags := --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
3 magnus 26
endif
27
 
42 magnus 28
buildflags += $(shell dpkg-buildflags --export=configure)
3 magnus 29
 
43 magnus 30
configure: configure-stamp
13 magnus 31
configure-stamp:
3 magnus 32
	dh_testdir
33
 
42 magnus 34
	[ -f debian/autoreconf.before ] || dh_autoreconf
13 magnus 35
 
64 magnus 36
	./configure --prefix=/usr $(buildflags) \
37
		    --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
3 magnus 38
 
39
	touch $@
40
 
42 magnus 41
build: build-arch
42
build-indep:
43
build-arch: build-stamp
44
build-stamp: configure-stamp
3 magnus 45
	dh_testdir
46
 
47
	$(MAKE)
48
 
49
	touch $@
50
 
13 magnus 51
clean:
3 magnus 52
	dh_testdir
53
	dh_testroot
54
	rm -f build-stamp configure-stamp
55
 
8 magnus 56
	[ ! -f Makefile ] || $(MAKE) distclean
3 magnus 57
 
42 magnus 58
	dh_autoreconf_clean
43 magnus 59
	dh_clean
3 magnus 60
 
36 magnus 61
install: build
3 magnus 62
	dh_testdir
63
	dh_testroot
36 magnus 64
	dh_prep
3 magnus 65
 
5 magnus 66
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
67
 
36 magnus 68
binary-indep:
5 magnus 69
	dh_testdir
70
	dh_testroot
36 magnus 71
	dh_install -i
3 magnus 72
 
4 magnus 73
	dh_installdocs -i
74
	dh_installman -i
75
	dh_installinfo -i
76
	dh_installchangelogs -i
77
	dh_link -i
78
	dh_compress -i -Xliboop-doc/html
79
	dh_fixperms -i
80
	dh_installdeb -i
81
	dh_gencontrol -i
82
	dh_md5sums -i
83
	dh_builddeb -i
84
 
36 magnus 85
binary-arch: install
3 magnus 86
	dh_testdir
87
	dh_testroot
36 magnus 88
	dh_install -a
3 magnus 89
 
4 magnus 90
	dh_installdocs -a
91
	dh_installman -a
92
	dh_installinfo -a
93
	dh_installchangelogs -a
94
	dh_link -a
63 magnus 95
	dh_strip -a --dbgsym-migration='liboop-dbg (<< 1.0.1-2~)'
4 magnus 96
	dh_compress -a -Xliboop-doc/html
97
	dh_fixperms -a
98
	dh_makeshlibs -a
99
	dh_installdeb -a
3 magnus 100
#	 Don't add the depends for adapter libraries - programs which link
101
#	 with them will also link with the appropriate library
4 magnus 102
	dh_shlibdeps -a -Xliboop-
103
	dh_gencontrol -a
104
	dh_md5sums -a
105
	dh_builddeb -a
3 magnus 106
 
107
binary: binary-indep binary-arch
108
 
43 magnus 109
.PHONY: configure build build-arch build-indep install
3 magnus 110
.PHONY: binary-indep binary-arch binary clean