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)))
24 ifneq (,$(CONCURRENCY_LEVEL))
25 MAKE_FLAGS += -j $(CONCURRENCY_LEVEL)
28 PYTHON_CSPEC = /usr/include/python2.5/
29 PYTHON = /usr/bin/python2.5
31 config.status: configure
33 QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
38 touch `find . -name Makefile.in`
40 CFLAGS="$(CFLAGS)" PYTHON_CSPEC="$(PYTHON_CSPEC)" PYTHON="$(PYTHON)" \
41 ./configure $(confflags) --enable-static \
42 --disable-optimization --disable-sse --without-1394libs \
43 --disable-openmp --with-python
46 build-stamp: config.status
48 $(MAKE) $(MAKE_FLAGS) CFLAGS="$(CFLAGS)" CXXFLAGS="$(CFLAGS)"
55 [ ! -f Makefile ] || $(MAKE) distclean
56 rm -f tests/cv/src/lt-cvtest.lst tests/cv/src/lt-cvtest.sum
57 QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2
66 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
68 mkdir -p debian/tmp/usr/share/doc/opencv-doc
69 # mv debian/tmp/usr/share/opencv/doc/* debian/tmp/usr/share/doc/opencv-doc/
70 mv debian/tmp/usr/share/opencv/readme.txt debian/tmp/usr/share/doc/opencv-doc/
71 mv debian/tmp/usr/share/opencv/samples debian/tmp/usr/share/doc/opencv-doc/examples
72 # Install files in their required packages
73 dh_install --sourcedir=debian/tmp --list-missing -Xlicense.txt -X.pyc -X.pyo
75 binary-indep: build install
78 dh_installchangelogs -i ChangeLog
79 dh_installdocs -i AUTHORS THANKS TODO debian/README.Debian
81 mv debian/opencv-doc/usr/share/doc/opencv-doc/examples/c/Makefile.debian debian/opencv-doc/usr/share/doc/opencv-doc/examples/c/Makefile
82 (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)
83 #dh_install -p opencv-doc docs/*.rtf usr/share/doc/opencv-doc
84 #dh_install -p opencv-doc docs/*.pdf usr/share/doc/opencv-doc
85 #dh_install -p opencv-doc docs/*.htm usr/share/doc/opencv-doc/html
86 #dh_install -p opencv-doc docs/*.jpg usr/share/doc/opencv-doc/html
87 #dh_install -p opencv-doc docs/ref usr/share/doc/opencv-doc/html
91 dh_compress -i -Xexamples
98 binary-arch: build install
101 dh_installchangelogs -a ChangeLog
102 dh_installdocs -a AUTHORS THANKS TODO debian/README.Debian
103 dh_installexamples -a
117 binary: binary-indep binary-arch
118 .PHONY: build clean binary-indep binary-arch binary install