[33827] trunk/dports/sysutils/smart
afb at macports.org
afb at macports.org
Wed Feb 6 05:23:48 PST 2008
Revision: 33827
http://trac.macosforge.org/projects/macports/changeset/33827
Author: afb at macports.org
Date: 2008-02-06 05:23:42 -0800 (Wed, 06 Feb 2008)
Log Message:
-----------
add channels, deb support
Modified Paths:
--------------
trunk/dports/sysutils/smart/Portfile
trunk/dports/sysutils/smart/files/patch-prefix.diff
Added Paths:
-----------
trunk/dports/sysutils/smart/files/patch-deb_base.py
Modified: trunk/dports/sysutils/smart/Portfile
===================================================================
--- trunk/dports/sysutils/smart/Portfile 2008-02-06 13:17:08 UTC (rev 33826)
+++ trunk/dports/sysutils/smart/Portfile 2008-02-06 13:23:42 UTC (rev 33827)
@@ -4,6 +4,7 @@
name smart
version 0.52
+revision 1
platforms darwin freebsd
categories sysutils archivers
maintainers n3npq at mac.com afb at macports.org
@@ -23,7 +24,7 @@
rmd160 16d692b4cd8c391bbf0b4578b998a54fc1ed6f4a
use_bzip2 yes
-patchfiles patch-prefix.diff patch-archscore.diff patch-filetools.py
+patchfiles patch-prefix.diff patch-archscore.diff patch-filetools.py patch-deb_base.py
depends_lib lib:librpm:rpm port:python24
### by default, it will run --shell interface.
@@ -41,6 +42,11 @@
build.env PYTHON="${prefix}/bin/python2.4"
+post-destroot {
+ destroot.keepdirs ${destroot}${prefix}/etc/smart/channels \
+ ${destroot}${prefix}/var/lib/smart
+}
+
livecheck.name smartpm
livecheck.check regex
livecheck.url ${homepage}
Added: trunk/dports/sysutils/smart/files/patch-deb_base.py
===================================================================
--- trunk/dports/sysutils/smart/files/patch-deb_base.py (rev 0)
+++ trunk/dports/sysutils/smart/files/patch-deb_base.py 2008-02-06 13:23:42 UTC (rev 33827)
@@ -0,0 +1,20 @@
+--- ./smart/backends/deb/base.py.orig 2007-10-05 14:53:17.000000000 +0200
++++ ./smart/backends/deb/base.py 2008-01-28 13:26:33.000000000 +0100
+@@ -27,6 +27,7 @@ from smart.cache import *
+ import fnmatch
+ import string
+ import os, re
++import sys
+
+ __all__ = ["DebPackage", "DebProvides", "DebNameProvides", "DebPreRequires",
+ "DebRequires", "DebUpgrades", "DebConflicts", "DebOrRequires",
+@@ -54,6 +55,9 @@ def getArchitecture():
+ return arch
+
+ DEBARCH = sysconf.get("deb-arch", getArchitecture())
++platform = sys.platform
++if platform != "linux2":
++ DEBARCH = "%s-%s" % (platform, DEBARCH)
+
+ class DebPackage(Package):
+
Modified: trunk/dports/sysutils/smart/files/patch-prefix.diff
===================================================================
--- trunk/dports/sysutils/smart/files/patch-prefix.diff 2008-02-06 13:17:08 UTC (rev 33826)
+++ trunk/dports/sysutils/smart/files/patch-prefix.diff 2008-02-06 13:23:42 UTC (rev 33827)
@@ -35,6 +35,15 @@
if os.path.isdir(dir):
for alias in sysconf.keys("channels"):
if sysconf.get(("channels", alias, "type")) == "rpm-sys":
+@@ -35,7 +35,7 @@
+ })
+
+ def detectDEBSystem():
+- dir = os.path.join(sysconf.get("deb-root", "/"), "var/lib/dpkg")
++ dir = os.path.join(sysconf.get("deb-root", "/"), "@@PREFIX@@/var/lib/dpkg")
+ if os.path.isdir(dir):
+ for alias in sysconf.keys("channels"):
+ if sysconf.get(("channels", alias, "type")) == "deb-sys":
--- ./smart/backends/rpm/base.py.orig 2006-11-07 21:22:46.000000000 +0100
+++ ./smart/backends/rpm/base.py 2007-06-18 20:53:43.000000000 +0200
@@ -53,7 +53,7 @@ def getTS(new=False):
@@ -57,3 +66,38 @@
digest = os.path.getmtime(path)
if digest == self._digest:
return True
+--- ./smart/channels/deb_sys.py.orig 2007-08-07 18:56:15.000000000 +0200
++++ ./smart/channels/deb_sys.py 2008-01-28 11:55:32.000000000 +0100
+@@ -32,7 +32,7 @@ class DebSysChannel(PackageChannel):
+
+ def fetch(self, fetcher, progress):
+ path = os.path.join(sysconf.get("deb-root", "/"),
+- "var/lib/dpkg/status")
++ "@@PREFIX@@/var/lib/dpkg/status")
+ digest = os.path.getmtime(path)
+ if digest == self._digest:
+ return True
+--- ./smart/plugins/channelsync.py.orig 2007-08-07 18:56:17.000000000 +0200
++++ ./smart/plugins/channelsync.py 2008-01-28 15:08:12.000000000 +0100
+@@ -23,7 +23,7 @@ from smart.channel import *
+ from smart import *
+ import os
+
+-CHANNELSDIR = "/etc/smart/channels/"
++CHANNELSDIR = "@@PREFIX@@/etc/smart/channels/"
+
+ def syncChannels(channelsdir, force=None):
+
+--- ./smart/plugins/aptchannelsync.py.orig 2007-08-07 18:56:17.000000000 +0200
++++ ./smart/plugins/aptchannelsync.py 2008-01-28 15:08:04.000000000 +0100
+@@ -29,8 +29,8 @@ import sys
+ if sys.version_info < (2, 4):
+ from sets import Set as set
+
+-APT_SOURCES_DIR = "/etc/apt/sources.list.d/"
+-APT_SOURCES = "/etc/apt/sources.list"
++APT_SOURCES_DIR = "@@PREFIX@@/etc/apt/sources.list.d/"
++APT_SOURCES = "@@PREFIX@@/etc/apt/sources.list"
+
+ def _readSourcesList(file):
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080206/8f30fabc/attachment.html
More information about the macports-changes
mailing list