#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules for cimg-dev package # GNU copyright 2009 Andreas Tille pkg=cimg-dev examples=cimg-examples doc=cimg-doc %: dh $@ override_dh_compress: dh_compress --exclude=.shtml \ --exclude=.pdf \ --exclude=.h \ --exclude=.cpp \ --exclude=.bmp \ --exclude=.pgm \ --exclude=.ppm \ --exclude=Makefile \ --exclude=.raw \ --exclude=.gmic override_dh_installdocs: dh_installdocs find debian/cimg-doc -type f -name "*.html" -exec debian/remove_privacy_violating_js_code \{\} \; override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) cd examples && $(MAKE) Mlinux "LDFLAGS=-lm -lpthread -lHalf" # After test build of examples remove remaining object files cd examples && $(MAKE) clean endif CHANGEFILES=gaussian_fit1d.cpp \ use_RGBclass.cpp override_dh_clean: dh_clean rm -rf html/latex html/reference html/doxygen_sqlite3.db override_dh_auto_build: dh_auto_build cd html && doxygen CImg.doxygen ## since version 2.4.5 for some mysterious reason the generation ## of PDF documentation does not work in pbuilder while it generates ## nicely on a local testing machine. The reason are not missing ## texlive-* dependencies - it was tried to install all those texlive-* ## packages from the testing machine into the pbuilder chroot and it ## kept on failing. So go without the pdf documentation until this ## might be fixed # && cd latex && sed -i 's/pdflatex *refman/pdflatex -interaction=batchmode refman || true/' Makefile && make || true # autogenerated makefile lacks a final pdflatex call to get references right (that's why the above '|| true') # cd html/latex && pdflatex -interaction=batchmode refman || true override_dh_install: dh_install # In gaussian_fit1d.cpp the files is included into itself and thus the current directory needs to be in include path cd debian/$(examples)/usr/share/doc/$(pkg)/examples; \ sed -i \ -e 's?\(CFLAGS[[:space:]=]*-I\)\.\. -Wall -W?\1`pwd` -Wall -W?' \ -e 's?\.\.//CImg.h?/usr/include/CImg.h?g' \ Makefile; \ for file in $(CHANGEFILES) ; do \ sed -i "s?#define cimg_plugin \"examples/$$file\"?#define cimg_plugin \"$$file\"?" $$file ; \ done mv html/reference/* debian/$(doc)/usr/share/doc/cimg-dev/html find debian -type f -name "_form*" -delete override_dh_auto_clean: -cd examples && $(MAKE) clean dh_clean