summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'rox-base')
-rw-r--r--rox-base/zeroinstall-injector/ChangeLog11
-rw-r--r--rox-base/zeroinstall-injector/Manifest24
-rwxr-xr-xrox-base/zeroinstall-injector/files/0distutils97
-rw-r--r--rox-base/zeroinstall-injector/files/digest-zeroinstall-injector-0.313
-rw-r--r--rox-base/zeroinstall-injector/files/global.cfg5
-rw-r--r--rox-base/zeroinstall-injector/metadata.xml5
-rw-r--r--rox-base/zeroinstall-injector/zeroinstall-injector-0.31.ebuild33
7 files changed, 178 insertions, 0 deletions
diff --git a/rox-base/zeroinstall-injector/ChangeLog b/rox-base/zeroinstall-injector/ChangeLog
new file mode 100644
index 000000000000..08d8895686f7
--- /dev/null
+++ b/rox-base/zeroinstall-injector/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for rox-base/zeroinstall-injector
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/rox-base/zeroinstall-injector/ChangeLog,v 1.1 2007/12/04 17:02:45 lack Exp $
+
+*zeroinstall-injector-0.31 (04 Dec 2007)
+
+ 04 Dec 2007; Jim Ramsay <lack@gentoo.org> +files/0distutils,
+ +files/global.cfg, +metadata.xml, +zeroinstall-injector-0.31.ebuild:
+ New package: Zeroinstall Injector allows regular users to install software
+ themselves
+
diff --git a/rox-base/zeroinstall-injector/Manifest b/rox-base/zeroinstall-injector/Manifest
new file mode 100644
index 000000000000..994ae733bb53
--- /dev/null
+++ b/rox-base/zeroinstall-injector/Manifest
@@ -0,0 +1,24 @@
+AUX 0distutils 2877 RMD160 d776f049967c5b2d73148a24e27a3395a71a3602 SHA1 9662f2b10c6c8166a5cfb35e0f874e832499bb94 SHA256 2e8fae99c0dccdba237e403fe98b9f9f57197c1a119010f804361619b4e5f9c7
+MD5 bbf6fa93eb127d24736ae703dd75bd36 files/0distutils 2877
+RMD160 d776f049967c5b2d73148a24e27a3395a71a3602 files/0distutils 2877
+SHA256 2e8fae99c0dccdba237e403fe98b9f9f57197c1a119010f804361619b4e5f9c7 files/0distutils 2877
+AUX global.cfg 74 RMD160 bb2aa8c35d498342388c7e280c303f9869f9e6a3 SHA1 5ad6042f6fd113062ff347bdff563108927a20b6 SHA256 00e469a631692d515af084f43e9d854ae0ae4fa7a312b61a3050d4fb5caf6f47
+MD5 bc8c747409ee57787778ffeee9d7c00c files/global.cfg 74
+RMD160 bb2aa8c35d498342388c7e280c303f9869f9e6a3 files/global.cfg 74
+SHA256 00e469a631692d515af084f43e9d854ae0ae4fa7a312b61a3050d4fb5caf6f47 files/global.cfg 74
+DIST zeroinstall-injector-0.31.tar.bz2 121422 RMD160 6ad3e2490beca3ab40a073f896d0d8e38ac3263d SHA1 c784bd4d0b57d27c58bb37830bae67e2267c64b2 SHA256 ffb821bc30c298122800557bea60fbcf8370dd10324f1a10d6862d131cd4b462
+EBUILD zeroinstall-injector-0.31.ebuild 742 RMD160 78ae62f0cb914578c1be6b792eb9f1c6c653cc50 SHA1 0462f28626217052e904cb86edbd2cf9c8f879e2 SHA256 4a9dae9819b762477058a7314240a42c348d4841a5c372ae77c7c217b399607a
+MD5 876e80de63aec1afc950f0e3b448cf27 zeroinstall-injector-0.31.ebuild 742
+RMD160 78ae62f0cb914578c1be6b792eb9f1c6c653cc50 zeroinstall-injector-0.31.ebuild 742
+SHA256 4a9dae9819b762477058a7314240a42c348d4841a5c372ae77c7c217b399607a zeroinstall-injector-0.31.ebuild 742
+MISC ChangeLog 397 RMD160 b2936d1b73df5f5ef1ac2c0b750db9c6816065e6 SHA1 7c1c89c73f5e496d200e06f919c4d0e16f0de725 SHA256 0f73500f9c287740134ed20c8cdd4f0cd0baea5163c145d76e70d548ca93bdc7
+MD5 e18dab0cbfc56c0736d5f63485c3444c ChangeLog 397
+RMD160 b2936d1b73df5f5ef1ac2c0b750db9c6816065e6 ChangeLog 397
+SHA256 0f73500f9c287740134ed20c8cdd4f0cd0baea5163c145d76e70d548ca93bdc7 ChangeLog 397
+MISC metadata.xml 157 RMD160 fd6d83b802caa82822e8bb4d1752063fcda9b47f SHA1 54ccd31d923f052c9111f04c1a7d8b8f04f0a7b2 SHA256 941fe96a972d5a4f49555c01cbfab71d51e81ade3a53322fee549061aa17012c
+MD5 94ae74afbf5ec6b3f8cdcb4ea7c917bb metadata.xml 157
+RMD160 fd6d83b802caa82822e8bb4d1752063fcda9b47f metadata.xml 157
+SHA256 941fe96a972d5a4f49555c01cbfab71d51e81ade3a53322fee549061aa17012c metadata.xml 157
+MD5 7eb39a3f9d95ceeebf3378fe2f229a7e files/digest-zeroinstall-injector-0.31 280
+RMD160 7c61d14311c0d463a5b6596553d861fb18b1ce05 files/digest-zeroinstall-injector-0.31 280
+SHA256 215e27e2f7583c135da221521dc116bd95d367b9afa2ba05cb3313a79fde9710 files/digest-zeroinstall-injector-0.31 280
diff --git a/rox-base/zeroinstall-injector/files/0distutils b/rox-base/zeroinstall-injector/files/0distutils
new file mode 100755
index 000000000000..91e4d5deabfd
--- /dev/null
+++ b/rox-base/zeroinstall-injector/files/0distutils
@@ -0,0 +1,97 @@
+#!/usr/bin/python
+
+from xml.dom import minidom
+import xml.dom
+
+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")
+ 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)
diff --git a/rox-base/zeroinstall-injector/files/digest-zeroinstall-injector-0.31 b/rox-base/zeroinstall-injector/files/digest-zeroinstall-injector-0.31
new file mode 100644
index 000000000000..5e4b0196ba2e
--- /dev/null
+++ b/rox-base/zeroinstall-injector/files/digest-zeroinstall-injector-0.31
@@ -0,0 +1,3 @@
+MD5 f67fda4e7b5fe1079cd240a44ce34c6e zeroinstall-injector-0.31.tar.bz2 121422
+RMD160 6ad3e2490beca3ab40a073f896d0d8e38ac3263d zeroinstall-injector-0.31.tar.bz2 121422
+SHA256 ffb821bc30c298122800557bea60fbcf8370dd10324f1a10d6862d131cd4b462 zeroinstall-injector-0.31.tar.bz2 121422
diff --git a/rox-base/zeroinstall-injector/files/global.cfg b/rox-base/zeroinstall-injector/files/global.cfg
new file mode 100644
index 000000000000..95a47ff523db
--- /dev/null
+++ b/rox-base/zeroinstall-injector/files/global.cfg
@@ -0,0 +1,5 @@
+[global]
+freshness = -1
+help_with_testing = False
+network_use = off-line
+
diff --git a/rox-base/zeroinstall-injector/metadata.xml b/rox-base/zeroinstall-injector/metadata.xml
new file mode 100644
index 000000000000..36402044950c
--- /dev/null
+++ b/rox-base/zeroinstall-injector/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>rox</herd>
+</pkgmetadata>
diff --git a/rox-base/zeroinstall-injector/zeroinstall-injector-0.31.ebuild b/rox-base/zeroinstall-injector/zeroinstall-injector-0.31.ebuild
new file mode 100644
index 000000000000..dad489ac749a
--- /dev/null
+++ b/rox-base/zeroinstall-injector/zeroinstall-injector-0.31.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2007 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.31.ebuild,v 1.1 2007/12/04 17:02:45 lack Exp $
+
+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="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=dev-python/pygtk-2.0"
+
+src_install() {
+ distutils_src_install
+
+ exeinto "/usr/sbin/"
+ doexe "${FILESDIR}/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"
+}
+