File: rules

package info (click to toggle)
asterisk-testsuite 0.0.0%2Bsvn.5781-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 18,632 kB
  • sloc: xml: 33,912; python: 32,904; ansic: 1,599; sh: 395; makefile: 170; sql: 17
file content (37 lines) | stat: -rwxr-xr-x 1,066 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
#!/usr/bin/make -f

# for asttest:
export PREFIX=/usr

PACKAGE=asterisk-testsuite
DEBVERSION:=$(shell head -n 1 debian/changelog \
		    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
UPVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/.dfsg$$//')
SVNREV:=$(shell echo $(UPVERSION) | sed -e s/.*+svn\.//)

VER = 0.0.0
SVN = http://svn.digium.com/svn/testsuite/asterisk/trunk
VER_FULL = $(PACKAGE)-$(VER)+svn.$(SVNREV)

%:
	dh $@

target=$(CURDIR)/debian/asterisk-testsuite/usr/share/asterisk-testsuite
override_dh_install-indep:
	dh_install
	find $(target)/tests -name \*.py -executable | \
		while read file; do \
			if head -q -n1 $$file | egrep -q "^('''|\"\"\")"; then \
				chmod a-x $$file; \
			fi; \
		done
	find $(target)/tests/channels/SIP/rfc2833_dtmf_detect \
		-name \*.xml -exec chmod a-x \{\} \;

get-orig-source:
	@@dh_testdir
	@@echo Creating tarball from $(SVN) revision $(SVNREV) ...
	@@svn export -q -r$(SVNREV) $(SVN) $(VER_FULL)
	@@tar czf ../$(PACKAGE)_$(VER)~svn$(SVNREV).orig.tar.gz $(VER_FULL)
	@@rm -Rf $(VER_FULL)