File: rules

package info (click to toggle)
pgplot5 5.2.2-19.8
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 7,192 kB
  • sloc: fortran: 39,795; ansic: 22,554; objc: 1,534; sh: 1,298; makefile: 269; pascal: 233; perl: 209; tcl: 190; awk: 51; csh: 25
file content (122 lines) | stat: -rwxr-xr-x 4,340 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#!/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.
# modified by Gopal Narayanan <gopal@debian.org> to use
# debhelper commands

include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk

package=pgplot
npackage=pgplot5

version=$(DEB_VERSION_UPSTREAM)
version_major=$(firstword $(subst .,  ,$(version)))

vm=$(version_major)

# for better reproducibility
export LC_ALL=C.UTF-8

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

# Decide if changes for 64 bit systems need to be made
#
64-BIT_BUILD_STAMP =
64-BIT_CLEAN_STAMP =
ifeq (64,$(DEB_BUILD_ARCH_BITS))
        64-BIT_BUILD_STAMP = 64-bit-patch-stamp
        64-BIT_CLEAN_STAMP = 64-bit-clean-stamp
endif

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

# Restore 32-bit files
#
64-bit-clean-stamp:
	mv debian/gidriv.f drivers/gidriv.f
	mv debian/ppdriv.f drivers/ppdriv.f
	mv debian/wddriv.f drivers/wddriv.f
	rm 64-bit-patch-stamp

# Move 64-bit-safe files into position
#
64-bit-patch-stamp:
	mv drivers/gidriv.f debian/gidriv.f
	cp debian/gidriv_64.f drivers/gidriv.f
	mv drivers/ppdriv.f debian/ppdriv.f
	cp debian/ppdriv_64.f drivers/ppdriv.f
	mv drivers/wddriv.f debian/wddriv.f
	cp debian/wddriv_64.f drivers/wddriv.f
	touch 64-bit-patch-stamp

%:
	dh $@ --builddirectory=$(bdir)

CPPFLAGS	+= -DPG_PPU
CFLAGS		+= -Wall
CFLAGS		+= -std=gnu17
FFLAGS		+= -u -Wall
override_dh_auto_build: $(64-BIT_BUILD_STAMP)
	install -d  $(bdir)
	cp debian/drivers.list.debian $(bdir)/drivers.list
	cp sys_linux/g77_gcc.conf sys_linux/g77_gcc.conf.orig
	cp debian/g77_gcc.conf.debian sys_linux/g77_gcc.conf
	cd $(bdir) && $(curdir)/makemake $(curdir) linux g77_gcc
	$(MAKE) -C $(bdir) FFLAGC="$(FFLAGS) -fallow-argument-mismatch" FFLAGD="$(FFLAGS) $(LDFLAGS)" CFLAGC="$(CPPFLAGS) $(CFLAGS)" LDFLAGS="$(LDFLAGS)" all
	$(MAKE) -C $(bdir) clean
	$(MAKE) -C $(bdir) FFLAGC="$(FFLAGS)" CFLAGC="$(CPPFLAGS) $(CFLAGS)" CFLAGD="$(CPPFLAGS) $(CFLAGS)" LDFLAGS="$(LDFLAGS)" cpg
	$(MAKE) -C $(bdir) pgplot.html
	$(MAKE) -C $(bdir) pgplot-routines.tex
	$(MAKE) -C $(bdir) clean
	$(MAKE) -C $(bdir) FFLAGC="$(FFLAGS) -fPIC -fallow-argument-mismatch" CFLAGC="$(CPPFLAGS) $(CFLAGS) -fPIC -D_REENTRANT" LDFLAGS="$(LDFLAGS)" VM="$(version_major)" shared cpg-shared

	mv $(bdir)/libpgplot.so $(bdir)/libpgplot.so.$(version)
	ln -s libpgplot.so.$(version) $(bdir)/libpgplot.so.$(version_major)
	ln -s libpgplot.so.$(version_major) $(bdir)/libpgplot.so

	mv -f $(bdir)/libcpgplot.so $(bdir)/libcpgplot.so.$(version)
	ln -s libcpgplot.so.$(version) $(bdir)/libcpgplot.so.$(version_major)
	ln -s libcpgplot.so.$(version_major) $(bdir)/libcpgplot.so

override_dh_auto_clean:
	test ! -f sys_linux/g77_gcc.conf.orig || mv sys_linux/g77_gcc.conf.orig sys_linux/g77_gcc.conf
	-rm -rf static shared
	-rm -f build-stamp install-stamp
	-rm -rf $(bdir)
	-rm -f debian/*substvars
	dh_auto_clean

override_dh_auto_install: $(64-BIT_CLEAN_STAMP)
	dh_install -plibpgplot5 $(bdir)/libpgplot.so.* /usr/lib/$(DEB_HOST_MULTIARCH)/
	dh_install -plibpgplot5 $(bdir)/libcpgplot.so.* /usr/lib/$(DEB_HOST_MULTIARCH)/

	dh_install -ppgplot5-dev $(bdir)/libpgplot.a /usr/lib/$(DEB_HOST_MULTIARCH)/
	dh_install -ppgplot5-dev $(bdir)/libcpgplot.a /usr/lib/$(DEB_HOST_MULTIARCH)/
	dh_install -ppgplot5-dev $(bdir)/libpgplot.so /usr/lib/$(DEB_HOST_MULTIARCH)/
	dh_install -ppgplot5-dev $(bdir)/libcpgplot.so /usr/lib/$(DEB_HOST_MULTIARCH)/
	dh_install -ppgplot5-dev $(bdir)/cpgplot.h /usr/include/

	dh_install $(bdir)/pgxwin_server /usr/bin/

	dh_install $(bdir)/grexec.f /usr/lib/$(npackage)
	dh_install $(bdir)/grfont.dat /usr/lib/$(npackage)
	dh_install $(bdir)/grexec.f /usr/lib/$(npackage)
	dh_install $(bdir)/rgb.txt /usr/lib/$(npackage)
	dh_install $(bdir)/grpckg1.inc /usr/lib/$(npackage)

	dh_install $(bdir)/pgplot.doc /usr/share/doc/$(npackage)
	dh_install $(bdir)/drivers.list /usr/share/doc/$(npackage)
	dh_install $(bdir)/pgplot-routines.tex /usr/share/doc/$(npackage)
	dh_install $(bdir)/pgplot.html /usr/share/doc/$(npackage)
	dh_install cpg/cpgplot.doc /usr/share/doc/$(npackage)
	dh_install aaaread.me /usr/share/doc/$(npackage)
	dh_install ver5*.txt /usr/share/doc/$(npackage)

	dh_installexamples examples/*.f
	dh_installexamples cpg/cpgdemo.c

override_dh_dwz: