aboutsummaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorlecoanet2003-04-16 10:30:25 +0000
committerlecoanet2003-04-16 10:30:25 +0000
commit4deef84e6a3c5ba71e3ec2d7429fc347edbbc098 (patch)
tree4bc5bfa6f6ad34b1cc99aece84fb8185b147fcc5 /debian/rules
parent2e434e0a9aa6ca4f249b599191264f76943dd013 (diff)
downloadtkzinc-4deef84e6a3c5ba71e3ec2d7429fc347edbbc098.zip
tkzinc-4deef84e6a3c5ba71e3ec2d7429fc347edbbc098.tar.gz
tkzinc-4deef84e6a3c5ba71e3ec2d7429fc347edbbc098.tar.bz2
tkzinc-4deef84e6a3c5ba71e3ec2d7429fc347edbbc098.tar.xz
Update for the new make tool chain
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules209
1 files changed, 123 insertions, 86 deletions
diff --git a/debian/rules b/debian/rules
index 2adc8c3..bae8ebd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,99 +1,136 @@
#!/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.
+# Sample debian/rules that uses debhelper.
+# This file is public domain software, originally written by Joey Hess.
+#
+# This version is for a hypothetical package that builds an
+# architecture-dependant package, as well as an architecture-independent
+# package.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
-version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
-version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*')
+TMP=`pwd`/debian/tmp
+TMP_PERL=`pwd`/debian/zinc-perl
+TMP_PYTHON=`pwd`/debian/zinc-python
-INSTALLARCHLIB=`perl -MConfig -e 'print $$Config{installarchlib}'`
-INSTALL_PERL=pure_install PREFIX=`pwd`/debian/tmp/usr
+INSTALL_PERL=pure_install INSTALLDIRS=perl PREFIX=$(TMP)/usr
DEFAULT_VERSION_PYTHON=$(shell echo `dpkg -p python| grep -e "^Version:" |cut -d" " -f2|cut -d"." -f1-2` )
-ZINCPYTHON := $(shell pwd)/debian/zinc-python
-TMP=`pwd`/debian/tmp
+build: build-stamp
+build-stamp:
+ dh_testdir
-build:
- $(checkdir)
+ touch build-stamp
- ./configure --prefix=/usr/X11R6
+clean:
+ dh_testdir
+ dh_testroot
+ -rm -f build-stamp
+ -rm -f config.cache
+ -$(MAKE) clean
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
#
-# Build the static library (it does not need Position Independent Code,
-# which reserves one register; thus, without -fPIC we get more efficient
-# code).
+# Configuring/compiling/installing for perl/Tk.
+ ./configure --prefix=/usr --enable-ptk --enable-gl==damage
+ make perl
+ make perlinstall prefix=$(TMP)/usr INSTALL_PERL=$(INSTALL_PERL)
+
+ find $(TMP)/usr/lib/perl -type f -name .packlist | xargs rm -f
+ find $(TMP)/usr/lib/perl5 -type f -name .packlist | xargs rm -f
+
+ -mkdir -p $(TMP_PERL)/usr/lib
+ mv $(TMP)/usr/lib/perl $(TMP_PERL)/usr/lib
+ mv $(TMP)/usr/bin $(TMP_PERL)/usr
+ mv $(TMP)/usr/lib/libTkzinc*.so $(TMP_PERL)/usr/lib
+
+ dh_installman -pzinc-perl $(TMP)/usr/share/man/man3/*.3pm
+ dh_installman -pzinc-perl $(TMP)/usr/share/man/man1/*.1p
+
+ -rm -Rf $(TMP)/usr/share/perl
+ -rm -Rf $(TMP)/usr/share/man
+
#
- $(MAKE) -f Makefile tkzinc ptkzinc doc
- touch build
+# Configuring/compiling/installing for Tcl.
+ ./configure --prefix=/usr --enable-gl==damage
+ make clean binaries
+ make install prefix=$(TMP)/usr
-clean:
- $(checkdir)
- -rm -f build
- -rm -f config.cache
- -make distclean
- -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)
- $(MAKE) -f Makefile python
-
-binary-arch: checkroot build
- $(checkdir)
- install -d debian/tmp
-
- grep -q "usr/lib/python$(DEFAULT_VERSION_PYTHON)/site-packages" debian/dirs || echo "usr/lib/python$(DEFAULT_VERSION_PYTHON)/site-packages" >> debian/dirs
-
- cd debian/tmp && install -d `cat ../dirs`
- $(MAKE) install prefix=`pwd`/debian/tmp/usr INSTALL_PERL=$(INSTALL_PERL)
-
- -install -m644 doc/refman/*.html doc/refman/refman.css doc/refman/*.png debian/tmp/usr/share/doc/zinc-tk/refman
-# Correcting a bug still in the zinc Makefile.in. Why this hierarchy is created?
- -rm -r `pwd`/debian/tmp/usr/lib/perl/5.6.1/perl/
-
- install -m644 debian/copyright debian/tmp/usr/share/doc/zinc-perl
- install -m644 debian/changelog debian/tmp/usr/share/doc/zinc-perl
- install -m644 BUGS debian/tmp/usr/share/doc/zinc-perl
- gzip -9 debian/tmp/usr/share/doc/zinc-perl/changelog
- find debian/tmp/usr/lib/perl -type f -name .packlist | xargs rm -f
- find debian/tmp/usr/lib/perl5 -type f -name .packlist | xargs rm -f
-
- install -m644 Python/Zinc.py debian/tmp/usr/lib/python$(DEFAULT_VERSION_PYTHON)/site-packages/
- install -m644 debian/copyright debian/tmp/usr/share/doc/zinc-python
- install -m644 debian/changelog debian/tmp/usr/share/doc/zinc-python
- gzip -9 debian/tmp/usr/share/doc/zinc-python/changelog
- echo -e "usr/share/doc/zinc-python\nusr/lib/python$(DEFAULT_VERSION_PYTHON)" > debian/zinc-python.files
-
-# strip --strip-unneeded debian/tmp/usr/lib/tkzinc3.1.so
-# strip --strip-unneeded debian/tmp/usr/lib/libom.so
-# strip --strip-unneeded debian/tmp/usr/lib/libgpc.so
-# strip --strip-unneeded debian/tmp/usr/lib/libptkzinc3.1.so
-
- debstd -m -c -s BUGS doc/refman.pdf
- dh_md5sums
- -rm -Rf debian/tmp/usr/share/doc/zinc-perl debian/tmp/usr/lib/perl5
- -rm -Rf debian/tmp/usr/lib/perl debian/tmp/usr/share/perl
- -rm -Rf debian/tmp/usr/share/doc/zinc-python debian/tmp/usr/lib/python$(DEFAULT_VERSION_PYTHON)
- dpkg-gencontrol -VPythonVersion=$(DEFAULT_VERSION_PYTHON) -isp -pzinc-tk
- chown -R root.root debian/tmp
- chmod -R go=rX debian/tmp
- dpkg --build debian/tmp ..
- -rm -f debian/zinc-python.files
- mv debian/dirs debian/.dirs.tmp
- grep -v "usr/lib/python$(DEFAULT_VERSION_PYTHON)/site-packages" debian/.dirs.tmp >| debian/dirs
- rm -f debian/.dirs.tmp
-
-define checkdir
- test -f debian/rules
-endef
-
-# Below here is fairly generic really
-
-binary: binary-indep binary-arch
-
-checkroot:
- $(checkdir)
- test root = "`whoami`"
-
-.PHONY: binary binary-arch binary-indep clean checkroot
+ -mkdir -p $(TMP)/usr/share/doc/zinc-tk/refman
+ -install -m644 doc/refman.pdf $(TMP)/usr/share/doc/zinc-tk
+ -install -m644 doc/refman/*.html doc/refman/*.css doc/refman/*.png $(TMP)/usr/share/doc/zinc-tk/refman
+
+#
+# Configuring/compiling/installing for Python.
+ -mkdir -p $(TMP_PYTHON)/usr/lib/python$(DEFAULT_VERSION_PYTHON)/site-packages
+ -install -m644 Python/Zinc.py $(TMP_PYTHON)/usr/lib/python$(DEFAULT_VERSION_PYTHON)/site-packages
+
+# Build architecture-independent files here.
+binary-indep: build install
+ dh_testdir -i
+ dh_testroot -i
+ dh_installchangelogs -i
+ dh_installdocs -i BUGS
+ dh_installexamples -i
+ dh_install -i
+# dh_installmenu -i
+# dh_installdebconf -i
+# dh_installlogrotate -i
+# dh_installemacsen -i
+# dh_installpam -i
+# dh_installmime -i
+# dh_installinit -i
+# dh_installcron -i
+# dh_installinfo -i
+# dh_undocumented -i
+ dh_installman -i
+ dh_link -i
+ dh_compress -i
+ dh_fixperms -i
+ dh_installdeb -i
+# dh_perl -i
+ dh_gencontrol -i
+ dh_md5sums -i
+ dh_builddeb -i
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir -a
+ dh_testroot -a
+ dh_installchangelogs -a
+ dh_installdocs -a BUGS
+ dh_installexamples -a
+ dh_installmenu -a
+# dh_installdebconf -a
+# dh_installlogrotate -a
+# dh_installemacsen -a
+# dh_installpam -a
+# dh_installmime -a
+# dh_installinit -a
+# dh_installcron -a
+# dh_installinfo -a
+# dh_undocumented -a
+ dh_installman -a
+ dh_strip -a
+ dh_link -a
+ dh_compress -a
+ dh_fixperms -a
+# dh_makeshlibs -a
+ dh_installdeb -a
+# dh_perl -a
+ dh_shlibdeps -a
+ dh_gencontrol -a
+ dh_md5sums -a
+ dh_builddeb -a
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install