Debian package updates by Jochen Kunkel
[openxpki.git] / trunk / package / suse / perl-openxpki-core / Makefile
blob2a487edcdecc9d8d965daff000cb3d7ed0dba717
1 ## Written 2006 by Martin Bartosch for the OpenXPKI project
2 ## Copyright (C) 2005-2006 by The OpenXPKI Project
4 RPMBASE=/usr/src/packages
5 OPENXPKI_SVN=../../../..
7 PACKAGE=perl-openxpki-core
8 SRCBASE=$(OPENXPKI_SVN)/trunk/perl-modules/core/trunk
9 SRCNAME=OpenXPKI
11 VERGEN=$(OPENXPKI_SVN)/tools/vergen
12 VERSION=$(shell $(VERGEN) --format version --directory $(SRCBASE))
13 PERL=$(shell which perl)
15 ifdef PREFIX
16 PERL_MAKEPL_ARGS="PREFIX=$(PREFIX)"
17 endif
19 #include ../Makefile.package
21 all: clean perl-dist package collect
23 dist-clean:
24 ( cd $(SRCBASE) && \
25 rm -f *.tar.gz \
29 perl-dist: dist-clean
30 ( cd $(SRCBASE) && \
31 perl Makefile.PL && \
32 make dist && \
33 mv *.tar.gz $(RPMBASE)/SOURCES \
36 $(PACKAGE).spec: $(PACKAGE).spec.in
37 sed -e 's/_VERSION_/$(VERSION)/g' <$< | sed -e 's+_PERL_+$(PERL)+g' | sed -e 's+_MAKEPL_ARGS_+$(PERL_MAKEPL_ARGS)+g' >$@
39 package: $(PACKAGE).spec
40 rpm -ba $(PACKAGE).spec
42 collect:
43 mv $(RPMBASE)/SRPMS/$(PACKAGE)-*.rpm .
44 mv $(RPMBASE)/RPMS/*/$(PACKAGE)-*.rpm .
46 clean:
47 rm -f $(PACKAGE)-*.rpm $(PACKAGE).spec