Subversion Repositories

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

Rev 21 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21 Rev 29
1
#!/usr/bin/make -f
1
#!/usr/bin/make -f
2
# -*- makefile -*-
2
# -*- makefile -*-
3
# Sample debian/rules that uses debhelper.
3
# Sample debian/rules that uses debhelper.
4
# GNU copyright 1997 to 1999 by Joey Hess.
4
# GNU copyright 1997 to 1999 by Joey Hess.
5
5
6
# Uncomment this to turn on verbose mode.
6
# Uncomment this to turn on verbose mode.
7
#export DH_VERBOSE=1
7
#export DH_VERBOSE=1
8
include /usr/share/dpatch/dpatch.make
8
include /usr/share/dpatch/dpatch.make
9
9
10
# These are used for cross-compiling and for saving the configure script
10
# These are used for cross-compiling and for saving the configure script
11
# from having to guess our platform (since we know it already)
11
# from having to guess our platform (since we know it already)
12
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
13
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
13
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14
14
15
15
16
CFLAGS = -Wall -g
16
CFLAGS = -Wall -g
17
LDFLAGS = -Wl,--as-needed
17
LDFLAGS = -Wl,--as-needed
18
18
19
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
19
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
20
	CFLAGS += -O0
20
	CFLAGS += -O0
21
else
21
else
22
	CFLAGS += -O2
22
	CFLAGS += -O2
23
endif
23
endif
24
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
24
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
25
	INSTALL_PROGRAM += -s
25
	INSTALL_PROGRAM += -s
26
endif
26
endif
27
27
28
config.status: ${DPATCH_STAMPFN} configure
28
config.status: ${DPATCH_STAMPFN} configure
29
	dh_testdir
29
	dh_testdir
30
	# Add here commands to configure the package.
30
	# Add here commands to configure the package.
31
	./configure --host=$(DEB_HOST_GNU_TYPE) \
31
	./configure --host=$(DEB_HOST_GNU_TYPE) \
32
		    --build=$(DEB_BUILD_GNU_TYPE) \
32
		    --build=$(DEB_BUILD_GNU_TYPE) \
33
		    --prefix=/usr \
33
		    --prefix=/usr \
34
	            --mandir=\$${prefix}/share/man \
34
	            --mandir=\$${prefix}/share/man \
35
	            --infodir=\$${prefix}/share/info \
35
	            --infodir=\$${prefix}/share/info \
36
	            --enable-shared \
36
	            --enable-shared \
37
	            --disable-dependency-tracking \
37
	            --disable-dependency-tracking \
38
	            CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
38
	            CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
39
39
40
40
41
build: build-stamp
41
build: build-stamp
42
build-stamp:  config.status
42
build-stamp:  config.status
43
	dh_testdir
43
	dh_testdir
44
44
45
	# Add here commands to compile the package.
45
	# Add here commands to compile the package.
46
	$(MAKE) MAKEINFO='makeinfo --enable-encoding'
46
	$(MAKE) MAKEINFO='makeinfo --enable-encoding'
47
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
47
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
48
	$(MAKE) check
48
	$(MAKE) check
49
endif
49
endif
50
50
51
	touch build-stamp
51
	touch build-stamp
52
52
53
clean: clean-patched unpatch
53
clean: clean-patched unpatch
54
	dh_clean
54
	dh_clean
55
55
56
clean-patched:
56
clean-patched:
57
	dh_testdir
57
	dh_testdir
58
	dh_testroot
58
	dh_testroot
59
	rm -f build-stamp 
59
	rm -f build-stamp 
60
60
61
	# Add here commands to clean up after the build process.
61
	# Add here commands to clean up after the build process.
62
	-$(MAKE) distclean
62
	[ ! -f Makefile ] || $(MAKE) distclean
63
63
64
install: build
64
install: build
65
	dh_testdir
65
	dh_testdir
66
	dh_testroot
66
	dh_testroot
67
	dh_clean -k 
67
	dh_clean -k 
68
	dh_installdirs
68
	dh_installdirs
69
69
70
	# Add here commands to install the package into debian/tmp
70
	# Add here commands to install the package into debian/tmp
71
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
71
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
72
#	mv $(CURDIR)/debian/tmp/usr/bin/sexp-conv $(CURDIR)/debian/tmp/usr/bin/sexp-conv.nettle
72
#	mv $(CURDIR)/debian/tmp/usr/bin/sexp-conv $(CURDIR)/debian/tmp/usr/bin/sexp-conv.nettle
73
73
74
# Build architecture-independent files here.
74
# Build architecture-independent files here.
75
binary-indep: build install
75
binary-indep: build install
76
	dh_testdir
76
	dh_testdir
77
	dh_testroot
77
	dh_testroot
78
	dh_installchangelogs -i ChangeLog
78
	dh_installchangelogs -i ChangeLog
79
	dh_installdocs -i
79
	dh_installdocs -i
80
	dh_compress -i
80
	dh_compress -i
81
	dh_fixperms -i
81
	dh_fixperms -i
82
	dh_installdeb -i
82
	dh_installdeb -i
83
	dh_shlibdeps -i
83
	dh_shlibdeps -i
84
	dh_gencontrol -i
84
	dh_gencontrol -i
85
	dh_md5sums -i
85
	dh_md5sums -i
86
	dh_builddeb -i
86
	dh_builddeb -i
87
87
88
# Build architecture-dependent files here.
88
# Build architecture-dependent files here.
89
binary-arch: build install
89
binary-arch: build install
90
	dh_testdir
90
	dh_testdir
91
	dh_testroot
91
	dh_testroot
92
	dh_install -a --sourcedir=debian/tmp
92
	dh_install -a --sourcedir=debian/tmp
93
	dh_link -a
93
	dh_link -a
94
	dh_installchangelogs -a ChangeLog
94
	dh_installchangelogs -a ChangeLog
95
	dh_installdocs -a
95
	dh_installdocs -a
96
	dh_installexamples -a
96
	dh_installexamples -a
97
	dh_installinfo -a
97
	dh_installinfo -a
98
	dh_installman -a
98
	dh_installman -a
99
	dh_strip -a
99
	dh_strip -a
100
	dh_compress -X.pdf
100
	dh_compress -X.pdf
101
	dh_fixperms -a
101
	dh_fixperms -a
102
	dh_makeshlibs #-V 'libnettle2 (>= 1.15)'
102
	dh_makeshlibs #-V 'libnettle2 (>= 1.15)'
103
	dh_installdeb -a
103
	dh_installdeb -a
104
	dh_shlibdeps -a
104
	dh_shlibdeps -a
105
	dh_gencontrol -a
105
	dh_gencontrol -a
106
	dh_md5sums -a
106
	dh_md5sums -a
107
	dh_builddeb -a
107
	dh_builddeb -a
108
108
109
binary: binary-indep binary-arch
109
binary: binary-indep binary-arch
110
.PHONY: build clean clean-patched binary-indep binary-arch binary install
110
.PHONY: build clean clean-patched binary-indep binary-arch binary install