aboutsummaryrefslogtreecommitdiff
path: root/deskutils/znotes/Makefile
blob: b4d26f21c7dd0039a898dc9974b694bc2ca3c40e (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
# New ports collection makefile for:	znotes
# Date created:		2009-11-12
# Whom:			Gvozdikov Veniamin <g.veniamin@googlemail.com>
#
# $FreeBSD$
#

PORTNAME=	znotes
PORTVERSION=	0.4.1
PORTREVISION=	1
CATEGORIES=	deskutils
MASTER_SITES=	SF/${PORTNAME}/${PORTVERSION}/
DISTNAME=	${PORTNAME}-${PORTVERSION}

MAINTAINER=	g.veniamin@googlemail.com
COMMENT=	Simple notes based on QT4

USE_QT_VER=	4
QT_COMPONENTS=	gui xml qmake_build uic_build moc_build rcc_build \
		linguist

DESKTOP_ENTRIES="zNotes" "Simple notes" \
		"${PREFIX}/share/pixmaps/${PORTNAME}.png" "${PORTNAME}" \
		"Utility;TextEditor;Qt;" ${FALSE}

OPTIONS=	NLS		"Build with NLS support" on

PLIST_FILES=	bin/${PORTNAME} \
		share/pixmaps/${PORTNAME}.png

post-patch:
	    @${REINPLACE_CMD} -e 's|lrelease|lrelease-qt4|g' \
		${WRKSRC}/${PORTNAME}.pro
	    @${REINPLACE_CMD} -i -e 's,QCoreApplication::applicationDirPath()+"/translations","${DATADIR}/translations",g' \
		${WRKSRC}/settings.cpp

.include <bsd.port.pre.mk>

do-configure:
	cd ${WRKSRC} && ${QMAKE} ${QMAKE_PRO}

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/${PORTNAME}
	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.png ${PREFIX}/share/pixmaps/

.if defined(WITH_NLS)
	${MKDIR} ${DATADIR}/translations
	${INSTALL_DATA} ${WRKSRC}/translations/*.qm ${DATADIR}/translations
PLIST_FILES+=	share/${PORTNAME}/translations/${PORTNAME}_cs.qm \
		share/${PORTNAME}/translations/${PORTNAME}_ru.qm
PLIST_DIRS+=	share/${PORTNAME}/translations \
		share/${PORTNAME}
.else
.endif

.include <bsd.port.post.mk>