File: rules

package info (click to toggle)
pgplot5 5.2-8
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 6,268 kB
  • ctags: 5,900
  • sloc: fortran: 37,938; ansic: 18,809; sh: 1,136; objc: 532; perl: 443; makefile: 271; pascal: 233; tcl: 178; awk: 51; csh: 25
file content (123 lines) | stat: -rwxr-xr-x 4,339 bytes parent folder | download | duplicates (12)
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
#!/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=pgplot
npackage=pgplot5

version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*')

vm=$(version_major)

curdir=$(shell pwd)
bdir=debian/builddir


# Construct the library dependency entry for shlibs
#
shl1=lib$(package)  $(vm) pgplot5 (>= $(version))

build:
	$(checkdir)
	
	# create the build directory and copy configuration files to it.	

	install -d  $(bdir)
	cp debian/drivers.list.debian $(bdir)/drivers.list
	cp sys_linux/g77_elf.conf sys_linux/g77_elf.conf.orig 
	cp debian/g77_elf.conf.debian sys_linux/g77_elf.conf
	cd $(bdir); $(curdir)/makemake $(curdir)  linux g77_elf
	debian/changeperl
	cd $(bdir);make;make clean;make cpg;make pgplot.html;make pgplot-routines.tex
	-cd $(bdir); rm *.o
	cd $(bdir) ; make  FFLAGC="-u -Wall  -O2 -fPIC" CFLAGC="-Wall -fPIC -DPG_PPU -O3" \
                  VM=$(version_major)  shared
	touch build

clean:
	$(checkdir)
	-rm -rf static shared
	-rm -f build
	-rm -rf $(bdir)
#	-make clean
	-rm -f `find . -name "*~"`
	-rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core
	-rm -f debian/*substvars

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
	install -d  debian/tmp/DEBIAN

# Insert appropriate lines into shlibs file
#
	echo -e '$(shl1)\n' >debian/tmp/DEBIAN/shlibs

	install -d debian/tmp/usr/doc/$(npackage)/examples
	install -d debian/tmp/usr/lib/$(npackage)
	install -d debian/tmp/usr/bin
	cd debian/tmp && install -d `cat ../dirs`
	install -m644 $(bdir)/libpgplot.a  debian/tmp/usr/lib/
	strip --strip-unneeded  $(bdir)/libpgplot.so 
	install -m644 $(bdir)/libpgplot.so  debian/tmp/usr/lib/libpgplot.so.$(version)
	install -m644 $(bdir)/libcpgplot.a  debian/tmp/usr/lib/
	install -m644 $(bdir)/cpgplot.h debian/tmp/usr/include/
	install -m644 $(bdir)/pgplot.doc debian/tmp/usr/doc/$(npackage)
	cp  pgdispd/aaaread.me  debian/tmp/usr/doc/$(npackage)/pgdisp.txt
	install -m644 $(bdir)/drivers.list debian/tmp/usr/doc/$(npackage)
	install -m644 $(bdir)/pgplot-routines.tex debian/tmp/usr/doc/$(npackage)
	install -m644 $(bdir)/pgplot.html debian/tmp/usr/doc/$(npackage)
	install -m644 cpg/cpgplot.doc debian/tmp/usr/doc/$(npackage)
	install -m644 cpg/cpgdemo.c debian/tmp/usr/doc/$(npackage)/examples
	install  $(bdir)/pgdisp debian/tmp/usr/bin/
#	install  $(bdir)/pgbind debian/tmp/usr/bin/
	install  $(bdir)/pgxwin_server  debian/tmp/usr/bin/
	cd debian/tmp/usr/bin ; strip --strip-unneeded pgdisp  pgxwin_server
	install -m644 $(bdir)/grexec.f debian/tmp/usr/lib/$(npackage)
	install -m644 $(bdir)/grfont.dat debian/tmp/usr/lib/$(npackage)
	install -m644 $(bdir)/grexec.f debian/tmp/usr/lib/$(npackage)
	install -m644 $(bdir)/rgb.txt debian/tmp/usr/lib/$(npackage)
	install -m644 $(bdir)/grpckg1.inc debian/tmp/usr/lib/$(npackage)
	install -m644 debian/pgplot.3x debian/tmp/usr/man/man3
	gzip -9v debian/tmp/usr/man/man3/*
	install -m644 aaaread.me debian/tmp/usr/doc/$(npackage)
	install -m644 install-unix.txt debian/tmp/usr/doc/$(npackage)
	install -m644 ver5*.txt debian/tmp/usr/doc/$(npackage)
	cp examples/* debian/tmp/usr/doc/$(npackage)/examples
	cd debian/tmp/usr/lib/; ln -s lib$(package).so.$(version) lib$(package).so.$(version_major)
	cd debian/tmp/usr/lib/; ln -s lib$(package).so.$(version_major) lib$(package).so
	chmod 644 debian/tmp/usr/lib/$(npackage)/*

# Install installation scripts
#
	cp debian/postinst debian/tmp/DEBIAN/.
	chmod +x debian/tmp/DEBIAN/postinst

	cp debian/README.debian debian/tmp/usr/doc/$(npackage)
	cp debian/changelog debian/tmp/usr/doc/$(npackage)/changelog.Debian
	gzip -9v debian/tmp/usr/doc/$(npackage)/changelog.Debian
	cp debian/copyright debian/tmp/usr/doc/$(npackage)
	dpkg-shlibdeps debian/tmp/usr/lib/libpgplot.so.$(version)
	dpkg-gencontrol
	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