rules 3.46 KB
Newer Older
yanmorin's avatar
yanmorin committed
1
2
3
4
5
6
7
8
9
10
11
12
#!/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

13
14
package=sflphone

yanmorin's avatar
yanmorin committed
15
16
CXX = g++-4.0
CFLAGS = -Wall -g
Yun Liu's avatar
Yun Liu committed
17
DEB_INSTALL_MANPAGES_sflphone = sflphoned.1 sflphone.1 sflphone-gtk.1
yanmorin's avatar
yanmorin committed
18

19
20
configure: configure-stamp
configure-stamp:
yanmorin's avatar
yanmorin committed
21
22
	dh_testdir
	# Add here commands to configure the package.
23
24
	./autogen.sh --prefix=/usr --with-debug
	cd sflphone-gtk; ./autogen.sh --prefix=/usr
Emmanuel Milou's avatar
Emmanuel Milou committed
25
	cd libs/pjproject-1.0.1; ./configure
26
	touch configure-stamp
Emmanuel Milou's avatar
Emmanuel Milou committed
27
28
	cd libs/dbus-c++; ./configure
	cd libs/libiax2; ./configure
29

yanmorin's avatar
yanmorin committed
30
31
32
33
34

#Architecture 
build: build-arch build-indep

build-arch: build-arch-stamp
35
build-arch-stamp: configure-stamp 
yanmorin's avatar
yanmorin committed
36

37
       # Add here commands to compile the arch part of the package.
38
	$(MAKE) 
39
	cd sflphone-gtk; make
Emmanuel Milou's avatar
Emmanuel Milou committed
40
	cd libs/pjproject-1.0.1; $(MAKE) dep; $(MAKE)
41
	touch $@
Emmanuel Milou's avatar
Emmanuel Milou committed
42
43
	cd libs/dbus-c++; $(MAKE)
	cd libs/libiax2; $(MAKE)
yanmorin's avatar
yanmorin committed
44
45

build-indep: build-indep-stamp
46
build-indep-stamp: configure-stamp 
yanmorin's avatar
yanmorin committed
47

48
49
50
       # Add here commands to compile the indep part of the package.
       #$(MAKE) doc
	touch $@
yanmorin's avatar
yanmorin committed
51
52
53
clean:
	dh_testdir
	dh_testroot
54
	rm -f build-arch-stamp build-indep-stamp configure-stamp
yanmorin's avatar
yanmorin committed
55
	# Add here commands to clean up after the build process.
Yun Liu's avatar
Yun Liu committed
56
	[ ! -f Makefile ] || $(MAKE) distclean 
57

yanmorin's avatar
yanmorin committed
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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
	dh_clean 

install: install-indep install-arch
install-indep:
	dh_testdir
	dh_testroot
	dh_clean -k -i 
	dh_installdirs -i
72
	# Add here commands to install the package into debian/sflphone.
yanmorin's avatar
yanmorin committed
73
74
75
76
77
78
79
80

install-arch:
	dh_testdir
	dh_testroot
	dh_clean -k -s 
	dh_installdirs -s
	# Add here commands to install the arch part of the package into 
	# debian/tmp.
81
82
	$(MAKE) prefix=$(CURDIR)/debian/$(package)/usr install
	cd sflphone-gtk; $(MAKE) prefix=$(CURDIR)/debian/$(package)/usr install
Emmanuel Milou's avatar
Emmanuel Milou committed
83
84
85
	cd libs/pjproject-1.0.1; $(MAKE) prefix=$(CURDIR)/debian/$(package)/usr install
	cd libs/dbus-c++; $(MAKE) prefix=$(CURDIR)/debian/$(package)/usr install
	cd libs/libiax2; $(MAKE) prefix=$(CURDIR)/debian/$(package)/usr install
Yun Liu's avatar
Yun Liu committed
86
	rm -rf $(CURDIR)/debian/$(package)/usr/include
yanmorin's avatar
yanmorin committed
87
88
89
90
	dh_install -s
# Must not depend on anything. This is to be called by
# binary-arch/binary-indep
# in another 'make' thread.
91

yanmorin's avatar
yanmorin committed
92
93
94
95
96
97
98
99
100
101
102
103
binary-common:
	dh_testdir
	dh_testroot
	dh_installchangelogs ChangeLog
	dh_installdocs
	dh_installexamples
#	dh_installmenu
#	dh_installdebconf	
#	dh_installlogrotate	
#	dh_installemacsen
#	dh_installpam
#	dh_installmime
104
#	dh_python
yanmorin's avatar
yanmorin committed
105
106
107
108
109
110
111
112
113
114
115
#	dh_installinit
#	dh_installcron
#	dh_installinfo
	dh_installman
	dh_link
	dh_strip
	dh_compress 
	dh_fixperms
#	dh_perl
	dh_makeshlibs
	dh_installdeb
116
#	dh_shlibdeps
yanmorin's avatar
yanmorin committed
117
118
119
120
121
122
123
124
125
	dh_gencontrol
	dh_md5sums
	dh_builddeb
# Build architecture independant packages using the common target.
binary-indep: build-indep install-indep
	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common

# Build architecture dependant packages using the common target.
binary-arch: build-arch install-arch
126
	$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
yanmorin's avatar
yanmorin committed
127
128

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