File: rules

package info (click to toggle)
mutt 0.91.2-2
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 2,056 kB
  • ctags: 2,189
  • sloc: ansic: 34,582; sh: 203; makefile: 197; perl: 21; awk: 2
file content (114 lines) | stat: -rwxr-xr-x 2,951 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
#!/usr/bin/make -f
# Sample debian.rules file - for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.
# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
# my name from the file itself.  (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
# This file may have to be extensively modified

# Rather paranoid than sorry. Make the shell exit with an error if an
# untested command fails.
SHELL+= -e

export DH_VERBOSE=1

ifeq ($(shell ls pgp.c),pgp.c)
package:=mutt-i
dist:=i
else
package:=mutt
dist:=us
endif

build:
	$(checkdir)
	debian/rules links
ifeq ($(package),mutt-i)
	@echo Building international version including crypto
else
	@echo Building US version without crypto
endif
# - -Wall is already put in by Makefile.in
# - Debian's locking policy (USE_DOTLOCK exclusively) is done through
#   config.h.in
# - --datadir=/etc to get Muttrc in the right place
	env CFLAGS='-O2 -g' INSTALL='install -p' \
		./configure -v --prefix=/usr --with-sharedir=/etc \
		--with-slang --disable-fcntl --enable-pop \
		--enable-hidden-host --enable-domain --with-domain=@
# For libc5 build in libc6 environment add LIBS=-lslang -lm to prevent
# producing a mixed libc binary because of linking against libnsl
	make
	cd doc ; \
	  make all
	touch build

clean: links
	$(checkdir)
	-rm -f build
	-make clean
	-make distclean
	-rm -f `find . -name "*~"`
	-cd doc ; rm -f manual.aux manual.dvi manual.log manual.ps \
	                manual.tex manual*html *.tmp
	-cd debian ; rm -rf tmp mutt mutt-i files* core substvars *debhelper \
			copyright

binary-indep:	checkroot build
	$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch:	checkroot build
	$(checkdir)
	-rm -rf debian/tmp
	make	prefix=`pwd`/debian/tmp/usr \
		sharedir=`pwd`/debian/tmp/etc install
	rm -f debian/tmp/etc/mime.types
	chmod a+rx,g+s debian/tmp/usr/bin/mutt
	mkdir -p debian/tmp/usr/doc/$(package)
	cat ChangeLog Changes > debian/tmp/usr/doc/$(package)/changelog
	dh_installdocs
ifeq ($(package),mutt-i)
	install -p doc/pgp-Notes.txt debian/tmp/usr/doc/$(package)
endif
	dh_installexamples
	dh_installmenu
	dh_installcron
	dh_installmanpages
	dh_installchangelogs
	dh_strip
	dh_compress
	dh_fixperms
	chgrp mail debian/tmp/usr/bin/mutt
	chmod g+s debian/tmp/usr/bin/mutt
	dh_suidregister
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_makeshlibs
	dh_md5sums
	dh_builddeb

define checkdir
	test -f debian/rules
endef

links:
	cd debian ; \
	  rm -f copyright ; ln -sf copyright.$(dist) copyright

# Below here is fairly generic really

binary:		binary-indep binary-arch

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

checkroot:
	$(checkdir)
	test root = "`whoami`"

.PHONY: binary binary-arch binary-indep clean checkroot links