aboutsummaryrefslogtreecommitdiff
path: root/misc/chatgpt-shell-cli/Makefile
blob: e0f10b1190a48bc56d715a1b79d50fc1427ba14b (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
PORTNAME=	chatgpt-shell-cli
DISTVERSION=	g20230516
PORTREVISION=	0
CATEGORIES=	misc

MAINTAINER=	nivit@FreeBSD.org
COMMENT=	Shell script to use OpenAI's ChatGPT and DALL-E from the terminal
WWW=		https://github.com/0xacx/chatGPT-shell-cli

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

RUN_DEPENDS=	bash:shells/bash \
		curl:ftp/curl \
		jq:textproc/jq \
		xdg-open:devel/xdg-utils

USES=		magick:run shebangfix

USE_GITHUB=	yes
GH_ACCOUNT=	0xacx
GH_PROJECT=	chatGPT-shell-cli
GH_TAGNAME=	926587a

SHEBANG_FILES=	${WRKSRC}/chatgpt.sh

NO_ARCH=	yes
NO_BUILD=	yes

PLIST_FILES=	bin/chatgpt

post-patch:
		  ${REINPLACE_CMD} 's/open \("$${image_url}"\)/xdg-open \1/g' ${WRKSRC}/chatgpt.sh

do-install:
		${INSTALL_SCRIPT} ${WRKSRC}/chatgpt.sh ${STAGEDIR}${PREFIX}/bin/chatgpt

.include <bsd.port.mk>