#!/usr/bin/make -f # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. # export DH_VERBOSE=1 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) CXXFLAGS += -g endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif ifndef CXX CXX = g++ endif SOVERSION=1.0.1 SOMAJOR=1 build: build-stamp build-stamp: patch-stamp dh_testdir if test -d include/CORE; then mv include/CORE include/CORE.orig; fi if test -d src/Core; then mv src/Core src/Core.orig; fi -rm -f make/makefile_* QTDIR=/usr/share/qt3 ./install_cgal -ni --CXX $(CXX) --without-autofind \ --with-ZLIB --with-BOOST --with-BOOSTPROGRAMOPTIONS --with-X11 \ --with-GMP --with-GMPXX --with-MPFR --with-CORE --with-QT3MT touch build-stamp clean: clean-patched unpatch clean-patched: patch dh_testdir dh_testroot rm -f build-stamp cd src/CGAL && OBJ_EXT=.o $(MAKE) clean cd src/CGALQt && OBJ_EXT=.o $(MAKE) clean -rm -f compile.log install.{log,completed} -rm -f config/testfiles/{a.out,*.o,tmp_test} -for DIR in include/CGAL/config/*; do \ if test x$$DIR != xinclude/CGAL/config/msvc7; then \ rm -fr $$DIR; \ fi; \ done -rm -f config/testfiles/redirect_tmpfile -rm -f config/testfiles/redirect_tmpfile.C -rm -f make/makefile_* -rm -fr lib/???????* -rm -fr config/install if test -d examples.orig; then rm -r examples && mv examples.orig examples; fi if test -d demo.orig; then rm -r demo && mv demo.orig demo; fi if test -d include/CORE.orig; then mv include/CORE.orig include/CORE; fi if test -d src/Core.orig; then mv src/Core.orig src/Core; fi dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs mkdir -p debian/tmp/{usr/bin,usr/include,usr/lib,usr/share/cgal,usr/share/doc/cgal,usr/share/linda/overrides/libcgal-dev} cp -a scripts/cgal_create_makefile debian/tmp/usr/bin cp -a include/{CGAL,OpenNL} debian/tmp/usr/include rm -r debian/tmp/usr/include/CGAL/config/msvc7 mv debian/tmp/usr/include/CGAL/config/*/CGAL/compiler_config.h debian/tmp/usr/include/CGAL rm -r debian/tmp/usr/include/CGAL/config rm debian/tmp/usr/include/OpenNL/LICENSE.OPENNL cp -a lib/*/libCGAL.{so.$(SOVERSION),a} debian/tmp/usr/lib cp -a lib/*/libCGALQt.a debian/tmp/usr/lib cd debian/tmp/usr/lib && ln -s libCGAL.so.$(SOVERSION) libCGAL.so.$(SOMAJOR) cd debian/tmp/usr/lib && ln -s libCGAL.so.$(SOVERSION) libCGAL.so cat make/makefile_* | sed -f debian/misc/adjust-default-makefile.sed >debian/tmp/usr/share/cgal/makefile mv examples examples.orig cp -a examples.orig examples find examples -iname makefile | xargs -r sed -i -f debian/misc/adjust-demo-examples-makefiles.sed tar cf - examples | gzip --best >debian/tmp/usr/share/doc/cgal/examples.tar.gz rm -r examples mv examples.orig examples mv demo demo.orig cp -a demo.orig demo find demo -iname makefile | xargs -r sed -i -f debian/misc/adjust-demo-examples-makefiles.sed tar cf - demo | gzip --best >debian/tmp/usr/share/doc/cgal/demo.tar.gz rm -r demo mv demo.orig demo cp -a CHANGES debian/tmp/usr/share/doc/cgal/changelog cp -a README debian/tmp/usr/share/doc/cgal dh_install --sourcedir=debian/tmp --list-missing ln -s libcgal1 debian/libcgal-demo/usr/share/doc/libcgal-demo ln -s libcgal1 debian/libcgal-dev/usr/share/doc/libcgal-dev install -d debian/libcgal1/DEBIAN install -m644 debian/libcgal1.shlibs debian/libcgal1/DEBIAN/shlibs install -d debian/libcgal-dev/usr/share/linda/overrides install -m644 debian/misc/linda-override debian/libcgal-dev/usr/share/linda/overrides/libcgal-dev binary-indep: build install dh_testdir -i dh_testroot -i dh_link -i dh_compress -i dh_fixperms -i dh_installdeb -i dh_gencontrol -i dh_md5sums -i dh_builddeb -i binary-arch: build install dh_testdir -a dh_testroot -a dh_installdocs -plibcgal1 debian/copyright dh_installchangelogs -plibcgal1 dh_installman -plibcgal-dev debian/misc/cgal_create_makefile.1 dh_link -a dh_strip -a dh_compress -a dh_fixperms -a dh_makeshlibs -a dh_installdeb -a dh_shlibdeps -a -ldebian/libcgal1/usr/lib dh_gencontrol -a dh_md5sums -a dh_builddeb -a binary: binary-indep binary-arch patch: patch-stamp patch-stamp: dpatch apply-all touch patch-stamp unpatch: dpatch deapply-all rm -fr patch-stamp debian/patched .PHONY: build clean binary-indep binary-arch binary install patch unpatch