aboutsummaryrefslogtreecommitdiff
path: root/textproc/loook/Makefile
blob: ff423b1647786b3ba77ff20b4bfbbfb4da364dc4 (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
PORTNAME=	loook
PORTVERSION=	0.9.0
CATEGORIES=	textproc
MASTER_SITES=	http://mechtilde.de/Loook/Downloads/
DIST_SUBDIR=	python

MAINTAINER=	dinoex@FreeBSD.org
COMMENT=	Simple Python tool that search in LibreOffice/OpenOffice files
WWW=		https://mechtilde.de/Loook/

LICENSE=	GPLv2+

RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}tkinter>=0:x11-toolkits/py-tkinter@${PY_FLAVOR}

USES=		python:3.4+ gettext-tools:build

WRKSRC=		${WRKDIR}
PLIST_FILES=	bin/${PORTNAME} \
		man/man1/loook.1.gz \
		man/de/man1/loook.1.gz \
		share/applications/loook.desktop \
		share/locale/cs/LC_MESSAGES/loook.mo \
		share/locale/de/LC_MESSAGES/loook.mo \
		share/locale/en/LC_MESSAGES/loook.mo \
		share/locale/es/LC_MESSAGES/loook.mo \
		share/locale/fr/LC_MESSAGES/loook.mo \
		share/locale/it/LC_MESSAGES/loook.mo \
		share/locale/nl/LC_MESSAGES/loook.mo \
		share/pixmaps/loook.png \

LCMESSAGES=	cs de en es fr it nl

post-patch:
	@${REINPLACE_CMD} -e 's|/usr/bin/python3|${PYTHON_CMD}|' \
		-e 's|/usr/share/locale/|${PREFIX}/share/locale/|' \
		${WRKSRC}/${PORTNAME}.py

do-build:
.for i in ${LCMESSAGES}
	msgfmt --check --output-file=${WRKSRC}/loook.${i}.mo ${WRKSRC}/loook.${i}.po
.endfor

do-install:
	${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.py \
		${STAGEDIR}${PREFIX}/bin/${PORTNAME}
	-${MKDIR} ${STAGEDIR}${PREFIX}/man/de/man1
	${INSTALL_MAN} ${WRKSRC}/man/loook.1 \
		${STAGEDIR}${PREFIX}/man/man1/
	${INSTALL_MAN} ${WRKSRC}/man/de/loook.1 \
		${STAGEDIR}${PREFIX}/man/de/man1/
	${INSTALL_DATA} ${WRKSRC}/loook.desktop \
		${STAGEDIR}${PREFIX}/share/applications/
	${INSTALL_DATA} ${WRKSRC}/loook.png \
		${STAGEDIR}${PREFIX}/share/pixmaps/
.for i in ${LCMESSAGES}
	${INSTALL_DATA} \
		${WRKSRC}/loook.${i}.mo \
		${STAGEDIR}${PREFIX}/share/locale/${i}/LC_MESSAGES/loook.mo
.endfor

.include <bsd.port.mk>