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
|
#!/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
version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*')
curdir=$(shell pwd)
bdir=debian/builddir
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
#
# First build the shared library
#
# cd shared ; \
# $(MAKE) -f ../Makefile VPATH=".." srcdir=".." \
# CFLAGS="-O2 -fPIC -pipe" ; \
# gcc -shared -Wl,-soname,$(package).so.$(version_major) -o $(package).so.$(version) `ls *.o`
# #
# # Build the static library (it does not need Position Independent Code,
# # which reserves one register; thus, without -fPIC we get more efficient
# # code).
# #
# cd static ; \
# $(MAKE) -f ../Makefile VPATH=".." srcdir=".." \
# CFLAGS="-O2 -pipe" LDFLAGS="-s" progs
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/usr/doc/$(package)/examples
install -d debian/tmp/usr/lib/$(package)
install -d debian/tmp/usr/bin
cd debian/tmp && install -d `cat ../dirs`
install -m644 $(bdir)/libpgplot.a debian/tmp/usr/lib/
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)/cpgdemo debian/tmp/usr/doc/$(package)/examples
install -m644 $(bdir)/pgdemo* debian/tmp/usr/doc/$(package)/examples
install -m644 $(bdir)/pgplot.doc debian/tmp/usr/doc/$(package)
install -m644 $(bdir)/drivers.list debian/tmp/usr/doc/$(package)
install -m644 $(bdir)/pgplot-routines.tex debian/tmp/usr/doc/$(package)
install -m644 $(bdir)/pgplot.html debian/tmp/usr/doc/$(package)
install $(bdir)/pgdisp debian/tmp/usr/bin/
install $(bdir)/pgbind debian/tmp/usr/bin/
install $(bdir)/pgxwin_server debian/tmp/usr/bin/
install -m644 $(bdir)/grexec.f debian/tmp/usr/lib/$(package)
install -m644 $(bdir)/grfont.dat debian/tmp/usr/lib/$(package)
install -m644 $(bdir)/grexec.f debian/tmp/usr/lib/$(package)
install -m644 $(bdir)/rgb.txt debian/tmp/usr/lib/$(package)
install -m644 $(bdir)/grpckg1.inc debian/tmp/usr/lib/$(package)
install -m644 debian/pgplot.3x debian/tmp/usr/man/man3
install -m644 aaaread.me debian/tmp/usr/doc/$(package)
install -m644 install-unix.txt debian/tmp/usr/doc/$(package)
install -m644 ver5*.txt debian/tmp/usr/doc/$(package)
chmod +x debian/tmp/usr/doc/$(package)/examples/*
cp examples/* debian/tmp/usr/doc/$(package)/examples
dpkg-shlibdeps $(bdir)/libpgplot.so
debstd
dpkg-gencontrol
chown -R root.root debian/tmp
chmod -R go=rX debian/tmp
dpkg --build debian/tmp ..
chmod +x debian/tmp/usr/doc/$(package)/examples/*
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
|