File: rules

package info (click to toggle)
xabacus 7.6-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,552 kB
  • ctags: 1,392
  • sloc: ansic: 16,435; sh: 3,220; makefile: 619
file content (87 lines) | stat: -rwxr-xr-x 2,534 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
#!/usr/bin/make -f
# -*- makefile -*-
#  # Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

#export DH_VERBOSE=1

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

CONFIGURE_FLAGS := --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
		    --prefix=/usr --bindir=/usr/games --with-xpm \
		    --without-rplay --with-esound --without-nas

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

build:
	true

build-motif-stamp:
	dh_testdir
	ln -sf /usr/share/misc/config.sub .
	ln -sf /usr/share/misc/config.guess .
	CFLAGS="$(CFLAGS)" ./configure $(CONFIGURE_FLAGS) --with-motif
	$(MAKE)
	touch $@

build-nomotif-stamp:
	dh_testdir
	[ ! -f Makefile ] || $(MAKE) -i distclean
	CFLAGS="$(CFLAGS)" ./configure $(CONFIGURE_FLAGS) --without-motif
	$(MAKE)
	touch $@

clean:
	dh_testdir
	dh_testroot
	[ ! -f Makefile ] || $(MAKE) -i distclean
	dh_clean build-motif-stamp build-nomotif-stamp config.sub config.guess

install: install-motif-stamp install-nomotif-stamp
	install -D -m 0644 debian/xabacus.lintian-overrides $(CURDIR)/debian/xabacus/usr/share/lintian/overrides/xabacus
	for INFIX in '' m ; do \
		set -e ; \
		install -D debian/x$${INFIX}abacus.desktop \
			$(CURDIR)/debian/x$${INFIX}abacus/usr/share/applications/x$${INFIX}abacus.desktop ; \
		PIXDIR=$(CURDIR)/debian/x$${INFIX}abacus/usr/share/pixmaps ; \
		install -D -m 0644 $(CURDIR)/pixmaps/abacus.t.xpm $$PIXDIR/x$${INFIX}abacus.t.xpm ; \
		install -D -m 0644 $(CURDIR)/pixmaps/abacus.m.xpm $$PIXDIR/x$${INFIX}abacus.m.xpm ; \
		rm $(CURDIR)/debian/x$${INFIX}abacus/usr/share/games/xabacus/Abacus.ps ; \
	done

install-motif-stamp: build-motif-stamp
	dh_testroot
	$(MAKE) install DESTDIR=$(CURDIR)/debian/xmabacus xapploaddir=/etc/X11/app-defaults

install-nomotif-stamp: build-nomotif-stamp
	dh_testroot
	$(MAKE) install DESTDIR=$(CURDIR)/debian/xabacus xapploaddir=/etc/X11/app-defaults

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

binary-arch: install
	dh_testdir -a
	dh_testroot -a
	dh_installdocs -a -A debian/README.Debian Abacus.ps README TODO
	dh_installmenu -a
	dh_installman -a
	dh_installchangelogs -a ChangeLog
	dh_strip -a
	dh_link -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

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