aboutsummaryrefslogtreecommitdiff
path: root/x11/grimshot/Makefile
blob: d79e7f3e3f96087ea1c050ac4e3803b6c6232f05 (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
PORTNAME=	grimshot
DISTVERSION=	1.8.1
CATEGORIES=	x11 wayland

PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
PATCHFILES+=	344ab1a510c0.patch:-p2 # https://github.com/swaywm/sway/pull/5914

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Screenshot helper for Sway
WWW=		https://swaywm.org/

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC:H}/LICENSE

RUN_DEPENDS=	jq:textproc/jq \
		grim:x11/grim \
		slurp:x11/slurp

USE_GITHUB=	yes
GH_ACCOUNT=	swaywm
GH_PROJECT=	sway

NO_ARCH=	yes

WRKSRC_SUBDIR=	contrib
PLIST_FILES=	bin/${PORTNAME}

OPTIONS_DEFINE=	CLIPBOARD MANPAGES NOTIFY
OPTIONS_DEFAULT=CLIPBOARD MANPAGES NOTIFY

CLIPBOARD_DESC=		Copy to clipboard support
CLIPBOARD_RUN_DEPENDS=	wl-copy:x11/wl-clipboard

MANPAGES_BUILD_DEPENDS=	scdoc:textproc/scdoc
MANPAGES_PLIST_FILES=	share/man/man1/${PORTNAME}.1.gz

NOTIFY_RUN_DEPENDS=	notify-send:devel/libnotify

do-build:
do-build-MANPAGES-on:
	scdoc < ${WRKSRC}/${PORTNAME}.1.scd >${WRKSRC}/${PORTNAME}.1

do-install:
	${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin

do-install-MANPAGES-on:
	${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 \
		${STAGEDIR}${PREFIX}/${MANPAGES_PLIST_FILES:H}

.include <bsd.port.mk>