File: rules

package info (click to toggle)
mgp 1.06a.19991206-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,388 kB
  • ctags: 2,575
  • sloc: ansic: 28,968; sh: 2,874; lisp: 877; yacc: 786; lex: 244; makefile: 95; perl: 12; awk: 9
file content (87 lines) | stat: -rwxr-xr-x 2,416 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
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

DEB_HOST_GUN_TYPE := `dpkg-architecture -qDEB_HOST_GNU_TYPE`
package=mgp

build: build-stamp
build-stamp:
	dh_testdir

	./configure --prefix=/usr --enable-freetype-charset16 --enable-locale --enable-gif $(DEB_HOST_GNU_TYPE)
	xmkmf
	make Makefiles
	# XXX: it take too much time to comile unimap.c with -O
	make CFLAGS="-g -Wall -DFREETYPEFONTDIR=\\\"/usr/share/fonts/truetype/\\\"" ctlwords.h unimap.o
	make CFLAGS="-O2 -g -Wall -DFREETYPEFONTDIR=\\\"/usr/share/fonts/truetype/\\\""

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	-rm -f build-stamp install-stamp
	-make distclean
	-rm -f `find . -name "*~"`
	-rm -rf debian/tmp debian/files* core debian/substvars
	-rm -f Makefile
	dh_clean

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs
	make install DESTDIR=`pwd`/debian/tmp prefix=`pwd`/debian/tmp/usr
	make install.man DESTDIR=`pwd`/debian/tmp prefix=`pwd`/debian/tmp/usr
	# contrib 
	install -d `pwd`/debian/tmp/usr/share/doc/mgp/contrib/mgp-el
	install -m 644 contrib/mgp-el/{README,mgp.sty,sample.tex} \
		`pwd`/debian/tmp/usr/share/doc/mgp/contrib/mgp-el
	install -m 755 contrib/eqn2eps.sh \
		contrib/mgp2html.pl contrib/mgp2latex.pl \
		contrib/tex2eps.sh \
		`pwd`/debian/tmp/usr/bin/
	install -m 644 contrib/mgp-mode.el contrib/mgp-el/mgp.el \
		`pwd`/debian/tmp/usr/share/emacs/site-lisp/mgp
	touch install-stamp

# 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_installdocs COPYRIGHT COPYRIGHT.jp FAQ \
		README README.fonts README.fonts.jp README.lang \
		SYNTAX TODO.jp USAGE USAGE.jp 
	dh_installexamples `find sample -type f -print`
	dh_installmenu
	dh_installmime
	dh_installcron
	dh_installmanpages xmindpath.1
	dh_installinit
	dh_installemacsen
	dh_installchangelogs 
#	dh_movefiles
	dh_strip
	dh_compress --exclude=examples
	dh_fixperms
	dh_suidregister
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_makeshlibs
	dh_md5sums
	dh_builddeb

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

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