summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 54eca76cbdb2360cb3ac8fd0eebbceb801892502 (plain)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#!/usr/bin/make -f

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -Wl,--no-undefined

####CC:=ccache $(CC)

%:
	dh $@ --with quilt,autoreconf

# Doesn't work for now.
#--parallel

override_dh_auto_configure:
	chmod +x ./configure

	dh_auto_configure -- \
	CC="$(CC)"

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_auto_clean:
	dh_clean imdi/imdi_k.c ref/RefMediumGamut.gam \
	libusb/Makefile libusb/config.h libusb/config.log libusb/usb.h	\
	libusb/config.status libusb/doc/Makefile libusb/libtool		\
	libusb/libusb-config libusb/libusb.pc libusb/stamp-h1		\
	libusb/tests/Makefile firmware-package-builder/*.tar.gz

	[ ! $(shell grep jam Makefile) ] || rm Makefile

	[ ! -f Makefile ] || $(MAKE) distclean

	find -name Makefile.in | xargs -r rm

override_dh_auto_install: firmware-package-builder/spyder2.tar.gz
	$(MAKE) install -i DESTDIR=$(CURDIR)/debian/tmp
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp

	rm debian/tmp/usr/share/doc/argyll/DocLicense.txt
	rm debian/tmp/usr/share/doc/argyll/License.txt

	-rm `find $(CURDIR)/debian/tmp -name '*.la'`

override_dh_install:
	dh_install -X.a -X.la --fail-missing

#	for i in $$(cat debian/libicc2.install debian/libicc-dev.install) ; do rm -f $(CURDIR)/debian/argyll/$$i ; done
#	rm $(CURDIR)/debian/argyll/usr/share/doc/argyll/License.txt $(CURDIR)/debian/argyll/usr/share/doc/argyll/DocLicense.txt
#	for i in average refine targen verify ; do mv $(CURDIR)/debian/argyll/usr/bin/$$i $(CURDIR)/debian/argyll/usr/bin/argyll-$$i ; done

override_dh_installchangelogs:
	dh_installchangelogs log.txt

LIBICC_VERSION=$(shell awk -F= '/^LIBICC_VERSION=/ { print $$2 }' icc/Makefile.am)
ARGYLL_VERSION=$(shell dpkg-parsechangelog | awk '/^Version:/ { print $$2 }')

override_dh_gencontrol:
	dh_gencontrol -plibicc2 -- -v$(LIBICC_VERSION)+argyll$(ARGYLL_VERSION)
	dh_gencontrol -plibicc-dev -- -v$(LIBICC_VERSION)+argyll$(ARGYLL_VERSION)
	dh_gencontrol --remaining-packages

#build: firmware-package-builder/spyder2.tar.gz

firmware-package-builder/%.tar.gz: firmware-package-builder/argyll-firmware-%
	chmod +x $</debian/rules
	tar cfCz $@ firmware-package-builder $(notdir $<)

override_dh_strip:
	dh_strip --dbg-package=argyll-dbg

override_dh_makeshlibs:
	dh_makeshlibs -- -c4

override_dh_builddeb:
	dh_builddeb -- -Zbzip2

build-manpages:
	help2man -N --no-discard-stderr --name="Dump an ICC file in human readable form." debian/tmp/usr/bin/iccdump > debian/iccdump.1
	help2man -N --no-discard-stderr --name="Translate colors through an ICC profile." debian/tmp/usr/bin/icclu > debian/icclu.1
	help2man -N --no-discard-stderr --name="Apply device calibration to an ICC profile." debian/tmp/usr/bin/applycal > debian/applycal.1
	help2man -N --no-discard-stderr --name="Average or merge values in .ti3 like files." debian/tmp/usr/bin/average > debian/average.1
	help2man -N --no-discard-stderr --name="Convert Colorblind raw device profile data to Argyll data." debian/tmp/usr/bin/cb2ti3 > debian/cb2ti3.1
	help2man -N --no-discard-stderr --name="Color Correct a TIFF file using any sequence of ICC profiles or Calibrations." debian/tmp/usr/bin/cctiff > debian/cctiff.1
	help2man -N --no-discard-stderr --name="Plot spectrum and calculate CCT and VCT." debian/tmp/usr/bin/ccttest > debian/ccttest.1
	help2man -N --no-discard-stderr --name="Create CCMX or CCSS." debian/tmp/usr/bin/ccxxmake > debian/ccxxmake.1
	help2man -N --no-discard-stderr --name="Read Target Test Chart." debian/tmp/usr/bin/chartread > debian/chartread.1
	help2man -N --no-discard-stderr --name="Link ICC profiles." debian/tmp/usr/bin/collink > debian/collink.1
	help2man -N --no-discard-stderr --name="Create ICC profile." debian/tmp/usr/bin/colprof > debian/colprof.1
	help2man -N --no-discard-stderr --name="Calibrate a Display." debian/tmp/usr/bin/dispcal > debian/dispcal.1
	help2man -N --no-discard-stderr --name="Read a Display." debian/tmp/usr/bin/dispread > debian/dispread.1
	help2man -N --no-discard-stderr --name="Test display patch window, Set Video LUTs, Install profiles." debian/tmp/usr/bin/dispwin > debian/dispwin.1
	help2man -N --no-discard-stderr --name="Extract an ICC profile from a TIFF file." debian/tmp/usr/bin/extracticc > debian/extracticc.1
	help2man -N --no-discard-stderr --name="Extract a text tag from an ICC profile." debian/tmp/usr/bin/extractttag > debian/extractttag.1
	help2man -N --no-discard-stderr --name="Create a fake CMY data file from a CMYK profile." debian/tmp/usr/bin/fakeCMY > debian/fakeCMY.1
	help2man -N --no-discard-stderr --name="Fake test chart reader - lookup values in ICC/MPP profile." debian/tmp/usr/bin/fakeread > debian/fakeread.1
	help2man -N --no-discard-stderr --name="Convert a TIFF file to monochrome using an ICC device profile." debian/tmp/usr/bin/greytiff > debian/greytiff.1
	help2man -N --no-discard-stderr --name="Dump an ICC file in human readable form." debian/tmp/usr/bin/iccdump > debian/iccdump.1
	help2man -N --no-discard-stderr --name="Create Lab/Jab gamut plot." debian/tmp/usr/bin/iccgamut > debian/iccgamut.1
	help2man -N --no-discard-stderr --name="Measure an illuminant." debian/tmp/usr/bin/illumread > debian/illumread.1
	help2man -N --no-discard-stderr --name="Check fwd to bwd relative transfer of an ICC file." debian/tmp/usr/bin/invprofcheck > debian/invprofcheck.1
	help2man -N --no-discard-stderr --name="Convert Kodak raw printer profile data to Argyll print data." debian/tmp/usr/bin/kodak2ti3 > debian/kodak2ti3.1
	help2man -N --no-discard-stderr --name="Check Model Printer Profile." debian/tmp/usr/bin/mppcheck > debian/mppcheck.1
	help2man -N --no-discard-stderr --name="Translate colors through an MPP profile." debian/tmp/usr/bin/mpplu > debian/mpplu.1
	help2man -N --no-discard-stderr --name="Create Model Printer Profile." debian/tmp/usr/bin/mppprof > debian/mppprof.1
	help2man -N --no-discard-stderr --name="Plot device space path L in/out curve from an ICC link file." debian/tmp/usr/bin/pathplot > debian/pathplot.1
	help2man -N --no-discard-stderr --name="Create printer calibration." debian/tmp/usr/bin/printcal > debian/printcal.1
	help2man -N --no-discard-stderr --name="Generate Target PostScrip file." debian/tmp/usr/bin/printtarg > debian/printtarg.1
	help2man -N --no-discard-stderr --name="Check accuracy of ICC profile." debian/tmp/usr/bin/profcheck > debian/profcheck.1
	help2man -N --no-discard-stderr --name="Create abstract correction profile given table of absolute CIE correction values." debian/tmp/usr/bin/refine > debian/refine.1
	help2man -N --no-discard-stderr --name="Invert AtoB1 to make BtoA1 for CMYK profiles." debian/tmp/usr/bin/revfix > debian/revfix.1
	help2man -N --no-discard-stderr --name="Scanin." debian/tmp/usr/bin/scanin > debian/scanin.1
	help2man -N --no-discard-stderr --name="Create Simple CMYK Device Profile." debian/tmp/usr/bin/simpprof > debian/simpprof.1
	help2man -N --no-discard-stderr --name="Convert spectral .ti3 file." debian/tmp/usr/bin/spec2cie > debian/spec2cie.1
	help2man -N --no-discard-stderr --name="Plot spectrum and calculate CCT and VCT." debian/tmp/usr/bin/specplot > debian/specplot.1
	help2man -N --no-discard-stderr --name="Split a .ti3 into two." debian/tmp/usr/bin/splitti3 > debian/splitti3.1
	help2man -N --no-discard-stderr --name="Read Print Spot values." debian/tmp/usr/bin/spotread > debian/spotread.1
	help2man -N --no-discard-stderr --name="Create a synthetic calibration file." debian/tmp/usr/bin/synthcal > debian/synthcal.1
	help2man -N --no-discard-stderr --name="Synthetic device model test chart reader." debian/tmp/usr/bin/synthread > debian/synthread.1
	help2man -N --no-discard-stderr --name="Generate Target deviceb test chart color values." debian/tmp/usr/bin/targen > debian/targen.1
	help2man -N --no-discard-stderr --name="Create VRML image of the gamut surface of a TIFF." debian/tmp/usr/bin/tiffgamut > debian/tiffgamut.1
	help2man -N --no-discard-stderr --name="Convert Gretag/Logo or X-Rite ColorPport raw RGB or CMYK device profile data to Argyll CGATS data." debian/tmp/usr/bin/txt2ti3 > debian/txt2ti3.1
	help2man -N --no-discard-stderr --name="Verify CIE values." debian/tmp/usr/bin/verify > debian/verify.1
	help2man -N --no-discard-stderr --name="View gamuts." debian/tmp/usr/bin/viewgam > debian/viewgam.1
	help2man -N --no-discard-stderr --name="Translate colors through an xicc." debian/tmp/usr/bin/xicclu > debian/xicclu.1
	help2man -N --no-discard-stderr --name="List information about the FILEs." debian/tmp/usr/bin/oeminst > debian/oeminst.1