New port metalink-editor version 1.1.0: GUI editor to create and edit metalinks

This commit is contained in:
Mario Sergio Fujikawa Ferreira 2008-08-11 03:31:16 +00:00
parent 00e2f2ca4d
commit a5cb7429c9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=218394
7 changed files with 182 additions and 0 deletions

View file

@ -366,6 +366,7 @@
SUBDIR += mc-light
SUBDIR += menushki
SUBDIR += metalink-checker
SUBDIR += metalink-editor
SUBDIR += metalink-tools
SUBDIR += metromap
SUBDIR += mgp-mode.el

View file

@ -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>

View file

@ -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

View file

@ -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:

View file

@ -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"])],
)

View file

@ -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

View file

@ -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