File: rules

package info (click to toggle)
cimg 2.9.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 23,884 kB
  • sloc: cpp: 114,703; ansic: 78,987; javascript: 9,088; makefile: 604; sh: 135; python: 37
file content (69 lines) | stat: -rwxr-xr-x 2,416 bytes parent folder | download
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
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules for cimg-dev package
# GNU copyright 2009 Andreas Tille <tille@debian.org>

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 's?\(CFLAGS[[:space:]=]*-I\)\.\. -Wall -W?\1`pwd` -Wall -W?' 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

override_dh_auto_clean:
	-cd examples && $(MAKE) clean
	dh_clean