[csw-devel] SF.net SVN: gar:[15774] csw/mgar/pkg/pkg-get/trunk
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Tue Sep 27 02:23:47 CEST 2011
Revision: 15774
http://gar.svn.sourceforge.net/gar/?rev=15774&view=rev
Author: bdwalton
Date: 2011-09-27 00:23:46 +0000 (Tue, 27 Sep 2011)
Log Message:
-----------
pkg-get/trunk: do a full split so alternatives can be used
Modified Paths:
--------------
csw/mgar/pkg/pkg-get/trunk/Makefile
Added Paths:
-----------
csw/mgar/pkg/pkg-get/trunk/files/CSWpkgget-deprecated.postinstall
Removed Paths:
-------------
csw/mgar/pkg/pkg-get/trunk/files/CSWpkgget.postinstall
Modified: csw/mgar/pkg/pkg-get/trunk/Makefile
===================================================================
--- csw/mgar/pkg/pkg-get/trunk/Makefile 2011-09-26 23:29:34 UTC (rev 15773)
+++ csw/mgar/pkg/pkg-get/trunk/Makefile 2011-09-27 00:23:46 UTC (rev 15774)
@@ -12,34 +12,53 @@
endef
MASTER_SITES = http://opencsw.org
-DISTFILES = CSWpkgget.postinstall
+DISTFILES = CSWpkgget-deprecated.postinstall
CONFIGURE_SCRIPTS =
BUILD_SCRIPTS =
TEST_SCRIPTS =
INSTALL_SCRIPTS = custom
-PACKAGES = CSWpkgget
+PACKAGES = CSWpkgget CSWpkgget-deprecated
+
CATALOGNAME_CSWpkgget = pkg_get_stub
+SPKG_DESC_CSWpkgget = A deprecated package delivery tool (User notice version)
RUNTIME_DEP_PKGS_CSWpkgget = CSWpkgutil
ARCHALL_CSWpkgget = 1
CHECKPKG_OVERRIDES_CSWpkgget += surplus-dependency|CSWpkgutil
CHECKPKG_OVERRIDES_CSWpkgget += catalogname-does-not-match-pkgname|pkgname=CSWpkgget|catalogname=pkg_get_stub|expected-catalogname=pkgget
+PKGFILES_CSWpkgget = $(bindir)/pkg-get.deprecationnotice
+SPKG_DESC_CSWpkgget-deprecated = A deprecated package delivery tool (Working legacy version)
+RUNTIME_DEP_PKGS_CSWpkgget-deprecated = CSWpkgutil
+ARCHALL_CSWpkgget-deprecated = 1
+CHECKPKG_OVERRIDES_CSWpkgget-deprecated += surplus-dependency|CSWpkgutil
# going to extra effort to find wget, add /usr/local/bin to the path
-CHECKPKG_OVERRIDES_CSWpkgget += file-with-bad-content|/usr/local|root/opt/csw/bin/pkg-get.deprecated
+CHECKPKG_OVERRIDES_CSWpkgget-deprecated += file-with-bad-content|/usr/local|root/opt/csw/bin/pkg-get.deprecated
+PKGFILES_CSWpkgget-deprecated = $(bindir)/pkg-get.deprecated
+PKGFILES_CSWpkgget-deprecated += $(sharedstatedir).* $(docdir)/pkg_get
+ALTERNATIVES_CSWpkgget = deprecationnotice
+ALTERNATIVE_deprecationnotice = $(bindir)/pkg-get pkg-get $(bindir)/pkg-get.deprecationnotice 10
+
+ALTERNATIVES_CSWpkgget-deprecated = deprecated
+ALTERNATIVE_deprecated = $(bindir)/pkg-get pkg-get $(bindir)/pkg-get.deprecated 5
+
+
include gar/category.mk
install-custom:
@(mkdir -p $(DESTDIR)$(bindir); \
mkdir -p $(DESTDIR)$(docdir)/pkg_get_stub; \
+ mkdir -p $(DESTDIR)$(docdir)/pkgget_deprecated; \
mkdir -p $(DESTDIR)$(sharedstatedir); \
mkdir -p $(DESTDIR)$(sysconfdir); \
- ginstall -m 0755 $(FILEDIR)/pkg-get $(DESTDIR)$(bindir)/; \
+ ginstall -m 0755 $(FILEDIR)/pkg-get $(DESTDIR)$(bindir)/pkg-get.deprecationnotice; \
rsync -a --exclude=.svn $(FILEDIR)/bin/ $(DESTDIR)$(bindir)/;\
rsync -a --exclude=.svn $(FILEDIR)/share/ $(DESTDIR)$(sharedstatedir)/; \
rsync -a --exclude=.svn $(FILEDIR)/etc/ $(DESTDIR)$(sysconfdir)/; \
ginstall -m 0644 $(FILEDIR)/license $(DESTDIR)$(docdir)/pkg_get_stub; \
- ln -s $(docdir)/pkg_get_stub $(DESTDIR)$(docdir)/pkg_get)
+ ginstall -m 0644 $(FILEDIR)/license $(DESTDIR)$(docdir)/pkgget_deprecated; \
+ ginstall -m 0644 $(FILEDIR)/license $(DESTDIR)$(docdir)/pkgget_deprecated; \
+ ln -s $(docdir)/pkgget_deprecated $(DESTDIR)$(docdir)/pkg_get)
@$(MAKECOOKIE)
Copied: csw/mgar/pkg/pkg-get/trunk/files/CSWpkgget-deprecated.postinstall (from rev 15605, csw/mgar/pkg/pkg-get/trunk/files/CSWpkgget.postinstall)
===================================================================
--- csw/mgar/pkg/pkg-get/trunk/files/CSWpkgget-deprecated.postinstall (rev 0)
+++ csw/mgar/pkg/pkg-get/trunk/files/CSWpkgget-deprecated.postinstall 2011-09-27 00:23:46 UTC (rev 15774)
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+
+# This needs to somewhat track the CONFFILE handling in pkg-get itself now
+# to be more relocation friendly. technically.
+CONFFILE=$BASEDIR/etc/pkg-get.conf
+shortprefix=`echo $BASEDIR |sed 's:.*/::'`
+localconffile=/etc/opt/$shortprefix/pkg-get.conf
+
+echo ""
+
+
+##
+## Create a default pkg-get.conf file.
+# Note: "normally", i would depend on CSWcswclassutils.
+# However, i want this to not be dependant on anything else.
+# Additionally, i need to check for both a global, OR a local,
+# config file, before deciding to copy over a default one somewhere.
+#
+
+if [ -f $CONFFILE ] ; then
+ echo $CONFFILE already exists. Not altering it.
+elif [ -f $localconffile ] ; then
+ echo Local conf file $localconffile exists.
+ echo Not copying $CONFFILE.csw
+
+else
+ # Note: "normally", i would depend on CSWcswclassutils.
+ # However, i want this to not be dependant on anything else.
+ #
+
+ echo Installing $CONFFILE.csw to pkg-get.conf
+ cp $CONFFILE.csw $CONFFILE
+ echo ""
+ echo '**** IMPORTANT ****'
+ echo 'A default configuration file for pkg-get has been created in'
+ echo " $CONFFILE"
+ echo "You should edit it to change the 'site' configuration, to point to"
+ echo "the most appropriate mirror for you, from the list at"
+ echo " http://www.opencsw.org/mirrors"
+ echo ""
+fi
+
+case $BASEDIR in
+ */opt/csw)
+ :
+ # fall through and do long hairy stuff
+ ;;
+ *)
+ exit 0
+ ;;
+esac
+
+##################################################
+# Fix perms.
+# Really, the "default" line in prototype should take care of
+# this.. but it doesnt?!!
+#If the directory did not exist previously, it gets set to
+#root:other.
+# SO, fix that, in keeping with csw standards!
+
+# But.. only if we're not in read-only-PREFIX mode.
+# since there is no /bin/stat call, fake it and test by creating a file.
+
+touch $BASEDIR/testfile.$$
+if [ $? -ne 0 ] ; then
+ echo No permissions to create $BASEDIR/testfile.
+ echo Presuming read-only $BASEDIR. Quitting cleanly now
+ exit 0
+fi
+
+rm $BASEDIR/testfile.$$
+
+chown root:bin $BASEDIR
+for d in bin etc share share/man share/man/man1m ; do
+ chown root:bin $BASEDIR/$d
+done
+
Deleted: csw/mgar/pkg/pkg-get/trunk/files/CSWpkgget.postinstall
===================================================================
--- csw/mgar/pkg/pkg-get/trunk/files/CSWpkgget.postinstall 2011-09-26 23:29:34 UTC (rev 15773)
+++ csw/mgar/pkg/pkg-get/trunk/files/CSWpkgget.postinstall 2011-09-27 00:23:46 UTC (rev 15774)
@@ -1,78 +0,0 @@
-#!/bin/sh
-
-
-# This needs to somewhat track the CONFFILE handling in pkg-get itself now
-# to be more relocation friendly. technically.
-CONFFILE=$BASEDIR/etc/pkg-get.conf
-shortprefix=`echo $BASEDIR |sed 's:.*/::'`
-localconffile=/etc/opt/$shortprefix/pkg-get.conf
-
-echo ""
-
-
-##
-## Create a default pkg-get.conf file.
-# Note: "normally", i would depend on CSWcswclassutils.
-# However, i want this to not be dependant on anything else.
-# Additionally, i need to check for both a global, OR a local,
-# config file, before deciding to copy over a default one somewhere.
-#
-
-if [ -f $CONFFILE ] ; then
- echo $CONFFILE already exists. Not altering it.
-elif [ -f $localconffile ] ; then
- echo Local conf file $localconffile exists.
- echo Not copying $CONFFILE.csw
-
-else
- # Note: "normally", i would depend on CSWcswclassutils.
- # However, i want this to not be dependant on anything else.
- #
-
- echo Installing $CONFFILE.csw to pkg-get.conf
- cp $CONFFILE.csw $CONFFILE
- echo ""
- echo '**** IMPORTANT ****'
- echo 'A default configuration file for pkg-get has been created in'
- echo " $CONFFILE"
- echo "You should edit it to change the 'site' configuration, to point to"
- echo "the most appropriate mirror for you, from the list at"
- echo " http://www.opencsw.org/mirrors"
- echo ""
-fi
-
-case $BASEDIR in
- */opt/csw)
- :
- # fall through and do long hairy stuff
- ;;
- *)
- exit 0
- ;;
-esac
-
-##################################################
-# Fix perms.
-# Really, the "default" line in prototype should take care of
-# this.. but it doesnt?!!
-#If the directory did not exist previously, it gets set to
-#root:other.
-# SO, fix that, in keeping with csw standards!
-
-# But.. only if we're not in read-only-PREFIX mode.
-# since there is no /bin/stat call, fake it and test by creating a file.
-
-touch $BASEDIR/testfile.$$
-if [ $? -ne 0 ] ; then
- echo No permissions to create $BASEDIR/testfile.
- echo Presuming read-only $BASEDIR. Quitting cleanly now
- exit 0
-fi
-
-rm $BASEDIR/testfile.$$
-
-chown root:bin $BASEDIR
-for d in bin etc share share/man share/man/man1m ; do
- chown root:bin $BASEDIR/$d
-done
-
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