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 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
|
#!/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
INSTALL =/usr/bin/install
GZIP =/bin/gzip
INSTALL_DATA =$(INSTALL) -m644 -o root -g root
INSTALL_STRIP =$(INSTALL) -m755 -o root -g root -s
GZIP_DATA =$(GZIP) -9
INSTALL_DIR = $(INSTALL) -d -m755 -o root -g root
# Construct the library dependency entry for shlibs
#
shl1=lib$(package) $(vm) pgplot5 (>= $(version))
build: build-stamp
build-stamp:
dh_testdir
# 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
exec debian/changeperl
cd $(bdir);make;make clean;make cpg;make pgplot.html;make pgplot-routines.tex
# -cd $(bdir); rm *.o
cd $(bdir) ; make clean; make FFLAGC="-u -Wall -O2 -fPIC" CFLAGC="-Wall -fPIC -D_REENTRANT -DPG_PPU -O3" VM="$(version_major)" shared
touch build-stamp
clean:
dh_testdir
dh_testroot
-rm -rf static shared
-rm -f build-stamp install-stamp
-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
dh_clean
install: install-stamp
install-stamp: build-stamp
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(INSTALL_DATA) $(bdir)/libpgplot.a debian/tmp/usr/lib/
$(INSTALL_DATA) $(bdir)/libcpgplot.a debian/tmp/usr/lib/
$(INSTALL_DATA) $(bdir)/libpgplot.so debian/tmp/usr/lib/libpgplot.so.$(version)
strip --strip-unneeded debian/tmp/usr/lib/libpgplot.so.$(version)
ln -s lib$(package).so.$(version) debian/tmp/usr/lib/lib$(package).so.$(version_major)
ln -s lib$(package).so.$(version_major) debian/tmp/usr/lib/lib$(package).so
# chmod 644 debian/tmp/usr/lib/$(npackage)/*
$(INSTALL_DATA) $(bdir)/cpgplot.h debian/tmp/usr/include/
# $(INSTALL_STRIP) $(bdir)/pgdisp debian/tmp/usr/bin/
# install $(bdir)/pgbind debian/tmp/usr/bin/
$(INSTALL_STRIP) $(bdir)/pgxwin_server debian/tmp/usr/bin/
# cd debian/tmp/usr/bin ; strip --strip-unneeded pgdisp pgxwin_server
$(INSTALL_DATA) $(bdir)/grexec.f debian/tmp/usr/lib/$(npackage)
$(INSTALL_DATA) $(bdir)/grfont.dat debian/tmp/usr/lib/$(npackage)
$(INSTALL_DATA) $(bdir)/grexec.f debian/tmp/usr/lib/$(npackage)
$(INSTALL_DATA) $(bdir)/rgb.txt debian/tmp/usr/lib/$(npackage)
$(INSTALL_DATA) $(bdir)/grpckg1.inc debian/tmp/usr/lib/$(npackage)
dh_movefiles
touch install-stamp
binary-indep: build install
# $(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: build install
# dh_testversion
dh_testdir -a
dh_testroot -a
# -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_DATA) $(bdir)/pgplot.doc debian/tmp/usr/share/doc/$(npackage)
$(GZIP_DATA) debian/tmp/usr/share/doc/$(npackage)/pgplot.doc
# cp pgdispd/aaaread.me debian/tmp/usr/share/doc/$(npackage)/pgdisp.txt
# $(GZIP_DATA) debian/tmp/usr/share/doc/$(npackage)/pgdisp.txt
$(INSTALL_DATA) $(bdir)/drivers.list debian/tmp/usr/share/doc/$(npackage)
$(GZIP_DATA) debian/tmp/usr/share/doc/$(npackage)/drivers.list
$(INSTALL_DATA) $(bdir)/pgplot-routines.tex debian/tmp/usr/share/doc/$(npackage)
$(GZIP_DATA) debian/tmp/usr/share/doc/$(npackage)/pgplot-routines.tex
$(INSTALL_DATA) $(bdir)/pgplot.html debian/tmp/usr/share/doc/$(npackage)
$(INSTALL_DATA) cpg/cpgplot.doc debian/tmp/usr/share/doc/$(npackage)
$(GZIP_DATA) debian/tmp/usr/share/doc/$(npackage)/cpgplot.doc
# $(INSTALL_DATA) cpg/cpgdemo.c debian/tmp/usr/share/doc/$(npackage)/examples
# $(INSTALL_DATA) debian/pgplot.3x debian/tmp/usr/man/man3
# gzip -9v debian/tmp/usr/man/man3/*
dh_installmanpages
dh_undocumented
$(INSTALL_DATA) aaaread.me debian/tmp/usr/share/doc/$(npackage)
$(INSTALL_DATA) install-unix.txt debian/tmp/usr/share/doc/$(npackage)
$(INSTALL_DATA) ver5*.txt debian/tmp/usr/share/doc/$(npackage)
dh_installexamples examples/*.f
dh_installexamples cpg/cpgdemo.c
# cp examples/* debian/tmp/usr/share/doc/$(npackage)/examples
# Install installation scripts
#
# cp debian/postinst debian/tmp/DEBIAN/.
# chmod +x debian/tmp/DEBIAN/postinst
dh_installchangelogs
$(INSTALL_DATA) debian/copyright debian/tmp/usr/share/doc/$(npackage)
$(INSTALL_DATA) debian/changelog debian/tmp/usr/share/doc/$(npackage)/changelog.Debian
$(GZIP_DATA) debian/tmp/usr/share/doc/$(npackage)/changelog.Debian
dh_strip -a debian/tmp/usr/bin/*
dh_makeshlibs -a
dh_link -a
dh_dhelp
dh_compress -a
dh_fixperms -a
dh_suidregister -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
# 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: build clean binary-indep binary-arch binary install
|