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= ports@FreeBSD.org
13 COMMENT= GUI editor to create and edit metalinks
16 LICENSE_FILE= ${WRKDIR}/license.txt
19 DOS2UNIX_REGEX= .*\.txt
23 PYDISTUTILS_EGGINFO= metalink_editor-${PORTVERSION}-py${PYTHON_VER}.egg-info
27 DATADIR= ${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX}
29 DESKTOP_ENTRIES= "Metalink editor" \
30 "GUI editor to create and edit metalinks" \
31 "${DATADIR}/metalink.png" \
32 "metalink_editor.py" \
33 "Network;FileTransfer;" \
37 # Documents to install
48 # Create a package to avoid namespace pollution
49 @${MKDIR} ${WRKSRC}/Metalink_editor
50 @${TOUCH} ${WRKSRC}/Metalink_editor/__init__.py
51 @${MV} ${WRKSRC}/metalink.py ${WRKSRC}/Metalink_editor/
54 # Correct location of image files
55 @${REINPLACE_CMD} -E \
56 -e 's|%%DATADIR%%|${DATADIR}|' \
57 ${WRKSRC}/metalink_editor.py
60 # Prepare new setup.py
62 -e 's|%%PYTHON_CMD%%|${PYTHON_CMD}|' \
63 -e 's|%%VERSION%%|${PORTVERSION}|' \
64 ${FILESDIR}/setup.py \
65 > ${WRKSRC}/${PYSETUP}
71 .for file in ${DOC_FILES}
72 @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
75 # fix installation permissions for restritive umask(1)
78 ${PYTHONPREFIX_SITELIBDIR}/Metalink_editor \
80 ${CHMOD} ${SHAREMODE} {} \;
82 .include <bsd.port.mk>