File: rules

package info (click to toggle)
node-opencv 6.0.0+git20190322.db093cb2-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 23,208 kB
  • sloc: xml: 476,274; cpp: 6,019; makefile: 56; sh: 25; ansic: 20
file content (57 lines) | stat: -rwxr-xr-x 1,750 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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/dpkg/pkg-info.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export PKG_CONFIG_OPENCV4=1

%:
	dh $@

override_dh_auto_configure:
	find $(CURDIR) -name '*.xml' -exec chmod a-x {} \;
	find $(CURDIR) -name '*.html' -exec chmod a-x {} \;
	find $(CURDIR) -name '*.gyp' -exec chmod a-x {} \;
	find $(CURDIR) -name '*.md' -exec chmod a-x {} \;
	find $(CURDIR) -name '*.png' -exec chmod a-x {} \;
	find $(CURDIR) -name '*.jpg' -exec chmod a-x {} \;
	find $(CURDIR) -name '*.h' -exec chmod a-x {} \;
	chmod a-x examples/make-example-files.sh
	chmod a-x examples/make-example-files.sh
	dh_auto_configure
	node-gyp configure

override_dh_auto_build:
	node-gyp build
	find $(CURDIR)/build -name 'opencv.node' -exec chmod a-x {} \;

override_dh_auto_clean:
	dh_auto_clean
	rm -rf node_modules
	rm -rf build

override_dh_installexamples:
	dh_installexamples -Xtmp/

DEB_UPSTREAM_VERSION := $(shell echo $(DEB_VERSION) | sed -e 's/-[^-]*$$//')
GIT_URL = https://github.com/peterbraden/node-opencv.git
get-orig-source:
	set -e; if echo $(DEB_VERSION) | grep -c "git"; \
	then \
		git_version=`echo $(DEB_VERSION) | sed -e 's/^.*git\([0-9]*\)*\.\(.*\)-.*$$/\2/g'`; \
	else \
		git_version=$(DEB_UPSTREAM_VERSION); \
	fi; \
	tmpdir=`mktemp -d -t`; \
	cd $$tmpdir; \
	echo "checkout upstream repository ..."; \
	git clone $(GIT_URL); echo "getting specific upstream revision/tag: $$git_version"; \
	cd `ls | head -n 1`; git checkout -b orig $$git_version; cd ..; \
	tar --exclude=.git --exclude='*.exe' --exclude='*.jar' -czvf $(CURDIR)/$(DEB_SOURCE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz `ls | head -n 1`; \
	cd $(CURDIR); \
	rm -rf $$tmpdir