File: rules

package info (click to toggle)
ffprobe 0.svn92-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 228 kB
  • ctags: 177
  • sloc: ansic: 1,181; perl: 306; sh: 187; makefile: 132
file content (32 lines) | stat: -rwxr-xr-x 1,021 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
#!/usr/bin/make -f

PACKAGE = ffprobe
SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]+\)\)\?\(.*\)-.*/\3/p')
SVN_REVISION := $(shell echo $(SRC_VERSION) | sed 's/.*\.svn//' )
TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz

%:
	dh $@

override_dh_auto_clean:
	[ ! -f Makefile ] || $(MAKE) distclean
	rm -f Makedefs Makefile ltmain.sh configure src/Makefile stamp-h

override_dh_auto_configure:
	autoconf
	./configure $(CROSS) --prefix=/usr --mandir=\$${prefix}/share/man
	echo "#define FFPROBE_VERSION \"SVN-r$(SVN_REVISION)\"" > src/version.h

override_dh_auto_install:
	$(MAKE) prefix=$(CURDIR)/debian/ffprobe/usr install

get-orig-source:
	rm -rf get-orig-source $(TARBALL)
	mkdir get-orig-source
	svn export -r $(SVN_REVISION) \
		https://ffprobe.svn.sourceforge.net/svnroot/ffprobe/trunk \
			get-orig-source/$(PACKAGE)-$(SRC_VERSION)
	GZIP=--best tar czf $(TARBALL) \
		-C get-orig-source $(PACKAGE)-$(SRC_VERSION) --exclude=tools
	rm -rf get-orig-source
	echo "  "$(TARBALL)" created!"