aboutsummaryrefslogtreecommitdiff
path: root/misc/metalink-editor/Makefile
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/metalink-editor/Makefile
parent00e2f2ca4dc6092ceaa2d49b77922044d64e4b4f (diff)
downloadports-a5cb7429c989a39b48340f12e1d075461c076968.tar.gz
ports-a5cb7429c989a39b48340f12e1d075461c076968.zip
Notes
Diffstat (limited to 'misc/metalink-editor/Makefile')
-rw-r--r--misc/metalink-editor/Makefile82
1 files changed, 82 insertions, 0 deletions
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>