File: rules

package info (click to toggle)
aribas 1.63-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,340 kB
  • ctags: 2,351
  • sloc: ansic: 25,551; pascal: 384; asm: 201; lisp: 133; makefile: 78; sh: 53
file content (68 lines) | stat: -rwxr-xr-x 1,402 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
#!/usr/bin/make -f
# debian/rules for aribas

#export DH_VERBOSE=1

include /usr/share/dpatch/dpatch.make

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	OPTFLAGS=-O0 
else	
	OPTFLAGS=-O
endif	

build: build-stamp
build-stamp: patch
	if [ "$(DEB_BUILD_ARCH)" = "i386" ];\
	then \
		cp src/LINUX/arito386.S src;\
		ASSOBJECTS="arito386.S";\
		EXTRAFLAGS="-DLiNUX -DPROTO";\
	else \
		ASSOBJECTS="";\
		EXTRAFLAGS="-DUNiX -DPROTO";\
	fi;\
	cd src && make -f LINUX/Makefile.linux\
			CC=gcc\
			CFLAGS="$(OPTFLAGS) $$EXTRAFLAGS"\
			ASSOBJECTS="$$ASSOBJECTS"
	touch build-stamp

clean: unpatch
	dh_testdir
	dh_testroot
	rm -f build-stamp
	cd src; make clean; rm -f aribas arito386.S
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	install -m 755 src/aribas debian/aribas/usr/bin
	cp src/EL/aribas.el debian/aribas/usr/share/emacs/site-lisp/aribas
	cp src/aribas.hlp debian/aribas/usr/lib/aribas
	cp CHANGES*.txt debian/aribas/usr/share/doc/aribas/changelog

binary-indep: build install

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples examples/*
	dh_installemacsen
	dh_installman doc/aribas.1
	dh_installchangelogs
	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 patch unpatch