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
|
#!/usr/bin/make -f
# -*- mode: makefile; -*-
#
# Invoke each target with `./debian/rules <target>'. All targets should be
# invoked with the package root as the current directory.
p = xmgr
# The target architecture.
a = $(shell dpkg --print-architecture)
build:
# Builds the binary package.
./configure --prefix=`pwd`/debian/tmp/usr --with-x --enable-helpviewer="\"\\\"xterm -e lynx %s \\\"\"" --enable-editres --enable-f77 --enable-netcdf --enable-acegr-home=`pwd`/debian/tmp/usr/lib/xmgr --enable-debug
make
touch build
clean:
# Undoes the effect of `make -f debian/rules build'.
-make distclean
rm -f build debian/{files,substvars}
rm -rf debian/tmp
binary-indep: checkroot build
$(checkdir)
binary-arch: checkroot build
# Makes a binary package.
rm -rf debian/tmp
install -d -g root -m 755 -o root \
debian/tmp \
debian/tmp/DEBIAN \
debian/tmp/usr/doc/$(p) \
debian/tmp/usr/lib/menu \
debian/tmp/usr/X11R6/lib/X11/app-defaults
install -g root -m 755 -o root debian/postinst debian/postrm \
debian/tmp/DEBIAN/
install -g root -m 644 -o root debian/changelog \
debian/tmp/usr/doc/$(p)/changelog.Debian
install -g root -m 644 -o root debian/copyright \
debian/tmp/usr/doc/$(p)
install -o root -g root -m 644 debian/menu \
debian/tmp/usr/lib/menu/$(p)
make -C examples install GR_HOME=`pwd`/debian/tmp/usr/doc/$(p)
make -C doc install GR_HOME=`pwd`/debian/tmp/usr/doc/$(p)
make -C auxiliary install GR_HOME=`pwd`/debian/tmp/usr/doc/$(p)
make -C src install GR_HOME=`pwd`/debian/tmp/usr/X11R6
make -C acegr_np install GR_HOME=`pwd`/debian/tmp/usr
make -C grconvert install GR_HOME=`pwd`/debian/tmp/usr
install -g root -m 644 -o root src/XMgr.ad \
debian/tmp/usr/X11R6/lib/X11/app-defaults/XMgr
install -g root -m 644 -o root CHANGES \
debian/tmp/usr/doc/$(p)
chmod a-x debian/tmp/usr/doc/$(p)/examples/dotest
chmod a-x debian/tmp/usr/doc/$(p)/auxiliary/fdf2fit
cd debian/tmp/usr/doc/$(p) && \
gzip -9 changelog.Debian CHANGES examples/* auxiliary/*
ln -si CHANGES.gz debian/tmp/usr/doc/$(p)/changelog.gz
dpkg-shlibdeps src/xmgr
dpkg-gencontrol
chown -R root.root debian/tmp
chmod -R u+w debian/tmp
chmod -R og=rX debian/tmp
dpkg --build debian/tmp ..
binary: binary-arch binary-indep
define checkdir
test -f acegr_np/acegr_np.h
endef
# Below here is fairly generic really
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary source diff clean checkroot
|