File: rules

package info (click to toggle)
gcompris 8.2.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 112,176 kB
  • ctags: 5,509
  • sloc: ansic: 48,377; python: 13,367; sh: 8,871; xml: 3,880; makefile: 949; perl: 30
file content (122 lines) | stat: -rwxr-xr-x 3,260 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
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper. 
# GNU copyright 1997 by Joey Hess.
#
# This version is for a hypothetical package that builds an
# architecture-dependant package, as well as an architecture-independent
# package.

export LC_ALL=C

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

LIBPKG=$(shell grep 'Package: libgc' debian/control | head -1 | cut -d' ' -f2)
DEVPKG=$(shell grep 'Package: libgc.*-dev' debian/control | cut -d' ' -f2)

SOUNDLANGS=$(shell grep 'Package: gcompris-sound-' debian/control | cut -d- -f3)

topdir=$(shell pwd)
debdir=${topdir}/debian
tmpdir=${debdir}/tmp

configure: configure-stamp
configure-stamp:
	dh_testdir

 # Ensure autotools are not needed to build, despite aclocal having
 # been run on the source pkg.
#	touch configure.in && touch aclocal.m4 && touch configure

 # --datadir=\$${prefix}/share/games causes problems to /usr/share/gnome/

	./configure CFLAGS="-g -O2" --prefix=/usr --mandir=/usr/share/man \
	  --infodir=/usr/share/info --sysconfdir=/etc \
	  --x-libraries=/usr/lib \
	  --without-editor \
	  --with-python=/usr/bin/python --enable-py-build-only

	touch configure-stamp

build: configure-stamp build-stamp
build-stamp:
	dh_testdir
	${MAKE}
	${MAKE} -C docs/C # gcompris.ps

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
#	rm -rf autom4te.cache po/.intltool-merge-cache
	-$(MAKE) distclean

	dh_clean

install: DH_OPTIONS=
install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	$(MAKE) install DESTDIR=${tmpdir}
	rm -f debian/tmp/usr/share/info/dir* debian/tmp/usr/lib/menu/*
	cd debian/tmp/usr && mkdir -p games && mv bin/gcompris* games/
	dh_movefiles
	test -z "`find ${tmpdir} -not -type d | tee /dev/fd/2`"

# Build architecture-independent files here.
# Pass -i to all debhelper commands in this target to reduce clutter.
#binary-indep: DH_OPTIONS=-i
binary-indep: build install
	dh_testdir -i
	dh_testroot -i
	for lang in ${SOUNDLANGS}; do \
	  pkg=gcompris-sound-$${lang}; \
	  mkdir -p ${debdir}/$${pkg}/usr/share/doc; \
	  ln -s gcompris-data ${debdir}/$${pkg}/usr/share/doc/$${pkg}; \
	done
	dh_installdocs -i
	find debian/gcompris-data -name 'Makefile*' | xargs rm -f
	dh_buildinfo -i
	dh_installinfo -pgcompris-data docs/C/gcompris.info
#	dh_undocumented -i
	dh_installchangelogs -i ChangeLog
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	echo >>debian/${DEVPKG}.substvars "gcompris:Runtime=${LIBPKG}"
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
# Pass -a to all debhelper commands in this target to reduce clutter.
binary-arch: DH_OPTIONS=-a
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installmenu
	mkdir -p ${debdir}/gcompris/usr/share/doc/gcompris-data
	ln -s gcompris-data ${debdir}/gcompris/usr/share/doc/gcompris
	dh_installdocs
	dh_installchangelogs -i ChangeLog
	dh_buildinfo
	rm -rf ${debdir}/gcompris/usr/share/doc/gcompris-data
	dh_strip
	dh_link
	dh_compress
	dh_fixperms
	dh_python
	dh_makeshlibs -V
	dh_installdeb
	dh_shlibdeps -ldebian/${LIBPKG}/usr/lib -L${LIBPKG}
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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