File: rules

package info (click to toggle)
libwebcam 0.2.4-1.1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 824 kB
  • ctags: 686
  • sloc: ansic: 5,863; xml: 1,574; makefile: 69; sh: 57
file content (107 lines) | stat: -rwxr-xr-x 2,815 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
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
#!/usr/bin/make -f

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

# Uncomment this to turn on all hardening flags
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# extra flags
#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs

CPPFLAGS=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)

# shared library version
version= 0.2.4
deb_version=$(shell dpkg-parsechangelog | sed -n 's/^Version: //p')

major=0

builddir/Makefile:
	dh_testdir
	# Add here commands to configure the package.
	mkdir -p builddir
	cd builddir && cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_C_FLAGS="$(CFLAGS)" \
		-DCMAKE_LD_FLAGS="$(LDFLAGS)" -DCMAKE_CXX_FLAGS="$(CXXFLAGS)" \
		-DCMAKE_SKIP_RPATH=ON -DCMAKE_VERBOSE_MAKEFILE=ON

#build-doxy: build-doxy-stamp
#build-doxy-stamp: $(QUILT_STAMPFN)
#	dh_testdir
#	doxygen
#	touch $@

build: build-arch build-indep

build-arch:  build-stamp

build-indep: build-stamp
	
build-stamp:  builddir/Makefile 
	dh_testdir
	# Add here commands to compile the package.
	$(MAKE) -C builddir
	touch $@

clean: 
	dh_testdir
	dh_testroot
	rm -f build-stamp 
	# Add here commands to clean up after the build process.
	rm -rf builddir
	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_prep  
	dh_installdirs
	# Add here commands to install the package into debian/tmp
	$(MAKE) -C builddir DESTDIR=$(CURDIR)/debian/tmp install
	dh_install --fail-missing --sourcedir=debian/tmp


# Build architecture-independent files (doc and data).
binary-indep: install
	dh_testdir -puvcdynctrl-data
	dh_testroot -puvcdynctrl-data
	dh_installchangelogs -puvcdynctrl-data
	dh_installdocs -puvcdynctrl-data debian/copyright
	dh_lintian -puvcdynctrl-data
	dh_link -puvcdynctrl-data
	dh_compress -puvcdynctrl-data
	dh_fixperms -puvcdynctrl-data
	dh_installdeb -puvcdynctrl-data
	dh_gencontrol -puvcdynctrl-data
	dh_md5sums -puvcdynctrl-data
# build deb packages 
	dh_builddeb -puvcdynctrl-data

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir -a
	dh_testroot -a
	dh_installchangelogs -a
	dh_installdocs -a debian/copyright
	dh_lintian -a
	dh_link -a
	dh_compress -a
	dh_fixperms -a
	dh_strip --exclude=uvcdynctrl --dbg-package=libwebcam0-dbg
	dh_strip --exclude=libwebcam0 --dbg-package=uvcdynctrl-dbg
# strict internal dependencies
	dh_makeshlibs -p"libwebcam0" -V"libwebcam0 (>= $(deb_version))";
	env LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$(CURDIR)/debian/tmp/usr/lib" \
	dh_shlibdeps
	dh_installdeb -a
	dh_gencontrol -a
	dh_md5sums -a
# build deb packages 
	dh_builddeb -a

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install