Subversion Repositories

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

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