aboutsummaryrefslogtreecommitdiffstats
path: root/misc/gonvert/Makefile
blob: 8d237630aea5d5fe6ef83a848777419701f190e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# ex:ts=8
# New ports collection makefile for:    gonvert
# Date created:         Apr 9, 2001
# Whom:             Ying-Chieh Liao <ijliao@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   gonvert
PORTVERSION=    0.2.25
PORTREVISION=   2
CATEGORIES= misc python gnome
MASTER_SITES=   http://www.unihedron.com/projects/gonvert/downloads/

MAINTAINER= nemysis@gmx.ch
COMMENT=    Conversion utility that allows conversion between many units

LICENSE=    GPLv2

USE_GNOME=  pygtk2
USE_PYTHON= yes
NO_BUILD=   yes

PORTDOCS=   CHANGELOG FAQ README THANKS TODO

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MNLS}
USE_GETTEXT=    yes
PLIST_SUB+= NLS=""
.else
PLIST_SUB+= NLS="@comment "
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|#!/usr/bin/python|#!/usr/bin/env python|g ; \
         s|/usr/share|${PREFIX}/share|g ; \
         s|/\.\./pixmaps/|/pixmaps/|g' ${WRKSRC}/gonvert

do-install:
    ${INSTALL_SCRIPT} ${WRKSRC}/gonvert ${PREFIX}/bin
    @${MKDIR} ${PREFIX}/share/applications
    ${INSTALL_DATA} ${WRKSRC}/gonvert.desktop ${PREFIX}/share/applications
    @${MKDIR} ${DATADIR}
    ${INSTALL_DATA} ${WRKSRC}/gonvert.glade ${DATADIR}
    @${MKDIR} ${DATADIR}/pixmaps
    ${INSTALL_DATA} ${WRKSRC}/pixmaps/*.png ${DATADIR}/pixmaps
    @${MKDIR} ${PREFIX}/share/pixmaps
    ${LN} -sf ${DATADIR}/pixmaps/gonvert.png ${PREFIX}/share/pixmaps

.if ${PORT_OPTIONS:MNLS}
    @${MKDIR} ${PREFIX}/share/locale/pl/LC_MESSAGES
    ${INSTALL_DATA} ${WRKSRC}/i18n/pl_messages.gmo \
        ${PREFIX}/share/locale/pl/LC_MESSAGES/gonvert.mo
.endif

.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${DOCSDIR}
.endif

.include <bsd.port.mk>