File: rules

package info (click to toggle)
mjpegtools 1%3A2.1.0%2Bdebian-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,916 kB
  • sloc: ansic: 60,401; cpp: 32,321; sh: 13,910; makefile: 785; python: 291; asm: 103
file content (42 lines) | stat: -rwxr-xr-x 1,585 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed

%:
	dh $@

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_auto_configure:
	dh_auto_configure -- --disable-simd-accel

override_dh_install:
	dh_install --sourcedir=debian/tmp
	for file in `cat debian/divert-binaries` ; do \
		[ ! -f debian/mjpegtools/usr/bin/$${file} ] || \
		mv debian/mjpegtools/usr/bin/$${file} debian/mjpegtools/usr/lib/mjpegtools/bin/ ; \
	done

override_dh_strip:
	dh_strip --ddeb-migration='mjpegtools-dbg (<< 1:2.1.0+debian-4~)'

PACKAGE = mjpegtools
EPOCH = $(shell dpkg-parsechangelog | grep "^Version:" | sed -r "s/Version: (.*):.*/\1/")
VERSION = $(shell dpkg-parsechangelog | grep "^Version:" | sed -r "s/Version: $(EPOCH):(.*)\+debian.*/\1/")
TARBALL_VERSION = $(shell echo $(VERSION) | sed "s/~//")
TARBALL_DIR = $(PACKAGE)-$(shell echo $(VERSION) | sed "s/~.*//")

get-orig-source:
	# Perform cleanup and repack the tarball
	uscan --verbose --force-download --no-symlink
	cd debian && tar xvzf ../../$(PACKAGE)-$(TARBALL_VERSION).tar.gz
	cd debian/$(TARBALL_DIR) && find -name CVS | xargs rm -rf
	cd debian/$(TARBALL_DIR) && make distclean || true
	cd debian/$(TARBALL_DIR) && rm -rf autom4te.cache debian
	cd debian/$(TARBALL_DIR) && find -name "*.rej" | xargs rm -f
	cd debian/$(TARBALL_DIR) && find -name "*~" | xargs rm -f
	cd debian/$(TARBALL_DIR) && find -name ".#*" | xargs rm -f
	cd debian/$(TARBALL_DIR) && find -name .cvsignore | xargs rm -f
	cd debian && tar cvzf ../../$(PACKAGE)_$(VERSION)+debian.orig.tar.gz $(TARBALL_DIR)
	rm -rf debian/$(TARBALL_DIR)