1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

Project moved to sourceforge servers.

Use DOCSDIR in pkg-plist.
Distfile has been rerolled, no code changes - but archive type is now .zip,
and code rewritten with windows style /r/n - patch is fixing this issue.
Code tested with Python 2.2.x and 2.3 (Thanks marcus@)

Approved by:		roberto (mentor)
This commit is contained in:
Michael Landin 2003-08-11 14:50:31 +00:00
parent c6fcd5d297
commit b8522e61c3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=86764
10 changed files with 312 additions and 110 deletions

View File

@ -7,28 +7,27 @@
PORTNAME= portell
PORTVERSION= 0.1
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= misc
MASTER_SITES= http://freebsdcluster.org/~mich/software/ \
http://www.seekrut.com/rk/
DISTNAME= ${PORTNAME}
DIST_SUBDIR= ${PORTNAME}-${PORTVERSION}
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
EXTRACT_SUFX= .zip
MAINTAINER= mich@FreeBSD.org
COMMENT= Quick display of FreeBSD port descriptions
PATCH_WRKSRC= ${WRKDIR}
USE_ZIP= YES
USE_PYTHON= YES
USE_REINPLACE= YES
do-build:
${REINPLACE_CMD} -e 's/portell.py/portell/' ${WRKDIR}/README
${REINPLACE_CMD} -e 's/portell.py/portell/' ${WRKSRC}/README.txt
do-install:
${INSTALL_SCRIPT} ${WRKDIR}/portell.py ${PREFIX}/bin/portell
${INSTALL_SCRIPT} ${WRKSRC}/portell.py ${PREFIX}/bin/portell
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKDIR}/README ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README.txt ${DOCSDIR}
.endif
post-install:
@ -36,7 +35,7 @@ post-install:
@${ECHO_MSG} ""
@${ECHO_MSG} "###############################################################################"
@${ECHO_MSG} "# You must run 'portell -u' to initialize the DB"
@${ECHO_MSG} "# ${DOCSDIR}/README for more information."
@${ECHO_MSG} "# ${DOCSDIR}/README.txt for more information."
@${ECHO_MSG} "###############################################################################"
@${ECHO_MSG} ""
.endif

View File

@ -1 +1 @@
MD5 (portell-0.1/portell.tar.gz) = c312d832078252adc37975f7e9baae3a
MD5 (portell-0.1.zip) = 13121ee620ab27efb0f39267743e1887

View File

@ -1,49 +1,151 @@
--- portell.py.orig Mon Oct 22 07:18:32 2001
+++ portell.py Mon Aug 4 16:34:27 2003
@@ -11,8 +11,10 @@
try:
PORTELL_DB = os.environ['PORTELL_PATH']
--- portell.py.orig Mon Aug 11 15:23:47 2003
+++ portell.py Mon Aug 11 15:34:56 2003
@@ -1,70 +1,78 @@
-#! /usr/bin/env python
-# portell.py
-# Description: prints a port's descr-file from whatever directory you're in.
-# Author: Ryan "gt3" Kulla
-# Email: ambiod@sbcglobal.net
-# Version: 0.1
-# Usage: portell.py <portname>
-
-import sys, os, shelve
-from string import join
-
-try:
- PORTELL_DB = os.environ['PORTELL_PATH']
-except KeyError:
- PORTELL_DB = "/var/db/portell.db"
-
-PORTS_DIR = "/usr/ports/"
-
-def write_pathname(d, dirname, names):
- dirname = join(dirname.split('/')[:5], '/') # chop port path subdirs
- d[os.path.basename(dirname)] = dirname
-
-def update_db():
- if os.access(PORTELL_DB, os.F_OK):
- os.unlink(PORTELL_DB)
- try:
- d = shelve.open(PORTELL_DB)
- os.chmod(PORTELL_DB, 0666)
- except:
- print "can't read or write %s. are you root?" % PORTELL_DB
- sys.exit(0)
- os.path.walk(PORTS_DIR, write_pathname, d)
- d.close()
-
-def main():
- if len(sys.argv) != 2:
- print "usage: %s <portname>" % sys.argv[0]
- sys.exit(0)
-
- if sys.argv[1] == '-u':
- update_db()
- sys.exit(0)
- else:
- portname = sys.argv[1]
-
- if not os.access(PORTELL_DB, os.F_OK):
- print >> sys.stderr, "you need to create %s first." % PORTELL_DB
- print >> sys.stderr, "type: %s -u" % sys.argv[0]
- sys.exit(0)
-
- d = shelve.open(PORTELL_DB)
-
- if d.has_key(portname):
- descr_path = d[portname] + "/pkg-descr"
- match = descr_path
- try:
- descr_file = open(match, 'r').readlines()
- print "%s reads:\n" % descr_path
- for line in descr_file:
- print line,
- except IOError, errmsg:
- print errmsg
- else:
- print >> sys.stderr, "can't find %s" % portname
-
- d.close()
-
-
-if __name__=='__main__':
- main()
+#! /usr/bin/env python
+# portell.py
+# Description: prints a port's descr-file from whatever directory you're in.
+# Author: Ryan "gt3" Kulla
+# Email: ambiod@sbcglobal.net
+# Version: 0.1
+# Usage: portell.py <portname>
+
+import sys, os, shelve
+from string import join
+
+try:
+ PORTELL_DB = os.environ['PORTELL_PATH']
+ if sys.version[:3] == '2.2':
+ PORTELL_DB = PORTELL_DB + ".db"
+
+ PORTELL_DB_FILE = PORTELL_DB + ".db"
except KeyError:
- PORTELL_DB = "/var/db/portell.db"
+ PORTELL_DB = "/var/db/portell"
+except KeyError:
+ if sys.version[:3] == '2.2':
+ PORTELL_DB = "/var/db/portell.db"
+ else:
+ PORTELL_DB = "/var/db/portell"
+ PORTELL_DB_FILE = "/var/db/portell.db"
PORTS_DIR = "/usr/ports/"
@@ -23,13 +25,13 @@
def update_db():
- if os.access(PORTELL_DB, os.F_OK):
- os.unlink(PORTELL_DB)
+
+PORTS_DIR = "/usr/ports/"
+
+def write_pathname(d, dirname, names):
+ dirname = join(dirname.split('/')[:5], '/') # chop port path subdirs
+ d[os.path.basename(dirname)] = dirname
+
+def update_db():
+ if os.access(PORTELL_DB_FILE, os.F_OK):
+ os.unlink(PORTELL_DB_FILE)
try:
- d = shelve.open(PORTELL_DB)
- os.chmod(PORTELL_DB, 0666)
+ d = shelve.open(PORTELL_DB_FILE)
+ try:
+ d = shelve.open(PORTELL_DB)
+ os.chmod(PORTELL_DB_FILE, 0666)
except:
- print "can't read or write %s. are you root?" % PORTELL_DB
+ except:
+ print "can't read or write %s. are you root?" % PORTELL_DB_FILE
sys.exit(0)
os.path.walk(PORTS_DIR, write_pathname, d)
d.close()
@@ -46,12 +48,12 @@
else:
portname = sys.argv[1]
- if not os.access(PORTELL_DB, os.F_OK):
- print >> sys.stderr, "you need to create %s first." % PORTELL_DB
+ sys.exit(0)
+ os.path.walk(PORTS_DIR, write_pathname, d)
+ d.close()
+
+def main():
+ if len(sys.argv) != 2:
+ print "usage: %s <portname>" % sys.argv[0]
+ sys.exit(0)
+
+ if sys.argv[1] == '-u':
+ update_db()
+ sys.exit(0)
+ else:
+ portname = sys.argv[1]
+
+ if not os.access(PORTELL_DB_FILE, os.F_OK):
+ print >> sys.stderr, "you need to create %s first." % PORTELL_DB_FILE
print >> sys.stderr, "type: %s -u" % sys.argv[0]
sys.exit(0)
- d = shelve.open(PORTELL_DB)
+ d = shelve.open(PORTELL_DB_FILE)
if d.has_key(portname):
descr_path = d[portname] + "/pkg-descr"
+ print >> sys.stderr, "type: %s -u" % sys.argv[0]
+ sys.exit(0)
+
+ d = shelve.open(PORTELL_DB)
+
+ if d.has_key(portname):
+ descr_path = d[portname] + "/pkg-descr"
+ match = descr_path
+ try:
+ descr_file = open(match, 'r').readlines()
+ print "%s reads:\n" % descr_path
+ for line in descr_file:
+ print line,
+ except IOError, errmsg:
+ print errmsg
+ else:
+ print >> sys.stderr, "can't find %s" % portname
+
+ d.close()
+
+
+if __name__=='__main__':
+ main()

View File

@ -3,7 +3,7 @@ givin in its pkg-descr file for a specific port. If you want to know what
the program "Foo" is, then you can type "portell foo" and portell will
find its pkg-descr file and dump it on your display.
WWW: http://www.seekrut.com/rk/portell.html
WWW: http://portell.sourceforge.net
AUTHOR: Ryan Kulla <toxicpulse@sbcglobal.net>
- Michael L. Hostbaek

View File

@ -1,3 +1,3 @@
bin/portell
%%PORTDOCS%%share/doc/portell/README
%%PORTDOCS%%@dirrm share/doc/portell
%%PORTDOCS%%%%DOCSDIR%%/README.txt
%%PORTDOCS%%@dirrm %%DOCSDIR%%

View File

@ -7,28 +7,27 @@
PORTNAME= portell
PORTVERSION= 0.1
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= misc
MASTER_SITES= http://freebsdcluster.org/~mich/software/ \
http://www.seekrut.com/rk/
DISTNAME= ${PORTNAME}
DIST_SUBDIR= ${PORTNAME}-${PORTVERSION}
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
EXTRACT_SUFX= .zip
MAINTAINER= mich@FreeBSD.org
COMMENT= Quick display of FreeBSD port descriptions
PATCH_WRKSRC= ${WRKDIR}
USE_ZIP= YES
USE_PYTHON= YES
USE_REINPLACE= YES
do-build:
${REINPLACE_CMD} -e 's/portell.py/portell/' ${WRKDIR}/README
${REINPLACE_CMD} -e 's/portell.py/portell/' ${WRKSRC}/README.txt
do-install:
${INSTALL_SCRIPT} ${WRKDIR}/portell.py ${PREFIX}/bin/portell
${INSTALL_SCRIPT} ${WRKSRC}/portell.py ${PREFIX}/bin/portell
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKDIR}/README ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README.txt ${DOCSDIR}
.endif
post-install:
@ -36,7 +35,7 @@ post-install:
@${ECHO_MSG} ""
@${ECHO_MSG} "###############################################################################"
@${ECHO_MSG} "# You must run 'portell -u' to initialize the DB"
@${ECHO_MSG} "# ${DOCSDIR}/README for more information."
@${ECHO_MSG} "# ${DOCSDIR}/README.txt for more information."
@${ECHO_MSG} "###############################################################################"
@${ECHO_MSG} ""
.endif

View File

@ -1 +1 @@
MD5 (portell-0.1/portell.tar.gz) = c312d832078252adc37975f7e9baae3a
MD5 (portell-0.1.zip) = 13121ee620ab27efb0f39267743e1887

View File

@ -1,49 +1,151 @@
--- portell.py.orig Mon Oct 22 07:18:32 2001
+++ portell.py Mon Aug 4 16:34:27 2003
@@ -11,8 +11,10 @@
try:
PORTELL_DB = os.environ['PORTELL_PATH']
--- portell.py.orig Mon Aug 11 15:23:47 2003
+++ portell.py Mon Aug 11 15:34:56 2003
@@ -1,70 +1,78 @@
-#! /usr/bin/env python
-# portell.py
-# Description: prints a port's descr-file from whatever directory you're in.
-# Author: Ryan "gt3" Kulla
-# Email: ambiod@sbcglobal.net
-# Version: 0.1
-# Usage: portell.py <portname>
-
-import sys, os, shelve
-from string import join
-
-try:
- PORTELL_DB = os.environ['PORTELL_PATH']
-except KeyError:
- PORTELL_DB = "/var/db/portell.db"
-
-PORTS_DIR = "/usr/ports/"
-
-def write_pathname(d, dirname, names):
- dirname = join(dirname.split('/')[:5], '/') # chop port path subdirs
- d[os.path.basename(dirname)] = dirname
-
-def update_db():
- if os.access(PORTELL_DB, os.F_OK):
- os.unlink(PORTELL_DB)
- try:
- d = shelve.open(PORTELL_DB)
- os.chmod(PORTELL_DB, 0666)
- except:
- print "can't read or write %s. are you root?" % PORTELL_DB
- sys.exit(0)
- os.path.walk(PORTS_DIR, write_pathname, d)
- d.close()
-
-def main():
- if len(sys.argv) != 2:
- print "usage: %s <portname>" % sys.argv[0]
- sys.exit(0)
-
- if sys.argv[1] == '-u':
- update_db()
- sys.exit(0)
- else:
- portname = sys.argv[1]
-
- if not os.access(PORTELL_DB, os.F_OK):
- print >> sys.stderr, "you need to create %s first." % PORTELL_DB
- print >> sys.stderr, "type: %s -u" % sys.argv[0]
- sys.exit(0)
-
- d = shelve.open(PORTELL_DB)
-
- if d.has_key(portname):
- descr_path = d[portname] + "/pkg-descr"
- match = descr_path
- try:
- descr_file = open(match, 'r').readlines()
- print "%s reads:\n" % descr_path
- for line in descr_file:
- print line,
- except IOError, errmsg:
- print errmsg
- else:
- print >> sys.stderr, "can't find %s" % portname
-
- d.close()
-
-
-if __name__=='__main__':
- main()
+#! /usr/bin/env python
+# portell.py
+# Description: prints a port's descr-file from whatever directory you're in.
+# Author: Ryan "gt3" Kulla
+# Email: ambiod@sbcglobal.net
+# Version: 0.1
+# Usage: portell.py <portname>
+
+import sys, os, shelve
+from string import join
+
+try:
+ PORTELL_DB = os.environ['PORTELL_PATH']
+ if sys.version[:3] == '2.2':
+ PORTELL_DB = PORTELL_DB + ".db"
+
+ PORTELL_DB_FILE = PORTELL_DB + ".db"
except KeyError:
- PORTELL_DB = "/var/db/portell.db"
+ PORTELL_DB = "/var/db/portell"
+except KeyError:
+ if sys.version[:3] == '2.2':
+ PORTELL_DB = "/var/db/portell.db"
+ else:
+ PORTELL_DB = "/var/db/portell"
+ PORTELL_DB_FILE = "/var/db/portell.db"
PORTS_DIR = "/usr/ports/"
@@ -23,13 +25,13 @@
def update_db():
- if os.access(PORTELL_DB, os.F_OK):
- os.unlink(PORTELL_DB)
+
+PORTS_DIR = "/usr/ports/"
+
+def write_pathname(d, dirname, names):
+ dirname = join(dirname.split('/')[:5], '/') # chop port path subdirs
+ d[os.path.basename(dirname)] = dirname
+
+def update_db():
+ if os.access(PORTELL_DB_FILE, os.F_OK):
+ os.unlink(PORTELL_DB_FILE)
try:
- d = shelve.open(PORTELL_DB)
- os.chmod(PORTELL_DB, 0666)
+ d = shelve.open(PORTELL_DB_FILE)
+ try:
+ d = shelve.open(PORTELL_DB)
+ os.chmod(PORTELL_DB_FILE, 0666)
except:
- print "can't read or write %s. are you root?" % PORTELL_DB
+ except:
+ print "can't read or write %s. are you root?" % PORTELL_DB_FILE
sys.exit(0)
os.path.walk(PORTS_DIR, write_pathname, d)
d.close()
@@ -46,12 +48,12 @@
else:
portname = sys.argv[1]
- if not os.access(PORTELL_DB, os.F_OK):
- print >> sys.stderr, "you need to create %s first." % PORTELL_DB
+ sys.exit(0)
+ os.path.walk(PORTS_DIR, write_pathname, d)
+ d.close()
+
+def main():
+ if len(sys.argv) != 2:
+ print "usage: %s <portname>" % sys.argv[0]
+ sys.exit(0)
+
+ if sys.argv[1] == '-u':
+ update_db()
+ sys.exit(0)
+ else:
+ portname = sys.argv[1]
+
+ if not os.access(PORTELL_DB_FILE, os.F_OK):
+ print >> sys.stderr, "you need to create %s first." % PORTELL_DB_FILE
print >> sys.stderr, "type: %s -u" % sys.argv[0]
sys.exit(0)
- d = shelve.open(PORTELL_DB)
+ d = shelve.open(PORTELL_DB_FILE)
if d.has_key(portname):
descr_path = d[portname] + "/pkg-descr"
+ print >> sys.stderr, "type: %s -u" % sys.argv[0]
+ sys.exit(0)
+
+ d = shelve.open(PORTELL_DB)
+
+ if d.has_key(portname):
+ descr_path = d[portname] + "/pkg-descr"
+ match = descr_path
+ try:
+ descr_file = open(match, 'r').readlines()
+ print "%s reads:\n" % descr_path
+ for line in descr_file:
+ print line,
+ except IOError, errmsg:
+ print errmsg
+ else:
+ print >> sys.stderr, "can't find %s" % portname
+
+ d.close()
+
+
+if __name__=='__main__':
+ main()

View File

@ -3,7 +3,7 @@ givin in its pkg-descr file for a specific port. If you want to know what
the program "Foo" is, then you can type "portell foo" and portell will
find its pkg-descr file and dump it on your display.
WWW: http://www.seekrut.com/rk/portell.html
WWW: http://portell.sourceforge.net
AUTHOR: Ryan Kulla <toxicpulse@sbcglobal.net>
- Michael L. Hostbaek

View File

@ -1,3 +1,3 @@
bin/portell
%%PORTDOCS%%share/doc/portell/README
%%PORTDOCS%%@dirrm share/doc/portell
%%PORTDOCS%%%%DOCSDIR%%/README.txt
%%PORTDOCS%%@dirrm %%DOCSDIR%%