File: rules

package info (click to toggle)
gnubik 2.2-7
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,616 kB
  • ctags: 1,825
  • sloc: ansic: 13,874; sh: 4,215; makefile: 553; lisp: 462; yacc: 288; sed: 16
file content (86 lines) | stat: -rwxr-xr-x 2,242 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
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

#export DH_VERBOSE=1

PACKAGE=$(shell dh_listpackages)

DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

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

config.status: configure
	dh_testdir
	ln -sf /usr/share/misc/config.sub	config.sub
	ln -sf /usr/share/misc/config.guess	config.guess
	CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
		--build=$(DEB_BUILD_GNU_TYPE) \
		--prefix=/usr --bindir=\$${prefix}/games \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info \
		--with-guile

build: build-stamp
build-stamp:  config.status
	dh_testdir
	# bug#336797
	[ ! -f po/fr_FR.po ] || mv -f po/fr_FR.po po/fr.po
	[ ! -f po/fr_FR.gmo ] || mv -f po/fr_FR.gmo po/fr.gmo
	$(MAKE)	LDFLAGS="-Wl,--export-dynamic -L/usr/X11R6/lib -lgtkglext-x11-1.0" \
		GTKLIBS="" LIBS="" GUILE_LDFLAGS="-lguile" gnubik_LDADD="-lguile"
	( cd $(CURDIR)/po && $(MAKE) de.gmo )
	touch $@

clean:
	dh_testdir
	dh_testroot
	-rm -f build-stamp
	[ ! -f Makefile ] || $(MAKE) -i distclean
	# bug#336797
	[ ! -f po/fr.po ] || mv -f po/fr.po po/fr_FR.po
	[ ! -f po/fr.gmo ] || mv -f po/fr.gmo po/fr_FR.gmo
	dh_clean config.sub config.guess po/de.gmo

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs
	$(MAKE) install DESTDIR=$(CURDIR)/debian/$(PACKAGE)
	rm -rf $(CURDIR)/debian/$(PACKAGE)/usr/share/info
	install -D -m 0644 src/gnubik.xpm \
		$(CURDIR)/debian/$(PACKAGE)/usr/share/pixmaps/gnubik.xpm
	install -D -m 644 debian/gnubik.desktop \
		$(CURDIR)/debian/$(PACKAGE)/usr/share/applications/gnubik.desktop

binary-indep: build install
# We have nothing to do by default.

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs ChangeLog
	dh_installdocs
	dh_installmenu
	dh_installinfo doc/gnubik.info
	dh_link
	dh_desktop
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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