#!/usr/bin/make -f

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

MAIN_MODULE	= lib/Net/Server/Coro.pm

DEBVERSION = $(shell dpkg-parsechangelog \
	|grep ^Version|awk '{print $$2}'|sed 's/-.*//' )
PERLVERSION = $(shell grep '^$$VERSION' $(MAIN_MODULE) \
	|head -n 1 \
	|awk '{print $$3}'|sed "s/[';']//g" )

install/libnet-server-coro-perl::
	test $(DEBVERSION) = $(PERLVERSION)

clean::
	rm -f Makefile.old	
	rm -fr .pc

tarball:
	cd .. && tar \
		--exclude=debian \
		--exclude=.git \
		-czf libnet-server-coro-perl_$(DEBVERSION).orig.tar.gz \
		libnet-server-coro-perl-$(DEBVERSION)

