5 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
6 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
8 confflags = --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
9 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
10 confflags += --build $(DEB_HOST_GNU_TYPE)
12 confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
16 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
21 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
25 config.status: configure
27 QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
32 touch `find . -name Makefile.in`
34 CFLAGS="$(CFLAGS)" ./configure $(confflags) --enable-static --enable-python --with-apps
37 build-stamp: config.status
39 $(MAKE) CFLAGS="$(CFLAGS)" CXXFLAGS="$(CFLAGS)"
47 rm -f tests/cv/src/lt-cvtest.lst tests/cv/src/lt-cvtest.sum
48 QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2
56 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
58 mkdir -p debian/tmp/usr/share/doc/opencv-doc
59 mv debian/tmp/usr/share/opencv/doc/* debian/tmp/usr/share/doc/opencv-doc/
60 mv debian/tmp/usr/share/opencv/readme.txt debian/tmp/usr/share/doc/opencv-doc/
61 mv debian/tmp/usr/share/opencv/samples debian/tmp/usr/share/doc/opencv-doc/examples
62 # Remove useless files
63 rm -f `find debian/tmp -name license.txt`
64 rm -f `find debian/tmp -name '*.py[co]'`
65 # Install files in their required packages
66 dh_install --sourcedir=debian/tmp --list-missing
68 binary-indep: build install
71 dh_installchangelogs -i ChangeLog
72 dh_installdocs -i AUTHORS THANKS TODO debian/README.Debian
73 dh_installexamples -p opencv-doc samples/c/*.c samples/c/*.png samples/c/*.jpg samples/c/Makefile.debian
74 mv debian/opencv-doc/usr/share/doc/opencv-doc/examples/Makefile.debian debian/opencv-doc/usr/share/doc/opencv-doc/examples/Makefile
75 (cd debian/opencv-doc/usr/share/doc/opencv-doc/examples/python/; cp minidemo.py tmp ; echo '#!/usr/bin/python' >| minidemo.py ; cat tmp >> minidemo.py ; rm -f tmp)
76 #dh_install -p opencv-doc docs/*.rtf usr/share/doc/opencv-doc
77 #dh_install -p opencv-doc docs/*.pdf usr/share/doc/opencv-doc
78 #dh_install -p opencv-doc docs/*.htm usr/share/doc/opencv-doc/html
79 #dh_install -p opencv-doc docs/*.jpg usr/share/doc/opencv-doc/html
80 #dh_install -p opencv-doc docs/ref usr/share/doc/opencv-doc/html
94 dh_compress -i -Xexamples
105 binary-arch: build install
108 dh_installchangelogs -a ChangeLog
109 dh_installdocs -a AUTHORS THANKS TODO debian/README.Debian
110 dh_installexamples -a
114 # dh_installlogrotate
121 dh_installman -p libcv-dev debian/opencv-config.1
135 binary: binary-indep binary-arch
136 .PHONY: build clean binary-indep binary-arch binary install