File: rules

package info (click to toggle)
gnubg 0.90-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 30,800 kB
  • ctags: 8,224
  • sloc: ansic: 92,884; xml: 13,338; sh: 9,675; makefile: 425; python: 392; yacc: 295; sql: 237; lex: 220; php: 102; cs: 81; awk: 25; sed: 16
file content (157 lines) | stat: -rwxr-xr-x 4,590 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

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

# This has to be exported to make some magic below work.
export DH_OPTIONS

CFLAGS=-g -Wall
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
    CFLAGS += -O0
else
    CFLAGS += -O2
endif

# Tell Autoconf the correct system types.
DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
    SYSTEM = --build $(DEB_HOST_GNU_TYPE)
else
    SYSTEM = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif

# These variable is used only by get-orig-source, which will normally only be
# run by maintainers.
VERSION = 0.90
URL     = http://www.gnubg.org/media/sources/
FILE    = gnubg-0.9.0-1.tar.gz

# Download the upstream source and clean out the CVS subdirectories.
get-orig-source:
	wget $(URL)$(FILE)
	tar xfz $(FILE)
	rm $(FILE)
	mv gnubg gnubg_$(VERSION).orig
	rm gnubg_$(VERSION).orig/corecount.c
	find gnubg_$(VERSION).orig -name CVS -print0 | xargs -0 rm -r
	tar cf gnubg_$(VERSION).orig.tar gnubg_$(VERSION).orig
	rm -r gnubg_$(VERSION).orig
	gzip -9 gnubg_$(VERSION).orig.tar

configure: configure-stamp
configure-stamp:
	dh_testdir
	aclocal -I m4
	autoheader
	automake --add-missing --copy
	autoconf
	CFLAGS="$(CFLAGS)" ./configure --prefix=/usr \
	    --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \
	    --with-gtk --with-board3d --disable-sse --disable-threads \
	    $(SYSTEM)
	touch $@

# Prevent building of the two-sided database during each compile.  It takes
# way too long.
build: build-arch build-indep
build-arch: build-stamp
build-indep:
build-stamp: configure-stamp
	dh_testdir
	echo 'stop' > gnubg_ts0.bd
	$(MAKE)
	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -f configure-stamp build-stamp install-stamp
	[ ! -f Makefile ] || $(MAKE) distclean
	rm -rf autom4te.cache
	rm -f aclocal.m4 config.guess config.h.in config.h.in~ config.sub \
	    configure ltmain.sh ylwrap
	find . -name Makefile.in -print0 | xargs -0 rm
	dh_clean

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k
	$(MAKE) install DESTDIR=$(CURDIR)/debian/gnubg
	install -m 644 doc/gnubg/allabout.html \
	    $(CURDIR)/debian/gnubg/usr/share/gnubg/doc/allabout.html
	rm $(CURDIR)/debian/gnubg/usr/share/gnubg/gnubg_ts0.bd
	rm $(CURDIR)/debian/gnubg/usr/share/gnubg/fonts/COPYRIGHT.TXT.gz
	mv $(CURDIR)/debian/gnubg/usr/bin \
	    $(CURDIR)/debian/gnubg/usr/games
	install -d $(CURDIR)/debian/gnubg/usr/share/applications
	install -m 644 debian/gnubg.desktop \
	    $(CURDIR)/debian/gnubg/usr/share/applications/gnubg.desktop
	install -d $(CURDIR)/debian/gnubg/var/lib/gnubg
	install -d $(CURDIR)/debian/gnubg/usr/lib/gnubg
	install -d $(CURDIR)/debian/gnubg-data/usr/share
	mv $(CURDIR)/debian/gnubg/usr/share/gnubg \
	    $(CURDIR)/debian/gnubg-data/usr/share/
	mv $(CURDIR)/debian/gnubg-data/usr/share/gnubg/gnubg.wd \
	    $(CURDIR)/debian/gnubg/usr/lib/gnubg/gnubg.wd
	ln -s /usr/lib/gnubg/gnubg.wd \
	    $(CURDIR)/debian/gnubg-data/usr/share/gnubg/gnubg.wd
	mv $(CURDIR)/debian/gnubg/usr/share/locale \
	    $(CURDIR)/debian/gnubg-data/usr/share/
	install -d $(CURDIR)/debian/gnubg-data/usr/share/doc/gnubg
	ln -s ../../gnubg/doc \
	    $(CURDIR)/debian/gnubg-data/usr/share/doc/gnubg/manual
	install -m 644 doc/gnubg/allabout.pdf \
	    $(CURDIR)/debian/gnubg-data/usr/share/doc/gnubg/allabout.pdf
	install -m 644 doc/gnubg/gnubg.pdf \
	    $(CURDIR)/debian/gnubg-data/usr/share/doc/gnubg/gnubg.pdf
	touch $@

# Build architecture-independent files here.
# Pass -i to all debhelper commands in this target to reduce clutter.
binary-indep: DH_OPTIONS=-i
binary-indep: install-stamp
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_installinfo
	dh_link
	dh_strip
	dh_compress -X.pdf
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
# Pass -a to all debhelper commands in this target to reduce clutter.
binary-arch: DH_OPTIONS=-a
binary-arch: install-stamp
	dh_testdir
	dh_testroot
	dh_installchangelogs ChangeLog
	dh_installdebconf
	dh_installdocs
	dh_installmenu
	dh_installman
	dh_desktop
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-arch binary-indep
.PHONY: binary binary-arch binary-indep build build-arch build-indep clean
.PHONY: get-orig-source install