File: rules

package info (click to toggle)
gri 2.12.27-1.2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,060 kB
  • sloc: cpp: 36,667; sh: 4,197; lisp: 3,764; perl: 1,362; ansic: 1,046; makefile: 589
file content (125 lines) | stat: -rwxr-xr-x 3,775 bytes parent folder | download | duplicates (3)
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
123
124
125
#!/usr/bin/make -f
# Made with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Also some stuff taken from debmake scripts, by Cristopt Lameter.

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

#version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
#version := $(shell grep ^VERSION Makefile | cut -d" " -f3)
version := $(shell perl -ne 'if (/AC_INIT\(gri, ([0-9.]+)\)/){print $$1}' configure.ac)
somefutureversion=2.14.0

CXXFLAGS = -O2 -Wall
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CXXFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
STRIPIT=1
endif

ARCH := $(shell dpkg --print-architecture | perl -pe chop)

build: build-indep build-arch

# Build architecture-dependent files here (no need to be root).
build-arch: debian/gri_merge.1 gri
	cd doc; make info

gri:    Makefile
	dh_testdir
ifeq ($(ARCH),m68k)
	cd src; make CXXFLAGS="-O0 -Wall" rpncalc.o
endif
	cd src; make CXXFLAGS=${CXXFLAGS}

clean:
	dh_testdir
	dh_testroot
	[ ! -f Makefile ] || $(MAKE) distclean
	mv doc/FAQ.html doc/FAQ.html.KEEP
	-rm -f config.log config.status debian/Makefile doc/*.html
	-rm -f doc/gri.info* doc/*.dvi doc/*.ps doc/*.pdf doc/*.log doc/html
	-rm -f doc/screenshots/*.pdf doc/examples/*.pdf
	-rm src/gri.cmd src/startup.msg-tmp
	mv doc/FAQ.html.KEEP doc/FAQ.html
	dh_autoreconf_clean
	dh_clean
	rm -f doc/gri_unpage.1 doc/gri_merge.1
	chmod u+w debian/changelog

install: gri
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	cd src; make install_linux_debian debian=`pwd`/../debian/gri

debian/gri_merge.1:
	cp doc/gri_unpage.1-skel doc/gri_unpage.1
	cp doc/gri_merge.1-skel doc/gri_merge.1

Makefile:
# To test on g++-3.0 :
#	CC=gcc-3.0 CXX=g++-3.0 ./configure --prefix=/usr
	#./configure --prefix=/usr --enable-linux_debian
	dh_autoreconf
	dh_auto_configure -- --enable-linux_debian

# Build architecture-independent files here (no need to be root).
build-indep: debian/gri_merge.1 Makefile
	cd doc; make refcard.ps cmdrefcard.ps gri.pdf html

# Install (as root) architecture-independent files here.
binary-indep: build-indep
	dh_testdir -i
	dh_testroot -i
	install -d debian/gri-el/usr/share/emacs/site-lisp/gri-el
	install -m 644 src/gri-mode.el debian/gri-el/usr/share/emacs/site-lisp/gri-el
	install -d debian/gri-pdf-doc/usr/share/doc/gri
	install -m 644 doc/gri.pdf debian/gri-pdf-doc/usr/share/doc/gri
	install -m 644 doc/refcard.ps debian/gri-pdf-doc/usr/share/doc/gri
	install -m 644 doc/cmdrefcard.ps debian/gri-pdf-doc/usr/share/doc/gri
	cd doc; make html-install DESTDIR=`pwd`/../debian/gri-html-doc/
	rm -f debian/*debhelper
	dh_installdocs -i -A README debian/README.Debian
	dh_installexamples -i
	dh_installemacsen -i
	dh_installchangelogs -i 
	dh_compress -i -X.jpg -Xlogo.gri
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Install (as root) architecture-dependent files here.
binary-arch: build-arch install
	dh_testdir -a
	dh_testroot -a
	(cd debian/gri/usr/share/gri/$(version) ; ln -fs ../../common-licenses/GPL license.txt)
	rm -f debian/*debhelper
	dh_installdocs -a README
	dh_installexamples -a
	dh_installemacsen -a
	dh_installinfo doc/gri.info*
	dh_installman debian/gri.1 doc/gri_unpage.1 doc/gri_merge.1
	(cd debian/gri/usr/share/man/man1 ; ln -fs gri.1.gz gri-$(version).1.gz)
	dh_installchangelogs -a 
        ifdef STRIPIT
		dh_strip -a
        endif
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

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