File: rules

package info (click to toggle)
libdata-streamdeserializer-perl 0.06-1.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, jessie, jessie-kfreebsd, sid, stretch, trixie
  • size: 716 kB
  • ctags: 760
  • sloc: perl: 660; makefile: 23
file content (30 lines) | stat: -rwxr-xr-x 900 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
#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/perl-makemaker.mk

MAIN_MODULE	= lib/Data/StreamDeserializer.pm

DEBVERSION = $(shell dpkg-parsechangelog \
	|grep ^Version|awk '{print $$2}'|sed 's/-.*//' )
PERVERSION = $(shell grep '^our[[:space:]]\+\$$VERSION' $(MAIN_MODULE) \
	|awk '{print $$4}'|sed "s/[';']//g" )

install/libdata-streamdeserializer-perl::
	@set -e; \
	if ! test "x$(DEBVERSION)" = "x$(PERVERSION)"; then \
		echo "Error: changelog has version $(DEBVERSION) " \
			"but module has $(PERVERSION)"; \
		false; \
	fi

clean::
	rm -f const-c.inc
	rm -f const-xs.inc
	rm -fr Makefile.old .pc

tarball: clean
	rm -f Data-StreamSerializer-*
	cd .. && tar --exclude=.git --exclude=debian -czvf \
                libdata-streamdeserializer-perl_$(DEBVERSION).orig.tar.gz \
                libdata-streamdeserializer-perl-$(DEBVERSION)