File: rules

package info (click to toggle)
nec 2-14.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,460 kB
  • ctags: 3,105
  • sloc: fortran: 16,407; makefile: 141; ansic: 6
file content (108 lines) | stat: -rwxr-xr-x 3,364 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
#!/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.

package=nec

INSTALL = /usr/bin/install
INSTALL_PROGRAM = $(INSTALL) -o root -g root -m 0755

FFLAGS = -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
FFLAGS += -O0
else
FFLAGS += -O2
endif

ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif 

build:
	$(checkdir)
	
	$(MAKE) FC=fort77 F77=fort77 FFLAGS="$(FFLAGS)" 
	touch build

clean:
	$(checkdir)
	-rm -f build
	$(MAKE) clean
	-rm -f `find . -name "*~"`
	-rm -rf debian/tmp `find debian/* -type d ! -name CVS ` debian/files* core
	-rm -f debian/*substvars
	dh_clean nec/nec2.o nec/nec2.c

binary-indep: checkroot build
	$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch: checkroot build
	$(checkdir)
	-rm -rf debian/tmp `find debian/* -type d`
	install -d debian/tmp
	install -d debian/tmp/DEBIAN
	cd debian/tmp && install -d `cat ../dirs`
	$(MAKE) install DESTDIR=`pwd`/debian/tmp INSTALL_PROGRAM="$(INSTALL_PROGRAM)"
	install -d `pwd`/debian/tmp/usr/share/doc/$(package)
	install -d `pwd`/debian/tmp/usr/share/doc/$(package)/NECdoc
	install -d `pwd`/debian/tmp/usr/share/doc/$(package)/NECdoc/cards
	install -d `pwd`/debian/tmp/usr/share/doc/$(package)/NECdoc/examples
	install -d `pwd`/debian/tmp/usr/share/doc/$(package)/NECdoc/gifs


	install -d `pwd`/debian/tmp/usr/share/doc/$(package)/examples
	install -o root -g root -m 0644 \
		doc/Input-Specification \
		`pwd`/debian/tmp/usr/share/doc/$(package)
	gzip -9v `pwd`/debian/tmp/usr/share/doc/$(package)/Input-Specification
	install -o root -g root -m 0644 \
		doc/NECdoc/*.html `pwd`/debian/tmp/usr/share/doc/$(package)/NECdoc
	install -o root -g root -m 0644 \
		doc/NECdoc/gifs/*.gif   \
		`pwd`/debian/tmp/usr/share/doc/$(package)/NECdoc/gifs
	install -o root -g root -m 0644 \
		doc/NECdoc/cards/*.html \
		`pwd`/debian/tmp/usr/share/doc/$(package)/NECdoc/cards
	install -o root -g root -m 0644 \
   		examples/* `pwd`/debian/tmp/usr/share/doc/$(package)/examples
	install -o root -g root -m 0644 \
	 	doc/NECdoc/examples/* \
		`pwd`/debian/tmp/usr/share/doc/$(package)/NECdoc/examples
	install -o root -g root -m 0644 \
               nec/nec2.1 \
	        `pwd`/debian/tmp/usr/share/man/man1/nec2.1
	install -o root -g root -m 0644 \
               nec/nec2small.1 \
	        `pwd`/debian/tmp/usr/share/man/man1/nec2small.1
	install -o root -g root -m 0644 \
	        somnec/somnec.1 \
		`pwd`/debian/tmp/usr/share/man/man1/somnec.1
	gzip -9v `pwd`/debian/tmp/usr/share/man/man1/*.1
	cp debian/copyright `pwd`/debian/tmp/usr/share/doc/$(package)/.
	cp README `pwd`/debian/tmp/usr/share/doc/$(package)/changelog 
	cp debian/changelog \
	     debian/tmp/usr/share/doc/$(package)/changelog.Debian
	cd debian/tmp/usr/share/doc/$(package) && \
             gzip -9v changelog changelog.Debian

	dpkg-shlibdeps nec/nec2 somnec/somnec
	dpkg-gencontrol -isp -pnec
	dh_md5sums --tmpdir=debian/tmp
	chown -R root.root debian/tmp
	chmod -R go=rX debian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f debian/rules
endef

binary: binary-indep binary-arch

checkroot:
	$(checkdir)
	test root = "`whoami`"

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