File: rules

package info (click to toggle)
wmmail 0.63a-4
  • links: PTS
  • area: main
  • in suites: potato
  • size: 868 kB
  • ctags: 235
  • sloc: ansic: 2,936; sh: 388; makefile: 144; perl: 111
file content (115 lines) | stat: -rwxr-xr-x 2,821 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
#!/usr/bin/make -f
# This -*- makefile -*- is GPL copyright 1998 by Marcelo Magalln and
# based on sample debian/rules from debhelper, GNU copyright 1997 by
# Joey Hess.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DH_COMPAT=2

package     := wmmail

tmpdir      := $(shell pwd)/debian/$(package)
defaultsdir := etc/GNUstep/Defaults
xbindir     := usr/X11R6/bin
datadir     := usr/share/WMMail.app
xman1dir    := usr/X11R6/man/man1
bindir      := usr/bin
man1dir     := usr/share/man/man1
docdir      := usr/share/doc/$(package)
menudir     := usr/lib/menu
appspath    := usr/lib/GNUstep/Apps

ln          := dh_link

build: build-stamp
build-stamp: configure-stamp
	dh_testdir
	$(MAKE)
	touch $@

configure-stamp:
	dh_testdir
	./configure --with-appspath=/$(appspath)
	touch $@

clean:
	dh_testdir
	dh_testroot
	-$(MAKE) distclean
	-rm -rf *-stamp .deps
	dh_clean

install-stamp: build
	dh_testdir
	dh_clean -k

	install -d -m 0755 \
		$(tmpdir)/$(defaultsdir)   \
		$(tmpdir)/$(xbindir)       \
		$(tmpdir)/$(xman1dir)      \
		$(tmpdir)/$(bindir)        \
		$(tmpdir)/$(man1dir)       \
	 	$(tmpdir)/$(docdir)        \
		$(tmpdir)/$(menudir)

	$(MAKE) install DESTDIR=$(tmpdir)

	mv $(tmpdir)/$(appspath)/WMMail.app/WMMail \
		$(tmpdir)/$(xbindir)/WMMail
	# provide a backwards compatibility symlink
	$(ln) $(xbindir)/WMMail $(xbindir)/wmmail
	# and a gs-apps-do-it-this-way compatibility symlink
	$(ln) $(xbindir)/WMMail $(appspath)/WMMail.app/WMMail

	rm -rf $(tmpdir)/$(appspath)/WMMail.app/Defaults
	install -m 0644 -p debian/system.WMMail \
		$(tmpdir)/$(defaultsdir)/WMMail

	install -m 0755 -p debian/upgrade-wmmailrc $(tmpdir)/$(bindir)

# this is a bit overkill for just one file... but it's my standard code
	-cd $(tmpdir) && \
		find etc ! -type d \
		| sed -e "s!^etc/!/etc/!" > ../conffiles

	dh_installdebconf
	dh_installdocs
	dh_installexamples
	dh_installmenu
#	dh_installinit
#	dh_installcron
#	dh_installmanpages
	install -p -m 0644 WMMail.1x $(tmpdir)/$(xman1dir)/WMMail.1x
	$(ln) $(xman1dir)/WMMail.1x $(xman1dir)/wmmail.1x
	install -p -m 0644 debian/upgrade-wmmailrc.1 \
		$(tmpdir)/$(man1dir)
#	dh_undocumented
	dh_installchangelogs ChangeLog
	touch $@

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

# Build architecture-dependent files here.
binary-arch: build install-stamp
#	dh_testversion
	dh_testdir
	dh_testroot
	dh_strip
	dh_compress
	dh_fixperms
#	dh_suidregister
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol -u-isp
#	dh_makeshlibs
	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 install-stamp