File: rules

package info (click to toggle)
pgp4pine 1.76-3
  • links: PTS
  • area: contrib
  • in suites: etch, etch-m68k, lenny
  • size: 164 kB
  • ctags: 11
  • sloc: makefile: 193
file content (123 lines) | stat: -rwxr-xr-x 3,083 bytes parent folder | download
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#!/usr/bin/make -f

TAR_DIR=pgp4pine-1.76
# the dbs rules
include /usr/share/dbs/dbs-build.mk

# we have to redefine this because the find was only going to -maxdepth 1
$(unpacked): $(STAMP_DIR)/created
	mkdir -p $(STAMP_DIR)/sources $(SOURCE_DIR) $(STAMP_DIR)/log/sources
	@for f in `find . -type f -name \*.tgz -o -name \*.tar.gz -o \
		-name \*.tar.bz -o -name \*.tar.bz2 | LC_COLLATE=C sort | sed 's,^\./,,g'`; do \
	stampfile=$(STAMP_DIR)/sources/`basename $$f`; \
	log=$(STAMP_DIR)/log/sources/`basename $$f`; \
	if [ ! -e $$stampfile ]; then \
		echo -n "Extracting source $$f ... "; \
		if $(SHELL) $(SCRIPT_DIR)/file2cat $$f | \
		(cd $(SOURCE_DIR); tar xvf -) > $$log 2>&1; then \
		echo successful.; \
		touch $$stampfile; \
		else \
		echo failed!; \
		exit 1; \
	fi; \
	else \
		echo Already unpacked $$f.; \
	fi; \
	done
	touch $@

# convenient way to set architecture specification strings
# the ifeq condition is here to allow them to be overridden
# from the command line
ifeq (,$(DEB_BUILD_GNU_TYPE))
  include /usr/share/dbs/dpkg-arch.mk
endif

configure: configure-stamp

configure-stamp: $(unpacked) $(patched)
	dh_testdir
	cd $(BUILD_TREE);\
	 cp /usr/share/misc/config.sub /usr/share/misc/config.guess .; \
	automake; aclocal; autoconf; \
	./configure \
		--prefix=/usr \
		--mandir=\$${datadir}/man \
		--infodir=\$${datadir}/info \
		--localstatedir=/var \
		--sysconfdir=/etc \

	touch configure-stamp

build: configure-stamp build-stamp

build-stamp: $(patched)
	dh_testdir
	# Add here commands to compile the package.
	cd $(BUILD_TREE) && $(MAKE) all
	touch build-stamp

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	cd $(BUILD_TREE) && $(MAKE) install DESTDIR=$(CURDIR)/debian/pgp4pine
	mv debian/pgp4pine/usr/share/doc/pgp4pine/pgp4pinerc.example \
	debian/pgp4pine/usr/share/doc/pgp4pine/examples/pgp4pinerc

clean:
	dh_testdir
	dh_testroot
	# Add here commands to clean up after the build process.
	-rm -rf $(STAMP_DIR) $(SOURCE_DIR)
	-rm -rf build-stamp configure-stamp
	dh_clean

binary-indep: build
# Add rules here to build the indep debs.

binary-arch: build
# Add rules here to build the arch debs.

binary: binary-indep binary-arch

$(STAMP_DIR)/install: $(STAMP_DIR)/build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	$(MAKE) -C $(BUILD_TREE) install DESTDIR=$(CURDIR)/debian/pgp4pine

	touch $@

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
#	dh_testversion
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples
	dh_installman $(BUILD_TREE)/pgp4pine/docs/en/pgp4pine.1
	dh_installchangelogs $(BUILD_TREE)/ChangeLog
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

source diff:                                                                  
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary