File: rules

package info (click to toggle)
gaby 2.0.2-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 6,148 kB
  • ctags: 3,101
  • sloc: ansic: 48,660; sh: 8,710; python: 1,161; makefile: 951; perl: 265; sed: 93; xml: 89; sql: 25
file content (122 lines) | stat: -rwxr-xr-x 3,219 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 to 1999 by Joey Hess.

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

# This is the debhelper compatability version to use.
export DH_COMPAT=3

BASEDIR=`pwd`/debian/gaby
GNOMEDATADIR=$(BASEDIR)/`gnome-config --datadir`

configure: configure-stamp
configure-stamp:
	dh_testdir
	# Add here commands to configure the package.
	./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc --disable-static

	touch configure-stamp

build: configure-stamp build-stamp
build-stamp:
	dh_testdir

	# Commands to compile the package.
	$(MAKE)
#	( cd plug-ins/interpreter/python && make gabymodule.so )

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

	# Commands to clean up after the build process.
	-$(MAKE) distclean

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Commands to install the package into $BASEDIR.
	$(MAKE) install prefix=$(BASEDIR)/usr \
			sysconfdir=$(BASEDIR)/etc \
			SKIPGNOMEDATA=1
	#( cd plug-ins/interpreter/python && \
	#	make install-module DESTDIR=../../../debian/tmp )
	
	rm -f $(BASEDIR)/usr/share/doc/gaby/COPYING
	
	mkdir -p $(GNOMEDATADIR)/pixmaps
	cp gnome-gaby*.png $(GNOMEDATADIR)/pixmaps
	
	mkdir -p $(GNOMEDATADIR)/gnome/apps/Applications
	cp *.desktop $(GNOMEDATADIR)/gnome/apps/Applications
	
	# TODO: shouldn't have to tell which languages to install...
	cp -v doc/fr/topic.dat $(BASEDIR)/usr/share/doc/gaby/fr
	cp -v doc/C/topic.dat $(BASEDIR)/usr/share/doc/gaby/C
	
	mkdir -p $(GNOMEDATADIR)/gnome/help/gaby
	ln -s ../../../doc/gaby/C $(GNOMEDATADIR)/gnome/help/gaby/C
	ln -s ../../../doc/gaby/en $(GNOMEDATADIR)/gnome/help/gaby/en
	ln -s ../../../doc/gaby/fr $(GNOMEDATADIR)/gnome/help/gaby/fr

	rm -f $(BASEDIR)/usr/bin/gcd $(BASEDIR)/usr/bin/videobase \
		$(BASEDIR)/usr/bin/gnomecard $(BASEDIR)/usr/bin/appindex \
		$(BASEDIR)/usr/bin/appindex-gaby
	
	rm -f $(BASEDIR)/etc/gaby/desc.gabysql

	for F in $(BASEDIR)/usr/share/gaby/scripts/actions/*; \
	do \
		grep '^#!' $$F 2> /dev/null || chmod -x $$F; \
	done

	for F in `find plug-ins builder data doc -name README`; do \
		cp -av $$F $(BASEDIR)/usr/share/doc/gaby/README.`echo $$F | \
			sed -e 's/\/README//' -e 's/\//\./g' `; \
	done
	
	

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

# Build architecture-dependent files here.
binary-arch: build install
#	dh_testversion
	dh_testdir
	dh_testroot
#	dh_installdebconf	
	dh_installdocs
	dh_installexamples
	dh_installmenu
	dh_installmanpages
	dh_installinfo
	ln -s gaby.1.gz $(BASEDIR)/usr/share/man/man1/gbc.1.gz
	ln -s gaby.1.gz $(BASEDIR)/usr/share/man/man1/gcd-gaby.1.gz
	ln -s gaby.1.gz $(BASEDIR)/usr/share/man/man1/gnomecard-gaby.1.gz
	ln -s gaby.1.gz $(BASEDIR)/usr/share/man/man1/videobase-gaby.1.gz
	dh_undocumented	gabyprint.1 gabyscript.1
	dh_installchangelogs ChangeLog
	dh_link
	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