Subversion Repositories

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

Rev 42 | 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
 
42 magnus 36
	./configure --prefix=/usr $(buildflags)
3 magnus 37
 
38
	touch $@
39
 
42 magnus 40
build: build-arch
41
build-indep:
42
build-arch: build-stamp
43
build-stamp: configure-stamp
3 magnus 44
	dh_testdir
45
 
46
	$(MAKE)
47
 
48
	touch $@
49
 
13 magnus 50
clean:
3 magnus 51
	dh_testdir
52
	dh_testroot
53
	rm -f build-stamp configure-stamp
54
 
8 magnus 55
	[ ! -f Makefile ] || $(MAKE) distclean
3 magnus 56
 
42 magnus 57
	dh_autoreconf_clean
43 magnus 58
	dh_clean
3 magnus 59
 
36 magnus 60
install: build
3 magnus 61
	dh_testdir
62
	dh_testroot
36 magnus 63
	dh_prep
3 magnus 64
 
5 magnus 65
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
66
 
36 magnus 67
binary-indep:
5 magnus 68
	dh_testdir
69
	dh_testroot
36 magnus 70
	dh_install -i
3 magnus 71
 
4 magnus 72
	dh_installdocs -i
73
	dh_installman -i
74
	dh_installinfo -i
75
	dh_installchangelogs -i
76
	dh_link -i
77
	dh_compress -i -Xliboop-doc/html
78
	dh_fixperms -i
79
	dh_installdeb -i
80
	dh_gencontrol -i
81
	dh_md5sums -i
82
	dh_builddeb -i
83
 
36 magnus 84
binary-arch: install
3 magnus 85
	dh_testdir
86
	dh_testroot
36 magnus 87
	dh_install -a
3 magnus 88
 
4 magnus 89
	dh_installdocs -a
90
	dh_installman -a
91
	dh_installinfo -a
92
	dh_installchangelogs -a
93
	dh_link -a
33 magnus 94
	dh_strip -a --dbg-package=liboop-dbg
4 magnus 95
	dh_compress -a -Xliboop-doc/html
96
	dh_fixperms -a
97
	dh_makeshlibs -a
98
	dh_installdeb -a
3 magnus 99
#	 Don't add the depends for adapter libraries - programs which link
100
#	 with them will also link with the appropriate library
4 magnus 101
	dh_shlibdeps -a -Xliboop-
102
	dh_gencontrol -a
103
	dh_md5sums -a
104
	dh_builddeb -a
3 magnus 105
 
106
binary: binary-indep binary-arch
107
 
43 magnus 108
.PHONY: configure build build-arch build-indep install
3 magnus 109
.PHONY: binary-indep binary-arch binary clean