summaryrefslogtreecommitdiff
path: root/net-im/coyim/Makefile
blob: 8c4bd38b817f874c1a9377ba2049e13665a86a78 (plain)
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

PORTNAME=	coyim
DISTVERSIONPREFIX=	v
DISTVERSION=	0.3.11
PORTREVISION=	3
CATEGORIES=	net-im

MAINTAINER=	fox@FreeBSD.org
COMMENT=	Safe and secure by default chat client

LICENSE=	GPLv3
LICENSE_FILE=	${WRKSRC}/LICENSE

LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
		libfreetype.so:print/freetype2

USES=		gnome go pkgconfig

USE_GNOME=	atk cairo gdkpixbuf2 glib20 gtk30 pango

OPTIONS_DEFINE=	NLS
OPTIONS_SUB=	yes

NLS_USES=		gettext
NLS_CONFIGURE_ENABLE=	nls

USE_GITHUB=	yes
GH_ACCOUNT=	coyim
GH_SUBDIR=	src/github.com/${GH_ACCOUNT}/${PORTNAME}

GO_BUILDFLAGS=	-tags ${GTK_BUILD_TAG}

SUB_LIST=	PORTNAME=${PORTNAME}

PLIST_FILES=	bin/coyim \
		share/applications/coyim.desktop \
		share/pixmaps/coyim.png

GTK_VERSION=	"$$(pkg-config --modversion gtk+-3.0 | ${TR} . _ | cut -d '_' -f 1-2)"
GTK_BUILD_TAG=	gtk_${GTK_VERSION}

COYIM_ICON=	coyim.png
COYIM_ICON_SRC=	${WRKSRC}/build/mac-bundle/coy.iconset/icon_32x32@2x.png
COYIM_DESKTOP=	${WRKSRC}/build/coyim.desktop

pre-build:
	cd ${WRKSRC} && ${SH} ./gen_version_file.sh ${DISTVERSIONPREFIX}${DISTVERSION}

post-build:
	@${REINPLACE_CMD} -e '/^#/d' \
		-e '/^$$/d' \
		${COYIM_DESKTOP}
	${ECHO_CMD} "Exec=${PREFIX}/bin/coyim" >> ${COYIM_DESKTOP}
	${ECHO_CMD} "Icon=${COYIM_ICON}" >> ${COYIM_DESKTOP}

post-install:
	${INSTALL_DATA} ${COYIM_DESKTOP} ${STAGEDIR}${PREFIX}/share/applications/
	${INSTALL_DATA} ${COYIM_ICON_SRC} ${STAGEDIR}${PREFIX}/share/pixmaps/${COYIM_ICON}

.include <bsd.port.mk>