aboutsummaryrefslogtreecommitdiff
path: root/sysutils/pyrenamer
diff options
context:
space:
mode:
authorJeremy Messenger <mezz@FreeBSD.org>2007-06-15 12:28:07 +0000
committerJeremy Messenger <mezz@FreeBSD.org>2007-06-15 12:28:07 +0000
commit0c0b19e3a2594faa947055d5e0c4d27e8abdeb04 (patch)
tree1790ca2c9cb9f7a0feaa2b65e048d2cf1d54836e /sysutils/pyrenamer
parentf5d22a96ab2f77034813b1faa9e2569e0085e009 (diff)
downloadports-0c0b19e3a2594faa947055d5e0c4d27e8abdeb04.tar.gz
ports-0c0b19e3a2594faa947055d5e0c4d27e8abdeb04.zip
Notes
Diffstat (limited to 'sysutils/pyrenamer')
-rw-r--r--sysutils/pyrenamer/Makefile39
-rw-r--r--sysutils/pyrenamer/distinfo3
-rw-r--r--sysutils/pyrenamer/files/patch-src_pyrenamerfilefuncs.py24
-rw-r--r--sysutils/pyrenamer/pkg-descr4
-rw-r--r--sysutils/pyrenamer/pkg-plist37
5 files changed, 107 insertions, 0 deletions
diff --git a/sysutils/pyrenamer/Makefile b/sysutils/pyrenamer/Makefile
new file mode 100644
index 000000000000..30d8c211c178
--- /dev/null
+++ b/sysutils/pyrenamer/Makefile
@@ -0,0 +1,39 @@
+# New ports collection makefile for: pyrenamer
+# Date created: 14 June 2007
+# Whom: Mezz <mezz@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= pyrenamer
+PORTVERSION= 0.1
+CATEGORIES= sysutils python gnome
+MASTER_SITES= http://www.infinicode.org/code/${PORTNAME}/
+
+MAINTAINER= mezz@FreeBSD.org
+COMMENT= A mass file renamer written in PyGTK
+
+USE_GMAKE= yes
+USE_GNOME= gnomehack gnomeprefix gconf2 pygtk2
+USE_PYTHON= yes
+GNU_CONFIGURE= yes
+
+DOCS= AUTHORS COPYING ChangeLog NEWS README
+MAN1= pyrenamer.1
+GCONF_SCHEMAS= pyrenamer.schemas
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|[(]datadir[)]/doc|(prefix)/share/examples|g' \
+ ${WRKSRC}/doc/Makefile.in
+ @${REINPLACE_CMD} -e 's|[(]datadir[)]/applications|(prefix)/share/applications|g' \
+ ${WRKSRC}/data/Makefile.in
+
+.ifndef (NOPORTDOCS)
+post-install:
+ @${MKDIR} ${DOCSDIR}
+.for i in ${DOCS}
+ @${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/sysutils/pyrenamer/distinfo b/sysutils/pyrenamer/distinfo
new file mode 100644
index 000000000000..7579941a4815
--- /dev/null
+++ b/sysutils/pyrenamer/distinfo
@@ -0,0 +1,3 @@
+MD5 (pyrenamer-0.1.tar.gz) = 6c2b87cfa307e5dffb4331f6fd113805
+SHA256 (pyrenamer-0.1.tar.gz) = cad99edc0530f8b7a6ae6f2b369e3792f5f60b632b28fb77aa50ed146f17ab0b
+SIZE (pyrenamer-0.1.tar.gz) = 115106
diff --git a/sysutils/pyrenamer/files/patch-src_pyrenamerfilefuncs.py b/sysutils/pyrenamer/files/patch-src_pyrenamerfilefuncs.py
new file mode 100644
index 000000000000..a227c91987a4
--- /dev/null
+++ b/sysutils/pyrenamer/files/patch-src_pyrenamerfilefuncs.py
@@ -0,0 +1,24 @@
+--- src/pyrenamerfilefuncs.py.orig Fri Jun 15 07:14:07 2007
++++ src/pyrenamerfilefuncs.py Fri Jun 15 07:15:43 2007
+@@ -39,6 +39,12 @@
+ return STOP
+
+
++def escape_pattern(pattern):
++ """ Escape special chars on patterns, so glob doesn't get confused """
++ pattern = pattern.replace('[', '[[]')
++ return pattern
++
++
+ def get_file_listing(dir, pattern=None):
+ """ Returns the file listing of a given directory. It returns only files.
+ Returns a list of [file,/path/to/file] """
+@@ -49,7 +55,7 @@
+ listaux = dircache.listdir(dir)
+ else:
+ if dir != '/': dir += '/'
+- dir += pattern
++ dir = escape_pattern(dir + pattern)
+ listaux = glob.glob(dir)
+
+ listaux.sort(key=str.lower)
diff --git a/sysutils/pyrenamer/pkg-descr b/sysutils/pyrenamer/pkg-descr
new file mode 100644
index 000000000000..0674e9da43d0
--- /dev/null
+++ b/sysutils/pyrenamer/pkg-descr
@@ -0,0 +1,4 @@
+pyRenamer is a mass file renamer written in PyGTK. You can rename files using
+patterns, substitutions, insert or delete text, or even rename files manually.
+
+WWW: http://www.infinicode.org/code/pyrenamer/
diff --git a/sysutils/pyrenamer/pkg-plist b/sysutils/pyrenamer/pkg-plist
new file mode 100644
index 000000000000..a89922864090
--- /dev/null
+++ b/sysutils/pyrenamer/pkg-plist
@@ -0,0 +1,37 @@
+bin/pyrenamer
+%%PYTHON_SITELIBDIR%%/pyrenamer/TreeViewTooltips.py
+%%PYTHON_SITELIBDIR%%/pyrenamer/TreeViewTooltips.pyc
+%%PYTHON_SITELIBDIR%%/pyrenamer/TreeViewTooltips.pyo
+%%PYTHON_SITELIBDIR%%/pyrenamer/__init__.py
+%%PYTHON_SITELIBDIR%%/pyrenamer/__init__.pyc
+%%PYTHON_SITELIBDIR%%/pyrenamer/__init__.pyo
+%%PYTHON_SITELIBDIR%%/pyrenamer/pyrenamer.py
+%%PYTHON_SITELIBDIR%%/pyrenamer/pyrenamer.pyc
+%%PYTHON_SITELIBDIR%%/pyrenamer/pyrenamer.pyo
+%%PYTHON_SITELIBDIR%%/pyrenamer/pyrenamer_globals.py
+%%PYTHON_SITELIBDIR%%/pyrenamer/pyrenamer_globals.pyc
+%%PYTHON_SITELIBDIR%%/pyrenamer/pyrenamer_globals.pyo
+%%PYTHON_SITELIBDIR%%/pyrenamer/pyrenamerfilefuncs.py
+%%PYTHON_SITELIBDIR%%/pyrenamer/pyrenamerfilefuncs.pyc
+%%PYTHON_SITELIBDIR%%/pyrenamer/pyrenamerfilefuncs.pyo
+%%PYTHON_SITELIBDIR%%/pyrenamer/tooltips.py
+%%PYTHON_SITELIBDIR%%/pyrenamer/tooltips.pyc
+%%PYTHON_SITELIBDIR%%/pyrenamer/tooltips.pyo
+%%PYTHON_SITELIBDIR%%/pyrenamer/treefilebrowser.py
+%%PYTHON_SITELIBDIR%%/pyrenamer/treefilebrowser.pyc
+%%PYTHON_SITELIBDIR%%/pyrenamer/treefilebrowser.pyo
+share/applications/pyrenamer.desktop
+%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
+%%PORTDOCS%%%%DOCSDIR%%/COPYING
+%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
+%%PORTDOCS%%%%DOCSDIR%%/NEWS
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%EXAMPLESDIR%%/treefilebrowser_example.py
+%%DATADIR%%/pyrenamer.glade
+%%DATADIR%%/pyrenamer.png
+%%DATADIR%%/pyrenamer.svg
+@dirrm %%DATADIR%%
+@dirrm %%EXAMPLESDIR%%
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@dirrmtry share/applications
+@dirrm %%PYTHON_SITELIBDIR%%/pyrenamer