[csw-devel] SF.net SVN: gar:[9869] csw/mgar/pkg

theferret at users.sourceforge.net theferret at users.sourceforge.net
Fri May 14 23:13:47 CEST 2010


Revision: 9869
          http://gar.svn.sourceforge.net/gar/?rev=9869&view=rev
Author:   theferret
Date:     2010-05-14 21:13:47 +0000 (Fri, 14 May 2010)

Log Message:
-----------
Added a set of templates, to simplify adding programs into svn, "Phil-style"

Added Paths:
-----------
    csw/mgar/pkg/TEMPLATES/
    csw/mgar/pkg/TEMPLATES/createpkg/
    csw/mgar/pkg/TEMPLATES/createpkg/Makefile
    csw/mgar/pkg/TEMPLATES/createpkg/Makefile.reloc
    csw/mgar/pkg/TEMPLATES/createpkg/copy_template
    csw/mgar/pkg/TEMPLATES/createpkg/generate_pkginfo
    csw/mgar/pkg/TEMPLATES/createpkg/pkginfo
    csw/mgar/pkg/TEMPLATES/createpkg/prototype

Added: csw/mgar/pkg/TEMPLATES/createpkg/Makefile
===================================================================
--- csw/mgar/pkg/TEMPLATES/createpkg/Makefile	                        (rev 0)
+++ csw/mgar/pkg/TEMPLATES/createpkg/Makefile	2010-05-14 21:13:47 UTC (rev 9869)
@@ -0,0 +1,26 @@
+#This Makefile originally generated from a template under 
+# pkg/TEMPLATES/createpkg
+
+#Uncomment one of these definitions. The -b invokation,
+# is suitable for use with small packages, where you want to have a few files
+# in your top level src directory. It is also suitable for
+# "relocateable" packages. see the createpkg docs for more details.
+#CREATEPKG=createpkg -b `pwd`
+#CREATEPKG=createpkg -r .
+CREATEPKG=createpkg -r `pwd`/cswstage
+
+package:	$(STDFILE) $(FILES)
+	$(CREATEPKG)
+	touch package
+
+build:
+	./configure --prefix=/opt/csw
+	$(MAKE)
+	cswstage
+
+clean:
+	rm *.pkg.gz
+
+STDFILES=pkginfo copyright prototype
+
+FILES=YourFilesHere

Added: csw/mgar/pkg/TEMPLATES/createpkg/Makefile.reloc
===================================================================
--- csw/mgar/pkg/TEMPLATES/createpkg/Makefile.reloc	                        (rev 0)
+++ csw/mgar/pkg/TEMPLATES/createpkg/Makefile.reloc	2010-05-14 21:13:47 UTC (rev 9869)
@@ -0,0 +1,21 @@
+#This Makefile originally generated from a template under 
+# pkg/TEMPLATES/createpkg
+
+#Uncomment one of these definitions. The -b invokation,
+# is suitable for use with small packages, where you want to have a few files
+# in your top level src directory. It is also suitable for
+# "relocateable" packages. see the createpkg docs for more details.
+CREATEPKG=createpkg -b `pwd`
+#CREATEPKG=createpkg -r .
+#CREATEPKG=createpkg -r `pwd`/cswstage
+
+package:	$(STDFILE) $(FILES)
+	$(CREATEPKG)
+	touch package
+
+clean:
+	rm *.pkg.gz
+
+STDFILES=pkginfo copyright prototype
+
+FILES=YourFilesHere

Added: csw/mgar/pkg/TEMPLATES/createpkg/copy_template
===================================================================
--- csw/mgar/pkg/TEMPLATES/createpkg/copy_template	                        (rev 0)
+++ csw/mgar/pkg/TEMPLATES/createpkg/copy_template	2010-05-14 21:13:47 UTC (rev 9869)
@@ -0,0 +1,55 @@
+#!/bin/ksh -p
+
+# This script is meant to be called with a current directory of
+# the top level. Or basically, whereever you want the template stuff
+# to be copied INTO.
+
+SVN="echo FAKEsvn "
+SVN="svn"
+
+function usage {
+	print Usage: $0 new-software-name
+	print This script creates a new subdir in subversion for the named
+	print software, and populates it with a barebones set of templates
+	print It will create it under your current directory
+
+	exit 1
+}
+
+case $1 in
+	""|-*)
+		usage
+	;;
+esac
+
+
+template_dir=`dirname $0`
+DESTDIR=$1/trunk
+
+
+mkdir -p $DESTDIR
+
+$SVN info >/dev/null
+if [[ $? -ne 0 ]] ; then
+	print ERROR: expected to be within subversion tree somewhere
+	print cannot continue
+	exit 1
+fi
+
+$SVN add $DESTDIR 
+cp $template_dir/Makefile* $DESTDIR
+cp $template_dir/prototype* $DESTDIR
+$template_dir/generate_pkginfo >$DESTDIR/pkginfo
+
+print ""
+print Created directory $1 locally, and in subversion
+print Things you still need to do:
+print ""
+print "  * Edit the pkginfo file fully"
+print "  * Create an appropriate copyright file"
+print "  * Choose ONE of the Makefiles, and remove the other"
+print "  * Edit the Makefile to have any required extra flags, etc"
+print "  * Fill in the rest of the prototype file"
+
+print ""
+print " (and dont forget to check everything in when you are done!)"


Property changes on: csw/mgar/pkg/TEMPLATES/createpkg/copy_template
___________________________________________________________________
Added: svn:executable
   + *

Added: csw/mgar/pkg/TEMPLATES/createpkg/generate_pkginfo
===================================================================
--- csw/mgar/pkg/TEMPLATES/createpkg/generate_pkginfo	                        (rev 0)
+++ csw/mgar/pkg/TEMPLATES/createpkg/generate_pkginfo	2010-05-14 21:13:47 UTC (rev 9869)
@@ -0,0 +1,15 @@
+#!/bin/ksh -p
+
+if [[ "$1" == "" ]] ; then print ERROR: need name of software; exit 1;fi
+FULLNAME=`getent passwd $USER|nawk -F: '{print $5}'`
+
+
+print PKG=CSW$1
+print NAME=CSW$1 - description goes here
+print VERSION=1.0,REV=`date '+%Y.%m.%d'`
+print CATEGORY=application
+print VENDOR=http://www.opencsw.org/ packaged for CSW by $FULLNAME
+print HOTLINE=http://www.opencsw.org/bugtrack/
+print EMAIL=$USER at opencsw.org
+
+


Property changes on: csw/mgar/pkg/TEMPLATES/createpkg/generate_pkginfo
___________________________________________________________________
Added: svn:executable
   + *

Added: csw/mgar/pkg/TEMPLATES/createpkg/pkginfo
===================================================================
--- csw/mgar/pkg/TEMPLATES/createpkg/pkginfo	                        (rev 0)
+++ csw/mgar/pkg/TEMPLATES/createpkg/pkginfo	2010-05-14 21:13:47 UTC (rev 9869)
@@ -0,0 +1,7 @@
+PKG=CSWTNAME
+NAME=CSWTNAME - description goes here
+VERSION=1.0,REV=2010.05.14
+CATEGORY=application
+VENDOR=http://www.opencsw.org/ packaged for CSW by Philip Brown
+HOTLINE=http://www.opencsw.org/bugtrack/
+EMAIL=phil at opencsw.org

Added: csw/mgar/pkg/TEMPLATES/createpkg/prototype
===================================================================
--- csw/mgar/pkg/TEMPLATES/createpkg/prototype	                        (rev 0)
+++ csw/mgar/pkg/TEMPLATES/createpkg/prototype	2010-05-14 21:13:47 UTC (rev 9869)
@@ -0,0 +1,3 @@
+i pkginfo
+i depend
+i copyright


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