git: aa8d1b3f0cf8 - main - news/nzbhydra2: Convert post-extract to EXTRACT_AFTER_ARGS

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Mon, 20 May 2024 21:54:00 UTC
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=aa8d1b3f0cf8c9e7b6dece28f8e1ea4cc00a2145

commit aa8d1b3f0cf8c9e7b6dece28f8e1ea4cc00a2145
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2024-05-20 21:23:19 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2024-05-20 21:53:50 +0000

    news/nzbhydra2: Convert post-extract to EXTRACT_AFTER_ARGS
    
    Saves a good amount of I/O instead of extracting everything
    While at it convert port to use (bsd)tar for extraction
    
    PR:             278745
    Approved by:    portmgr (maintainer timeout, 2+ weeks)
---
 news/nzbhydra2/Makefile | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/news/nzbhydra2/Makefile b/news/nzbhydra2/Makefile
index 99db5cee0da1..3716b82f33a8 100644
--- a/news/nzbhydra2/Makefile
+++ b/news/nzbhydra2/Makefile
@@ -13,10 +13,18 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 ONLY_FOR_ARCHS=	aarch64 amd64 powerpc64 powerpc64le
 
-USES=		python zip
+USES=		python
 USE_JAVA=	yes
 USE_RC_SUBR=	nzbhydra2
 
+EXTRACT_SUFX=	.zip
+EXTRACT_AFTER_ARGS=	--exclude executables \
+			--exclude other \
+			--exclude WindowsService \
+			--exclude *.exe \
+			--exclude nzbhydra2wrapper.py \
+			--no-same-owner --no-same-permissions
+
 NO_BUILD=	yes
 NO_WRKSUBDIR=	yes
 
@@ -38,13 +46,6 @@ PLIST_FILES=	${DATADIR}/lib/core-${DISTVERSION}-exec.jar \
 		${DATADIR}/readme.md \
 		${DATADIR}/LICENSE
 
-post-extract:
-	# Cleanup unnecessary files
-	@${RM} -r ${WRKSRC}/systemd ${WRKSRC}/sysv ${WRKSRC}/rc.d \
-		${WRKSRC}/upstart ${WRKSRC}/nzbhydra2wrapper.py  \
-		${WRKSRC}/other ${WRKSRC}/executables ${WRKSRC}/WindowsService \
-		${WRKSRC}/NZBHydra2*
-
 do-install:
 	@${MKDIR} ${STAGEDIR}/${DATADIR}
 	${INSTALL} -d -m 755 ${STAGEDIR}/${DATADIR}