File: rules

package info (click to toggle)
pose 3.5-7
  • links: PTS
  • area: contrib
  • in suites: sarge
  • size: 14,136 kB
  • ctags: 29,490
  • sloc: cpp: 93,990; ansic: 62,838; sh: 27,519; perl: 1,891; python: 1,242; makefile: 652
file content (101 lines) | stat: -rwxr-xr-x 2,777 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
#-*- makefile -*-
# Made with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Christoph Lameter.

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

PACKAGE=pose
include /usr/share/dpatch/dpatch.make

DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	INSTALL_PROGRAM += -s
endif

CONFIGOPTS = --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
		--prefix=/usr --mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info

configure: configure-stamp
configure-stamp: patch-stamp
	dh_testdir
	rm -f BuildUnix/config.sub BuildUnix/config.guess
	ln -s /usr/share/misc/config.sub BuildUnix/config.sub
	ln -s /usr/share/misc/config.guess BuildUnix/config.guess
	( cd BuildUnix && touch -r configure configure.in install-sh Makefile.am \
		missing mkinstalldirs aclocal.m4 configure Makefile.in \
		Gzip/Makefile.am Gzip/Makefile.in jpeg/Makefile.am jpeg/Makefile.in \
		espws-2.0/Makefile.am espws-2.0/Makefile.in )
	( mkdir _build && cd _build && CFLAGS="$(CFLAGS)" \
		../BuildUnix/configure $(CONFIGOPTS) )
	( mkdir _profile && cd _profile && CFLAGS="$(CFLAGS)" \
		../BuildUnix/configure $(CONFIGOPTS) --enable-palm-profile )
	touch configure-stamp

build: build-stamp
build-stamp: configure-stamp
	dh_testdir
	( cd _build && $(MAKE) )
	( cd _profile && $(MAKE) )
	touch build-stamp

clean: clean1 unpatch
clean1:
	dh_testdir
	dh_testroot
	rm -f build-stamp install-stamp configure-stamp
	rm -f BuildUnix/config.sub BuildUnix/config.guess
	rm -Rf _build _profile
	dh_clean

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	( cd _build && $(MAKE) install DESTDIR=$(CURDIR)/debian/pose )
	( cd _profile && $(MAKE) install DESTDIR=$(CURDIR)/debian/pose-profile )
	mv $(CURDIR)/debian/pose-profile/usr/bin/pose \
		$(CURDIR)/debian/pose-profile/usr/bin/pose-profile
	touch install-stamp

binary-common:
	dh_testdir
	dh_testroot
	dh_installdocs -X_GPL.txt
	dh_installexamples
	dh_installmenu
	dh_installman
	dh_installchangelogs 
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-indep:
	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common

binary-arch: build install
	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common

binary: binary-indep binary-arch
.PHONY: build clean binary-common binary-indep binary-arch binary patch \
	unpatch clean1 configure