Update misc/metalink-editor to version 1.2.0_4
[dports.git] / misc / metalink-editor / Makefile
1 # New ports collection makefile for:    Metalink editor
2 # Date created:         Sun 10 Aug 2008 10:50:59 UTC
3 # Whom:                 Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
4 #
5 # $FreeBSD: ports/misc/metalink-editor/Makefile,v 1.9 2013/01/23 15:05:36 svnexp Exp $
6 #
7
8 PORTNAME=       metalink
9 PORTVERSION=    1.2.0
10 PORTREVISION=   4
11 CATEGORIES=     misc
12 MASTER_SITES=   SF/${PORTNAME}s/Metalink%20Editor/${PORTVERSION}
13 PKGNAMESUFFIX?= -editor
14 DISTNAME=       ${PORTNAME}editor-${PORTVERSION}
15
16 MAINTAINER=     lioux@FreeBSD.org
17 COMMENT=        GUI editor to create and edit metalinks
18
19 LICENSE=        GPLv2
20 LICENSE_FILE=   ${WRKDIR}/license.txt
21
22 USE_ZIP=        yes
23 USE_DOS2UNIX=   yes
24 DOS2UNIX_REGEX= .*\.txt
25 NO_WRKSUBDIR=   yes
26 USE_PYTHON=     yes
27 USE_PYDISTUTILS=        yes
28 PYDISTUTILS_EGGINFO=    metalink_editor-${PORTVERSION}-py${PYTHON_VER}.egg-info
29 USE_WX=         2.6
30 WX_COMPS=       python
31
32 DATADIR=        ${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX}
33
34 DESKTOP_ENTRIES=        "Metalink editor" \
35                         "GUI editor to create and edit metalinks" \
36                         "${DATADIR}/metalink.png" \
37                         "metalink_editor.py" \
38                         "Network;FileTransfer;" \
39                         true
40
41 #
42 # Documents to install
43 #
44 DOC_FILES=      \
45                 readme.txt
46 #
47 .ifndef(NOPORTDOCS)
48 PORTDOCS=       *
49 .endif
50
51 post-extract:
52 # Create a package to avoid namespace pollution
53         @${MKDIR} ${WRKSRC}/Metalink_editor
54         @${TOUCH} ${WRKSRC}/Metalink_editor/__init__.py
55         @${MV} ${WRKSRC}/metalink.py ${WRKSRC}/Metalink_editor/
56
57 post-patch:
58 # Correct location of image files
59         @${REINPLACE_CMD} -E \
60                 -e 's|%%DATADIR%%|${DATADIR}|' \
61                 ${WRKSRC}/metalink_editor.py
62
63 pre-configure:
64 # Prepare new setup.py
65         @${SED} \
66                 -e 's|%%PYTHON_CMD%%|${PYTHON_CMD}|' \
67                 -e 's|%%VERSION%%|${PORTVERSION}|' \
68                 ${FILESDIR}/setup.py \
69                 > ${WRKSRC}/${PYSETUP}
70
71 post-install:
72 # docs
73 .ifndef(NOPORTDOCS)
74         @${MKDIR} ${DOCSDIR}
75 .for file in ${DOC_FILES}
76         @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
77 .endfor
78 .endif
79 # fix installation permissions for restritive umask(1)
80         @${FIND} \
81                 ${DATADIR} \
82                 ${PYTHONPREFIX_SITELIBDIR}/Metalink_editor \
83                 -type f -exec \
84                 ${CHMOD} ${SHAREMODE} {} \;
85
86 .include <bsd.port.mk>