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
|
#!/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
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
# Decide if changes for 64 bit systems need to be made
#
64-BIT_BUILD_STAMP =
64-BIT_CLEAN_STAMP =
ifeq (64,$(shell dpkg-architecture -qDEB_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)
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
cd $(bdir); make FFLAGC="-u -Wall -g -O2 -fallow-argument-mismatch" CFLAGC="-Wall -DPG_PPU -g -O3" all \
; make clean \
; make FFLAGC="-u -Wall -g -O2" CFLAGC="-Wall -DPG_PPU -O3" cpg \
; make pgplot.html \
; make pgplot-routines.tex
cd $(bdir); make clean \
; make FFLAGC="-u -Wall -g -O2 -fPIC -fallow-argument-mismatch" CFLAGC="-Wall -fPIC -D_REENTRANT -DPG_PPU -g -O3" VM="$(version_major)" shared cpg-shared
mv $(bdir)/libpgplot.so $(bdir)/libpgplot.so.$(version)
cd $(bdir); ln -s libpgplot.so.$(version) libpgplot.so.$(version_major)
cd $(bdir); ln -s libpgplot.so.$(version_major) libpgplot.so
mv -f $(bdir)/libcpgplot.so $(bdir)/libcpgplot.so.$(version)
cd $(bdir); ln -s libcpgplot.so.$(version) libcpgplot.so.$(version_major)
cd $(bdir); ln -s libcpgplot.so.$(version_major) libcpgplot.so
override_dh_auto_clean:
-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 $(bdir)/libpgplot.* /usr/lib/
dh_install $(bdir)/libcpgplot.* /usr/lib/
dh_install $(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
|