Subversion Repositories

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

Rev 7 | Rev 19 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 magnus 1
#!/usr/bin/make -f
2
# Sample debian/rules that uses debhelper.
3
# GNU copyright 1997 to 1999 by Joey Hess.
4
 
5
# Uncomment this to turn on verbose mode.
6
#export DH_VERBOSE=1
7
 
8
include /usr/share/dpatch/dpatch.make
9
 
10
CFLAGS = -pipe -Wall -g -DTMPDIR=\"\\\"/tmp\\\"\"
11
 
12
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
13
	CFLAGS += -O0
14
	LDFLAGS = -s
15
else
16
	CFLAGS += -O2
17
endif
18
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
19
	INSTALL_PROGRAM += -s
20
endif
21
 
22
# Overrides for the PMK Makefile stuff
23
CC=gcc
24
DESTDIR=$(CURDIR)/debian/pmk
25
 
26
export CFLAGS LDFLAGS CC
27
 
28
configure: configure-stamp
29
configure-stamp:
30
	dh_testdir
31
	./pmkcfg.sh -p /usr
32
	touch configure-stamp
33
 
34
build: build-stamp
35
build-stamp: patch configure-stamp
36
	dh_testdir
37
 
38
	# Add here commands to compile the package.
16 magnus 39
	$(MAKE) PREMAKE=pmk
2 magnus 40
	touch build-stamp
41
 
42
clean: clean-patched unpatch
43
clean-patched:
44
	dh_testdir
45
	dh_testroot
46
	rm -f build-stamp
47
 
48
	# Add here commands to clean up after the build process.
49
	-$(MAKE) distclean
50
	rm -f configure-stamp
51
	dh_clean
52
 
53
install: build-stamp
54
	dh_testdir
55
	dh_testroot
56
	dh_clean -k
57
	dh_installdirs
58
 
59
	# Add here commands to install the package into debian/pmk.
16 magnus 60
	$(MAKE) install DESTDIR=$(DESTDIR) MANDIR=/usr/share/man PREMAKE=pmk
2 magnus 61
 
62
binary-indep: install
63
 
64
# Build architecture-dependent files here.
65
binary-arch: install
66
	dh_testdir
67
	dh_testroot
68
	dh_installchangelogs Changelog
69
	dh_installdocs
70
	dh_installexamples
71
	dh_installman
7 magnus 72
	find $(DESTDIR)/usr/share/man -type f | \
73
	  xargs -r sed -i -e '$$!b' -e '/^\.$$/d'
2 magnus 74
	dh_link
75
	dh_strip
76
	dh_compress
77
	dh_fixperms
78
	chmod -x $(DESTDIR)/usr/share/doc/pmk/examples/tests/plang_test.c
79
	dh_installdeb
80
	dh_shlibdeps
81
	dh_gencontrol
82
	dh_md5sums
83
	dh_builddeb
84
 
85
binary: binary-indep binary-arch
86
.PHONY: build clean binary-indep binary-arch binary install