Subversion Repositories

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

Rev 7 | Rev 19 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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