summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Ramsay <lack@gentoo.org>2009-05-21 15:11:54 +0000
committerJim Ramsay <lack@gentoo.org>2009-05-21 15:11:54 +0000
commit24a60c6d912ab47f494c806438d319fc56e6b5a1 (patch)
treed39575903c5ba46c0ec9075440f9b5a110c78775 /rox-base/zeroinstall-injector
parentold (diff)
downloadhistorical-24a60c6d912ab47f494c806438d319fc56e6b5a1.tar.gz
historical-24a60c6d912ab47f494c806438d319fc56e6b5a1.tar.bz2
historical-24a60c6d912ab47f494c806438d319fc56e6b5a1.zip
Version 0.40 is released. Also updates 0distutils script to handle changes in rox-base/rox-2.9
Package-Manager: portage-2.1.6.13/cvs/Linux i686
Diffstat (limited to 'rox-base/zeroinstall-injector')
-rw-r--r--rox-base/zeroinstall-injector/ChangeLog9
-rw-r--r--rox-base/zeroinstall-injector/Manifest5
-rwxr-xr-xrox-base/zeroinstall-injector/files/0distutils-r1116
-rw-r--r--rox-base/zeroinstall-injector/zeroinstall-injector-0.40.ebuild49
4 files changed, 177 insertions, 2 deletions
diff --git a/rox-base/zeroinstall-injector/ChangeLog b/rox-base/zeroinstall-injector/ChangeLog
index 922b60bb7ca2..411a5b91d64f 100644
--- a/rox-base/zeroinstall-injector/ChangeLog
+++ b/rox-base/zeroinstall-injector/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for rox-base/zeroinstall-injector
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/rox-base/zeroinstall-injector/ChangeLog,v 1.11 2009/04/09 13:34:38 lack Exp $
+# $Header: /var/cvsroot/gentoo-x86/rox-base/zeroinstall-injector/ChangeLog,v 1.12 2009/05/21 15:11:54 lack Exp $
+
+*zeroinstall-injector-0.40 (21 May 2009)
+
+ 21 May 2009; Jim Ramsay <lack@gentoo.org> +files/0distutils-r1,
+ +zeroinstall-injector-0.40.ebuild:
+ Version 0.40 is released. Also updates 0distutils script to handle changes
+ in rox-base/rox-2.9
09 Apr 2009; Jim Ramsay <lack@gentoo.org>
zeroinstall-injector-0.33.ebuild:
diff --git a/rox-base/zeroinstall-injector/Manifest b/rox-base/zeroinstall-injector/Manifest
index 947fb3d45996..b696623ec083 100644
--- a/rox-base/zeroinstall-injector/Manifest
+++ b/rox-base/zeroinstall-injector/Manifest
@@ -1,6 +1,9 @@
AUX 0distutils 2877 RMD160 d776f049967c5b2d73148a24e27a3395a71a3602 SHA1 9662f2b10c6c8166a5cfb35e0f874e832499bb94 SHA256 2e8fae99c0dccdba237e403fe98b9f9f57197c1a119010f804361619b4e5f9c7
+AUX 0distutils-r1 3523 RMD160 4f0b2ce58bb6bd8b572cf89e5ef1dc444812eb4b SHA1 d9b8605e5dfaa221e8bc24e62d5d92f88baca2df SHA256 06b41367607d6f60ee5d895ac3e26744b9337254fa3d740aa952a325bc22bcd5
AUX global.cfg 74 RMD160 bb2aa8c35d498342388c7e280c303f9869f9e6a3 SHA1 5ad6042f6fd113062ff347bdff563108927a20b6 SHA256 00e469a631692d515af084f43e9d854ae0ae4fa7a312b61a3050d4fb5caf6f47
DIST zeroinstall-injector-0.33.tar.bz2 130726 RMD160 45f1c76fc67bb701021a5186feb494b8276b4c3c SHA1 80a2c607076b9c35113f7da862d49aec31633770 SHA256 aa5f2370cde5e4654424df6f9595d899b9eaba9f79654dfd8852bdba2c5e5eb2
+DIST zeroinstall-injector-0.40.tar.bz2 150082 RMD160 6cc84fb16a33e7a9a24442ad2e92da0d531caf2d SHA1 d0e4c159ab9efdaa3938b37465dc7f8ac08141ac SHA256 89b0aacc07450884866cee21651779d3b5bcc9546c6ea65d72a77b181daef042
EBUILD zeroinstall-injector-0.33.ebuild 1073 RMD160 201ea0f7564efb8cefca534372d26469787fb806 SHA1 ac4277b6de5273a33ff406bb1764b3cbe5e38ec3 SHA256 3dd95bb50b4139bf0d4f6189bc4fd57035710304569eabf367aa9db2166545a6
-MISC ChangeLog 1974 RMD160 286f4527747cf6563b7a50c075089d669bae6217 SHA1 a3573c19a89d7254d75e5d817957fe69021be1f6 SHA256 8a61b41b659fb6baa18a5200d631fc59eb5175566d651ad720295ae2613657c8
+EBUILD zeroinstall-injector-0.40.ebuild 1289 RMD160 f4e8026cf655d16531e1ded15c5bd6b4bcadac4a SHA1 1de1b28eca4c0e1f6791f9407e4a2cf3f0652dba SHA256 0420c57a6ba35d9760fa7aeb504ff8bdbc6a79ed74dbff94f788737936b6333d
+MISC ChangeLog 2219 RMD160 73fbe5951982942d716cede4f121b012e86e031d SHA1 a3b740ab0c81e551823b25cfa526d303ea9f1f9a SHA256 87c1717d383e7b4fa8ff0ddb79c54ede0ab970942158b418add125432a0aa9ff
MISC metadata.xml 157 RMD160 fd6d83b802caa82822e8bb4d1752063fcda9b47f SHA1 54ccd31d923f052c9111f04c1a7d8b8f04f0a7b2 SHA256 941fe96a972d5a4f49555c01cbfab71d51e81ade3a53322fee549061aa17012c
diff --git a/rox-base/zeroinstall-injector/files/0distutils-r1 b/rox-base/zeroinstall-injector/files/0distutils-r1
new file mode 100755
index 000000000000..2d40282e80b5
--- /dev/null
+++ b/rox-base/zeroinstall-injector/files/0distutils-r1
@@ -0,0 +1,116 @@
+#!/usr/bin/python
+
+import os
+from xml.dom import minidom
+import xml.dom
+
+ns0compile = "http://zero-install.sourceforge.net/2006/namespaces/0compile"
+
+def escape(uri):
+ import zeroinstall.injector.model
+ return zeroinstall.injector.model._pretty_escape(uri)
+
+def cacheescape(uri):
+ import zeroinstall.injector.model
+ return zeroinstall.injector.model.escape(uri)
+
+def strip(node):
+ torm = []
+ for c in node.childNodes:
+ if c.nodeType == xml.dom.Node.TEXT_NODE and \
+ c.nodeValue.strip() == "":
+ torm.append(c)
+ elif c.hasChildNodes():
+ strip(c)
+ for c in torm:
+ node.removeChild(c)
+ c.unlink()
+
+class LocalFeed(object):
+ def __init__(self, xmlfile):
+ self.xml = minidom.parse(xmlfile)
+ if self.xml.documentElement.nodeName != "interface":
+ raise TypeError("Not an interface")
+ strip(self.xml.documentElement)
+
+ def getUri(self):
+ for element in self.xml.documentElement.getElementsByTagName("feed-for"):
+ if element.hasAttribute("interface"):
+ return element.getAttribute("interface")
+ return None
+
+ def edit(self, id=".", main="AppRun", stability="packaged"):
+ for attribute in ("main", "uri"):
+ if self.xml.documentElement.hasAttribute(attribute):
+ self.xml.documentElement.removeAttribute(attribute)
+ for group in self.xml.documentElement.getElementsByTagName("group"):
+ group.setAttribute("main", "AppRun")
+ if group.hasAttribute("arch") and group.getAttribute("arch") == "*-src":
+ uname = os.uname()
+ group.setAttribute("arch", "%s-%s" % (uname[0], uname[-1]))
+ attr0comp = []
+ for aidx in range(0, group.attributes.length):
+ attr = group.attributes.item(aidx)
+ if attr.namespaceURI == ns0compile:
+ attr0comp.append(attr)
+ for attr in attr0comp:
+ group.removeAttributeNode(attr)
+ reqlist = group.getElementsByTagName("requires")
+ for req in reqlist:
+ group.removeChild(req)
+ req.unlink()
+ for imp in group.getElementsByTagName("implementation"):
+ imp.setAttribute("stability",stability)
+ imp.setAttribute("id",id)
+
+ def dump(self):
+ print self.xml.toprettyxml()
+
+def main(xmlfile, mode="edit"):
+ try:
+ feed = LocalFeed(xmlfile)
+ if mode == "uri":
+ print feed.getUri()
+ elif mode == "escape":
+ print escape(feed.getUri())
+ elif mode == "cache":
+ print cacheescape(feed.getUri())
+ else:
+ feed.edit()
+ feed.dump()
+ except Exception, e:
+ import sys
+ print "Fatal:", e
+ sys.exit(2)
+
+def usage(program):
+ import os.path
+ progname = os.path.basename(program)
+ print "Usage:", progname, "[-u|-e] <xmlfile>"
+ print "Options:"
+ print "\t-u --uri: Finds the URI from the feed"
+ print "\t-e --escape: Escapes the URI from the feed"
+
+if __name__ == "__main__":
+ from optparse import OptionParser
+ import sys
+ parser = OptionParser(usage="usage: %prog [options] feed.xml",
+ description="By default, edits the given feed and prints the result on stdout.")
+ parser.add_option("-e", "--escape", action="store_const",
+ const="escape", dest="mode",
+ help="Return the cache-escaped URI from the feed on stdout.")
+ parser.add_option("-c", "--cache", action="store_const",
+ const="cache", dest="mode",
+ help="Return the file-escaped URI from the feed on stdout.")
+ parser.add_option("-u", "--uri", action="store_const",
+ const="uri", dest="mode",
+ help="Return the original URI from the feed on stdout.")
+ (options, args) = parser.parse_args()
+ if len(args) == 0:
+ parser.print_help()
+ else:
+ if len(args) > 1:
+ parser.error("requires exactly one .xml file")
+ main(args[0], options.mode)
+
+# vim: nosta noet sw=4 ts=4
diff --git a/rox-base/zeroinstall-injector/zeroinstall-injector-0.40.ebuild b/rox-base/zeroinstall-injector/zeroinstall-injector-0.40.ebuild
new file mode 100644
index 000000000000..90c886520bf4
--- /dev/null
+++ b/rox-base/zeroinstall-injector/zeroinstall-injector-0.40.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/rox-base/zeroinstall-injector/zeroinstall-injector-0.40.ebuild,v 1.1 2009/05/21 15:11:54 lack Exp $
+
+EAPI=2
+inherit distutils
+
+DESCRIPTION="Zeroinstall Injector allows regular users to install software themselves"
+HOMEPAGE="http://0install.net/"
+SRC_URI="mirror://sourceforge/zero-install/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND="!<=rox-base/rox-session-0.30"
+RDEPEND=">=dev-python/pygtk-2.0
+ app-crypt/gnupg"
+
+PYTHON_MODNAME="zeroinstall"
+
+src_prepare() {
+ # Change manpage install path (Bug 207495)
+ sed -i 's:man/man1:share/man/man1:' setup.py
+}
+
+src_install() {
+ distutils_src_install
+
+ exeinto "/usr/sbin/"
+ newexe "${FILESDIR}/0distutils-r1" 0distutils
+
+ local BASE_XDG_CONFIG="/etc/xdg/0install.net"
+ local BASE_XDG_DATA="/usr/share/0install.net"
+
+ insinto "${BASE_XDG_CONFIG}/injector"
+ newins "${FILESDIR}/global.cfg" global
+
+ dodir "${BASE_XDG_DATA}/native_feeds"
+}
+
+pkg_postinst() {
+ python_version
+ # Note: Must use '-f' because python_mod_optimize sometimes leaves old files
+ # around.
+ python_mod_optimize -f \
+ /usr/$(get_libdir)/python${PYVER}/site-packages/zeroinstall
+}