File: rules

package info (click to toggle)
owfs 2.8p15-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,460 kB
  • sloc: ansic: 56,355; sh: 11,666; tcl: 1,962; makefile: 1,163; python: 1,114; php: 600; perl: 393; cpp: 105
file content (105 lines) | stat: -rwxr-xr-x 3,180 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
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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

DH_OPTIONS=--with python2 --with quilt --with autotools_dev

# export necessary for (hardening) flags for perl
DEB_CPPFLAGS += `dpkg-buildflags --get CPPFLAGS`
DEB_CFLAGS += `dpkg-buildflags --get CFLAGS`
DEB_LDFLAGS = `dpkg-buildflags --get LDFLAGS`
export DEB_CPPFLAGS DEB_CFLAGS DEB_LDFLAGS 

CONFIGURE_OPTIONS=\
	--enable-debian       \
	--disable-debug       \
	--disable-profiling   \
	--enable-owshell      \
	--enable-owlib        \
	--enable-ownetlib     \
	--enable-tai8570      \
	--enable-thermocouple \
	--enable-mt           \
	--enable-i2c          \
	--enable-ha7          \
	--enable-owhttpd      \
	--enable-owftpd       \
	--enable-owserver     \
	--enable-owexternal   \
	--enable-ownet        \
	--enable-owtap        \
	--disable-owmalloc    \
	--disable-owtraffic   \
	--enable-owmon        \
	--enable-owcapi       \
	--enable-swig         \
	--enable-owperl       \
	--enable-owphp        \
	--enable-owpython     \
	--enable-owtcl        \
	--enable-owfs         \
	--enable-cache        \
	--enable-zero         \
	--enable-usb          \
	--enable-parport

DEB_HOST_ARCH_OS=$(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
ifeq ($(DEB_HOST_ARCH_OS),linux)
CONFIGURE_OPTIONS += --enable-w1
else
CONFIGURE_OPTIONS += --disable-w1
endif

%:
	dh $@ $(DH_OPTIONS)

.PHONY: override_dh_auto_configure override_dh_auto_test override_dh_install
override_dh_auto_configure:
	autoreconf -vif
	dh_auto_configure -- $(CONFIGURE_OPTIONS)

override_dh_auto_test:
	# no tests available

override_dh_install:
	dh_install  --list-missing -X.la -Xperllocal.pod

.PHONY: override_dh_strip override_dh_makeshlibs
override_dh_strip:
	dh_strip --dbg-package=owfs-dbg

override_dh_makeshlibs:
	dh_makeshlibs --no-package libow-php5 --no-package libow-tcl
	echo "php:Depends=phpapi-$$(php-config5 --phpapi)" >> debian/libow-php5.substvars

clean:
	dh clean $(DH_OPTIONS)
	# remove autoreconf modifications
	find . -name Makefile.am | while read f ; do \
		$(RM) "$$(dirname "$$f")/$$(basename "$$f" .am).in" ; \
	done
	$(RM) INSTALL aclocal.m4 configure
	find src/scripts/install -type f -a ! -name "config*" -a -exec rm -v {} \;
	$(RM) module/owcapi/src/example++/Makefile \
		module/owcapi/src/example/Makefile \
		module/ownet/c/src/example/Makefile \
		module/ownet/php/examples/ownet_example.php \
		module/swig/php/example/load_php_OW.php \
		module/swig/perl5/OW/Makefile.linux \
		module/swig/perl5/OW/Makefile.osx
	# if this is a git repository, restore removed files that would have
	# been ignored by dpkg-source
	-test -d .git && git checkout -- $$(git status | \
		sed -e '/^#[[:space:]]*deleted:[[:space:]]*/s/^#[[:space:]]*deleted:[[:space:]]*//p;d' | \
		grep -v '^debian/')

override_dh_shlibdeps:
	dh_shlibdeps -a -- --warnings=7