aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2008-08-11 03:31:16 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2008-08-11 03:31:16 +0000
commita5cb7429c989a39b48340f12e1d075461c076968 (patch)
tree5108ddd21dee797866a079b3e0f5736126a48b22 /misc
parent00e2f2ca4dc6092ceaa2d49b77922044d64e4b4f (diff)
downloadports-a5cb7429c989a39b48340f12e1d075461c076968.tar.gz
ports-a5cb7429c989a39b48340f12e1d075461c076968.zip
New port metalink-editor version 1.1.0: GUI editor to create and edit metalinks
Notes
Notes: svn path=/head/; revision=218394
Diffstat (limited to 'misc')
-rw-r--r--misc/Makefile1
-rw-r--r--misc/metalink-editor/Makefile82
-rw-r--r--misc/metalink-editor/distinfo3
-rw-r--r--misc/metalink-editor/files/patch-metalink_editor.py21
-rw-r--r--misc/metalink-editor/files/setup.py54
-rw-r--r--misc/metalink-editor/pkg-descr10
-rw-r--r--misc/metalink-editor/pkg-plist11
7 files changed, 182 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile
index 52ded3bebd24..a04ad52fd949 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -366,6 +366,7 @@
SUBDIR += mc-light
SUBDIR += menushki
SUBDIR += metalink-checker
+ SUBDIR += metalink-editor
SUBDIR += metalink-tools
SUBDIR += metromap
SUBDIR += mgp-mode.el
diff --git a/misc/metalink-editor/Makefile b/misc/metalink-editor/Makefile
new file mode 100644
index 000000000000..81aff2695c57
--- /dev/null
+++ b/misc/metalink-editor/Makefile
@@ -0,0 +1,82 @@
+# New ports collection makefile for: Metalink editor
+# Date created: Sun 10 Aug 2008 10:50:59 UTC
+# Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= metalink
+PORTVERSION= 1.1.0
+CATEGORIES= misc
+MASTER_SITES= SF
+MASTER_SITE_SUBDIR= metalinks
+PKGNAMESUFFIX?= -editor
+DISTNAME= ${PORTNAME}_editor-${PORTVERSION}
+
+MAINTAINER= lioux@FreeBSD.org
+COMMENT= GUI editor to create and edit metalinks
+
+USE_BZIP2= yes
+USE_DOS2UNIX= yes
+DOS2UNIX_REGEX= .*\.txt
+USE_PYTHON= yes
+USE_PYDISTUTILS= yes
+PYDISTUTILS_EGGINFO= metalink_editor-${PORTVERSION}-py${PYTHON_VER}.egg-info
+USE_WX= 2.6
+WX_COMPS= python
+
+DATADIR= ${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX}
+
+DESKTOP_ENTRIES= "Metalink editor" \
+ "GUI editor to create and edit metalinks" \
+ "${DATADIR}/metalink.png" \
+ "metalink_editor.py" \
+ "Network;FileTransfer;" \
+ true
+
+#
+# Documents to install
+#
+DOC_FILES= \
+ readme.txt
+#
+.ifndef(NOPORTDOCS)
+PORTDOCS= *
+.endif
+
+post-extract:
+# Create a package to avoid namespace pollution
+ @${MKDIR} ${WRKSRC}/Metalink_editor
+ @${TOUCH} ${WRKSRC}/Metalink_editor/__init__.py
+ @${MV} ${WRKSRC}/metalink.py ${WRKSRC}/Metalink_editor/
+
+post-patch:
+# Correct location of image files
+ @${REINPLACE_CMD} -E \
+ -e 's|%%DATADIR%%|${DATADIR}|' \
+ ${WRKSRC}/metalink_editor.py
+
+pre-configure:
+# Prepare new setup.py
+ @${SED} \
+ -e 's|%%PYTHON_CMD%%|${PYTHON_CMD}|' \
+ -e 's|%%VERSION%%|${PORTVERSION}|' \
+ ${FILESDIR}/setup.py \
+ > ${WRKSRC}/${PYSETUP}
+
+post-install:
+# docs
+.ifndef(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+.for file in ${DOC_FILES}
+ @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
+.endfor
+.endif
+# fix installation permissions for restritive umask(1)
+ @${FIND} \
+ ${DATADIR} \
+ ${PYTHONPREFIX_SITELIBDIR}/Metalink_editor \
+ -type f -exec \
+ ${CHMOD} ${SHAREMODE} {} \;
+
+.include <bsd.port.mk>
diff --git a/misc/metalink-editor/distinfo b/misc/metalink-editor/distinfo
new file mode 100644
index 000000000000..9525409e6f22
--- /dev/null
+++ b/misc/metalink-editor/distinfo
@@ -0,0 +1,3 @@
+MD5 (metalink_editor-1.1.0.tar.bz2) = b943663d5756fce9f4c7d4bdc046a6c2
+SHA256 (metalink_editor-1.1.0.tar.bz2) = 80769c65efea8c18352fc81552aa2f963edc95dae4ae4115b7b6fc6b2a98d027
+SIZE (metalink_editor-1.1.0.tar.bz2) = 26526
diff --git a/misc/metalink-editor/files/patch-metalink_editor.py b/misc/metalink-editor/files/patch-metalink_editor.py
new file mode 100644
index 000000000000..e4df6eeecdd8
--- /dev/null
+++ b/misc/metalink-editor/files/patch-metalink_editor.py
@@ -0,0 +1,21 @@
+--- metalink_editor.py.orig 2007-07-29 05:58:54.000000000 -0300
++++ metalink_editor.py 2008-08-10 08:40:49.000000000 -0300
+@@ -18,7 +18,8 @@
+
+ ####import wxversion
+ ####wxversion.ensureMinimal("2.6")
+-import wx, metalink, sys, os.path
++import wx, sys, os.path
++from Metalink_editor import metalink
+
+ current_version = "1.1.0"
+
+@@ -28,7 +29,7 @@
+
+ # Just a simple hack... (used to locate the icon)
+ try:
+- data_path = os.path.dirname(sys.argv[0])
++ data_path = os.path.dirname("%%DATADIR%%/metalink_small.png")
+ if data_path != "" and data_path != ".":
+ print "Data path:", data_path
+ except:
diff --git a/misc/metalink-editor/files/setup.py b/misc/metalink-editor/files/setup.py
new file mode 100644
index 000000000000..7f2808fe51a6
--- /dev/null
+++ b/misc/metalink-editor/files/setup.py
@@ -0,0 +1,54 @@
+#!%%PYTHON_CMD%%
+
+# Copyright (c) 2008 Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+
+__version__ = "$FreeBSD$"
+
+try:
+ from distutils import sysconfig
+ from distutils.core import setup
+except:
+ raise SystemExit, "Distutils problem"
+
+try:
+ from os import environ
+except:
+ raise SystemExit, "os import problem"
+
+LOCALBASE = sysconfig.PREFIX
+PREFIX = environ.get('PREFIX', LOCALBASE)
+DATADIR = PREFIX + "/share/metalink-editor"
+
+setup(
+ name = 'metalink_editor',
+ version = '%%VERSION%%',
+ description = 'GUI editor to create and edit metalinks.',
+ author = 'Hampus Wessman',
+ url = 'http://hampus.vox.nu/metalink/',
+ packages = ['Metalink_editor'],
+ scripts = ['metalink_editor.py'],
+ data_files = [(DATADIR, ["metalink_small.png", "metalink.png"])],
+)
diff --git a/misc/metalink-editor/pkg-descr b/misc/metalink-editor/pkg-descr
new file mode 100644
index 000000000000..c53fa5539303
--- /dev/null
+++ b/misc/metalink-editor/pkg-descr
@@ -0,0 +1,10 @@
+[ excerpt from developer's web site ]
+
+A cross-platform GUI editor, written in Python. It enables you to
+both create and edit metalinks in a user friendly fashion. The
+editor can automatically enter info about file name, file size,
+hashes & chunk checksums by scanning a local file.
+
+WWW: http://metalinks.sourceforge.net/
+
+-- lioux@FreeBSD.org
diff --git a/misc/metalink-editor/pkg-plist b/misc/metalink-editor/pkg-plist
new file mode 100644
index 000000000000..20032f9ab293
--- /dev/null
+++ b/misc/metalink-editor/pkg-plist
@@ -0,0 +1,11 @@
+bin/metalink_editor.py
+%%PYTHON_SITELIBDIR%%/Metalink_editor/__init__.py
+%%PYTHON_SITELIBDIR%%/Metalink_editor/__init__.pyc
+%%PYTHON_SITELIBDIR%%/Metalink_editor/__init__.pyo
+%%PYTHON_SITELIBDIR%%/Metalink_editor/metalink.py
+%%PYTHON_SITELIBDIR%%/Metalink_editor/metalink.pyc
+%%PYTHON_SITELIBDIR%%/Metalink_editor/metalink.pyo
+%%DATADIR%%/metalink.png
+%%DATADIR%%/metalink_small.png
+@dirrm %%DATADIR%%
+@dirrm %%PYTHON_SITELIBDIR%%/Metalink_editor