1 # Created by: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
8 MASTER_SITES= SF/${PORTNAME}s/Metalink%20Editor/${PORTVERSION}
9 PKGNAMESUFFIX?= -editor
10 DISTNAME= ${PORTNAME}editor-${PORTVERSION}
12 MAINTAINER= lioux@FreeBSD.org
13 COMMENT= GUI editor to create and edit metalinks
16 LICENSE_FILE= ${WRKDIR}/license.txt
20 DOS2UNIX_REGEX= .*\.txt
24 PYDISTUTILS_EGGINFO= metalink_editor-${PORTVERSION}-py${PYTHON_VER}.egg-info
28 DATADIR= ${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX}
30 DESKTOP_ENTRIES= "Metalink editor" \
31 "GUI editor to create and edit metalinks" \
32 "${DATADIR}/metalink.png" \
33 "metalink_editor.py" \
34 "Network;FileTransfer;" \
38 # Documents to install
49 # Create a package to avoid namespace pollution
50 @${MKDIR} ${WRKSRC}/Metalink_editor
51 @${TOUCH} ${WRKSRC}/Metalink_editor/__init__.py
52 @${MV} ${WRKSRC}/metalink.py ${WRKSRC}/Metalink_editor/
55 # Correct location of image files
56 @${REINPLACE_CMD} -E \
57 -e 's|%%DATADIR%%|${DATADIR}|' \
58 ${WRKSRC}/metalink_editor.py
61 # Prepare new setup.py
63 -e 's|%%PYTHON_CMD%%|${PYTHON_CMD}|' \
64 -e 's|%%VERSION%%|${PORTVERSION}|' \
65 ${FILESDIR}/setup.py \
66 > ${WRKSRC}/${PYSETUP}
72 .for file in ${DOC_FILES}
73 @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
76 # fix installation permissions for restritive umask(1)
79 ${PYTHONPREFIX_SITELIBDIR}/Metalink_editor \
81 ${CHMOD} ${SHAREMODE} {} \;
83 .include <bsd.port.mk>