[csw-devel] SF.net SVN: gar:[14331] csw/mgar/pkg
skayser at users.sourceforge.net
skayser at users.sourceforge.net
Wed Apr 20 00:07:46 CEST 2011
Revision: 14331
http://gar.svn.sourceforge.net/gar/?rev=14331&view=rev
Author: skayser
Date: 2011-04-19 22:07:45 +0000 (Tue, 19 Apr 2011)
Log Message:
-----------
move newpkg-* template to separate mako templates
Modified Paths:
--------------
csw/mgar/pkg/Makefile
csw/mgar/pkg/cpan/Makefile
csw/mgar/pkg/newpkg-Makefile
csw/mgar/pkg/xfce/Makefile
Added Paths:
-----------
csw/mgar/pkg/cpan/newpkg-Makefile
csw/mgar/pkg/xfce/newpkg-Makefile
Modified: csw/mgar/pkg/Makefile
===================================================================
--- csw/mgar/pkg/Makefile 2011-04-19 20:57:09 UTC (rev 14330)
+++ csw/mgar/pkg/Makefile 2011-04-19 22:07:45 UTC (rev 14331)
@@ -69,32 +69,10 @@
newpkg-%:
@svn mkdir $* $*/tags $*/branches $*/trunk $*/trunk/files
@svn cp template/Makefile $*/Makefile
- @(echo '# $$Id$$'; \
- echo "NAME = $*"; \
- echo "VERSION = 1.0"; \
- echo "CATEGORIES = category"; \
- echo ""; \
- echo "DESCRIPTION = Brief description"; \
- echo "define BLURB"; \
- echo " Long description"; \
- echo "endef"; \
- echo ""; \
- echo "MASTER_SITES = "; \
- echo "DISTFILES = $$(DISTNAME).tar.gz"; \
- echo ""; \
- echo "# File name regex to get notifications about upstream software releases"; \
- echo "# NOTE: Use this only if the automatic regex creation"; \
- echo "# does not work for your package"; \
- echo "# UFILES_REGEX = $$(NAME)-(\d+(?:\.\d+)*).tar.gz"; \
- echo ""; \
- echo "# If the url used to check for software update is different of MASTER_SITES, then "; \
- echo "# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES"; \
- echo "# UPSTREAM_MASTER_SITES = "; \
- echo ""; \
- echo "CONFIGURE_ARGS = $$(DIRPATHS)"; \
- echo ""; \
- echo "include gar/category.mk"; \
- ) > $*/trunk/Makefile
+ @python -c 'from mako.template import Template; \
+ v = { "name": "$*", "version": "x.y" }; \
+ t = Template(filename="newpkg-Makefile"); \
+ print t.render(**v)' > $*/trunk/Makefile
@touch $*/trunk/checksums
@svn add $*/trunk/Makefile $*/trunk/checksums
@svn ps svn:keywords Id $*/trunk/Makefile
Modified: csw/mgar/pkg/cpan/Makefile
===================================================================
--- csw/mgar/pkg/cpan/Makefile 2011-04-19 20:57:09 UTC (rev 14330)
+++ csw/mgar/pkg/cpan/Makefile 2011-04-19 22:07:45 UTC (rev 14331)
@@ -26,32 +26,17 @@
$(MAKE) -C $$i $* || echo " *** make $* in $$i failed ***" >> $(BUILDLOG); \
done
-lcase = $(shell echo $(1) | tr '[A-Z]' '[a-z]' )
-
# You can either use "gmake newpkg-Perl-Module" or "gmake newpkg-Perl::Module".
# Ideally this would also figure out the AUTHOR by querying CPAN. Alternatively
# we might think about dropping the AUTHOR field and determine that on the fly
# during the build. Ideas?
-newpkg-%: catalogname = $(call lcase,$(subst ::,_,$*))
-newpkg-%: pkgname = $(call lcase,$(subst ::,-,$*))
newpkg-%: dir = $(subst ::,-,$*)
newpkg-%:
@svn mkdir $(dir) $(dir)/tags $(dir)/branches $(dir)/trunk $(dir)/trunk/files
- @(echo "NAME = $(dir)"; \
- echo "VERSION = 1.0"; \
- echo "CATEGORIES = cpan"; \
- echo "AUTHOR = MYSELF"; \
- echo ""; \
- echo "DESCRIPTION = Brief description"; \
- echo "define BLURB"; \
- echo " Long description"; \
- echo "endef"; \
- echo ""; \
- echo "PACKAGES = CSWpm-$(pkgname)"; \
- echo "CATALOGNAME = pm_$(catalogname)"; \
- echo ""; \
- echo "include gar/category.mk"; \
- ) > $(dir)/trunk/Makefile
+ @python -c 'from mako.template import Template; \
+ v = { "name": "$*", "version": "x.y" }; \
+ t = Template(filename="newpkg-Makefile"); \
+ print t.render(**v)' > $(dir)/trunk/Makefile
@touch $(dir)/trunk/checksums
@svn add $(dir)/trunk/Makefile $(dir)/trunk/checksums
@echo "cookies\ndownload\nwork\n" | svn propset svn:ignore -F /dev/fd/0 $(dir)/trunk
Added: csw/mgar/pkg/cpan/newpkg-Makefile
===================================================================
--- csw/mgar/pkg/cpan/newpkg-Makefile (rev 0)
+++ csw/mgar/pkg/cpan/newpkg-Makefile 2011-04-19 22:07:45 UTC (rev 14331)
@@ -0,0 +1,19 @@
+<%
+ package_name = name.replace("::","-").lower()
+ catalog_name = name.replace("::","_").lower()
+%>
+NAME = ${name}
+VERSION = ${version}
+GARTYPE = v2
+CATEGORIES = cpan
+AUTHOR = MYSELF
+
+DESCRIPTION = Brief description
+define BLURB
+ Long description
+endef
+
+PACKAGES = CSWpm-${package_name}
+CATALOGNAME = pm_${catalog_name}
+
+include gar/category.mk
Modified: csw/mgar/pkg/newpkg-Makefile
===================================================================
--- csw/mgar/pkg/newpkg-Makefile 2011-04-19 20:57:09 UTC (rev 14330)
+++ csw/mgar/pkg/newpkg-Makefile 2011-04-19 22:07:45 UTC (rev 14331)
@@ -1,8 +1,9 @@
# $Id: Makefile 13420 2011-02-20 21:04:03Z bdwalton $
# TODO (release-critical prefixed with !, non release-critical with *)
#
-NAME = %NAME%
-VERSION = %VERSION%
+NAME = ${name}
+VERSION = ${version}
+GARTYPE = v2
CATEGORIES = category
DESCRIPTION = Brief description
Modified: csw/mgar/pkg/xfce/Makefile
===================================================================
--- csw/mgar/pkg/xfce/Makefile 2011-04-19 20:57:09 UTC (rev 14330)
+++ csw/mgar/pkg/xfce/Makefile 2011-04-19 22:07:45 UTC (rev 14331)
@@ -28,40 +28,16 @@
newpkg-%:
@svn mkdir $* $*/tags $*/branches $*/trunk $*/trunk/files
- @(echo "NAME = $*"; \
- echo "VERSION = 1.0"; \
- echo "CATEGORIES = category"; \
- echo ""; \
- echo "DESCRIPTION = Brief description"; \
- echo "define BLURB"; \
- echo " Long description"; \
- echo "endef"; \
- echo ""; \
- echo "MASTER_SITES = "; \
- echo "DISTFILES = $$(NAME)-$$(VERSION).tar.gz"; \
- echo "DISTFILES += $$(call admfiles,CSWpackage,)"; \
- echo ""; \
- echo "# We define upstream file regex so we can be notifed of new upstream software release"; \
- echo "UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*).tar.gz"; \
- echo ""; \
- echo "# If the url used to check for software update is different of MASTER_SITES, then "; \
- echo "# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES"; \
- echo "# UPSTREAM_MASTER_SITES = "; \
- echo ""; \
- echo "CONFIGURE_ARGS = $$(DIRPATHS)"; \
- echo ""; \
- echo "include gar/category.mk"; \
- ) > $*/trunk/Makefile
+ @python -c 'from mako.template import Template; \
+ v = { "name": "$*", "version": "x.y" }; \ t = Template(filename="newpkg-Makefile"); \
+ print t.render(**v)' > $*/trunk/Makefile
@svn add $*/trunk/Makefile
- @(echo "%var bitname package"; \
- echo "%var pkgname CSWpackage"; \
- echo "%include url file://%{PKGLIB}/csw_dyndepend.gspec";\
- echo "%copyright url file://%{WORKSRC}/LICENSE"; \
- ) > $*/trunk/files/CSWpackage.gspec
@echo "cookies\ndownload\nwork\n" | svn propset svn:ignore -F /dev/fd/0 $*/trunk
@echo "gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2" | svn propset svn:externals -F /dev/fd/0 $*/trunk
- @svn co https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 $*/trunk/gar
+ @if [ -d ../../gar/v2 ]; then \
+ ln -s ../../../../gar/v2 $*/trunk/gar; \
+ else \
+ svn co https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2 $*/trunk/gar; \
+ fi
@echo
@echo "Your package is set up for editing at $*/trunk"
- @echo "Please don't forget to add the gspec-file!"
-
Added: csw/mgar/pkg/xfce/newpkg-Makefile
===================================================================
--- csw/mgar/pkg/xfce/newpkg-Makefile (rev 0)
+++ csw/mgar/pkg/xfce/newpkg-Makefile 2011-04-19 22:07:45 UTC (rev 14331)
@@ -0,0 +1,23 @@
+NAME = ${name}
+VERSION = ${version}
+GARTYPE = v2
+CATEGORIES = category
+
+DESCRIPTION = Brief description
+define BLURB
+ Long description
+endef
+
+MASTER_SITES =
+DISTFILES = $(DISTNAME).tar.gz
+
+# File name regex to get notifications about upstream software releases # NOTE: Use this only if the automatic regex creation
+# does not work for your package
+# UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*).tar.gz
+# If the url used to check for software update is different of MASTER_SITES, then
+# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES
+# UPSTREAM_MASTER_SITES =
+
+CONFIGURE_ARGS = $(DIRPATHS)
+
+include gar/category.mk
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list