rules 2.24 KB
Newer Older
Julien Bonjean's avatar
Julien Bonjean committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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

package=sflphone-common

CXX = g++-4.0
CFLAGS = -Wall -g
DEB_INSTALL_MANPAGES_sflphone_common = sflphoned.1

configure: configure-stamp
configure-stamp:
	dh_testdir
	# Add here commands to configure the package.
23
	./autogen.sh
24
	./configure --prefix=/usr --without-celt
25
	cd libs/pjproject; ./configure
Julien Bonjean's avatar
Julien Bonjean committed
26
27
	touch configure-stamp

28
29
#Architecture
build: build-arch
Julien Bonjean's avatar
Julien Bonjean committed
30
31

build-arch: build-arch-stamp
32
build-arch-stamp: configure-stamp
Julien Bonjean's avatar
Julien Bonjean committed
33
34
35
36
37
38
39
40
41

    # Add here commands to compile the arch part of the package.
	cd libs/pjproject; $(MAKE) dep; $(MAKE) clean; $(MAKE)
	$(MAKE)
	touch $@

clean:
	dh_testdir
	dh_testroot
42
	rm -f build-arch-stamp configure-stamp
Julien Bonjean's avatar
Julien Bonjean committed
43
	# Add here commands to clean up after the build process.
44
	[ ! -f Makefile ] || $(MAKE) distclean
Julien Bonjean's avatar
Julien Bonjean committed
45
46
47
48
49
50
51

ifneq "$(wildcard /usr/share/misc/config.sub)" ""
	cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
	cp -f /usr/share/misc/config.guess config.guess
endif
52
	dh_clean
Julien Bonjean's avatar
Julien Bonjean committed
53

54
install: install-arch
Julien Bonjean's avatar
Julien Bonjean committed
55
56
57
58

install-arch:
	dh_testdir
	dh_testroot
59
	dh_clean -k -s
Julien Bonjean's avatar
Julien Bonjean committed
60
	dh_installdirs -s
61
	# Add here commands to install the arch part of the package into
Julien Bonjean's avatar
Julien Bonjean committed
62
63
64
65
66
67
68
69
70
71
72
73
74
	# debian/tmp.
	$(MAKE) DESTDIR=$(CURDIR)/debian/$(package) install
	rm -rf $(CURDIR)/debian/$(package)/usr/include
	dh_install -s

binary-common:
	dh_testdir
	dh_testroot
	dh_installchangelogs ChangeLog
	dh_installdocs
	dh_installexamples
	dh_installman
	dh_link
75
76
	dh_strip --dbg-package=sflphone-common-dbg
	dh_compress
Julien Bonjean's avatar
Julien Bonjean committed
77
78
79
80
81
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_gencontrol
	dh_md5sums
82
	dh_builddeb
Julien Bonjean's avatar
Julien Bonjean committed
83
84
85
86
87

# Build architecture dependant packages using the common target.
binary-arch: build-arch install-arch
	$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common

88
89
90
91
92
override_dh_strip:
	dh_strip --dbg-package=sflphone-common-dbg

binary: binary-arch 
.PHONY: build clean binary-arch binary install install-arch configure override_dh_strip