pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

jicofo: build the package in offline mode



Module Name:	pkgsrc-wip
Committed By:	Pierre Pronchery <khorben%defora.org@localhost>
Pushed By:	khorben
Date:		Tue Jan 3 08:08:31 2023 +0100
Changeset:	a0055c4c10e02158d5eb7296430882e9c6594a24

Modified Files:
	jicofo/Makefile
	jicofo/PLIST
	jicofo/distinfo

Log Message:
jicofo: build the package in offline mode

While there:

* register the package version with maven when building
* also install logging.properties as a configuration file
* add a rule to generate the dependencies archive
* appease pkglint some more

This paves the way for jicofo to be included in pkgsrc proper.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a0055c4c10e02158d5eb7296430882e9c6594a24

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 jicofo/Makefile | 68 +++++++++++++++++++++++++++++++++++++--------------------
 jicofo/PLIST    |  7 ++++--
 jicofo/distinfo |  4 ++++
 3 files changed, 53 insertions(+), 26 deletions(-)

diffs:
diff --git a/jicofo/Makefile b/jicofo/Makefile
index 692416d3eb..e808aa0816 100644
--- a/jicofo/Makefile
+++ b/jicofo/Makefile
@@ -1,60 +1,80 @@
 # $NetBSD$
 
+.include "../../wip/jitsi-meet/Makefile.common"
+
 GITHUB_PROJECT=	jicofo
 PKGNAME=	${GITHUB_PROJECT}-${JITSI_MEET_VERSION}
 
 HOMEPAGE=	https://github.com/jitsi/jicofo/
-COMMENT=	Server side focus component used in Jitsi Meet conferences
+COMMENT=	Server-side focus component used in Jitsi Meet conferences
 
 DISTINFO_FILE=	${.CURDIR}/../../wip/jicofo/distinfo
+DISTFILES=	${DEFAULT_DISTFILES}
+DISTFILES+=	jicofo-java-deps-${JITSI_MEET_VERSION}.tar.gz
+SITES.jicofo-java-deps-${JITSI_MEET_VERSION}.tar.gz= \
+		ftp://ftp.NetBSD.org/pub/NetBSD/misc/khorben/
 
-USE_TOOLS+=	bash:run unzip
-USE_JAVA2=	17
+USE_TOOLS+=	bash:run pax:build unzip
 
-REPLACE_BASH=	resources/jicofo.sh
+USE_JAVA2=	17
 
 TOOL_DEPENDS+=	apache-maven-[0-9]*:../../devel/apache-maven
 
+MAVEN_FLAGS+=	-Duser.home=${FAKEHOMEDIR}
+MAVEN_FLAGS+=	-Dmaven.repo.local=${WRKDIR}/deps
+MAVEN_FLAGS+=	--offline
 MAVEN_FLAGS+=	-DskipTests
 MAVEN_FLAGS+=	-Dassembly.skipAssembly=false
-MAVEN_FLAGS+=	-Djavax.net.ssl.trustStore=${WRKDIR}/keystore
-MAVEN_FLAGS+=	-Djavax.net.ssl.trustStorePassword=password
+MVN=		mvn ${MAVEN_FLAGS}
 
-INSTALLATION_DIRS+=	bin
-INSTALLATION_DIRS+=	share
+REPLACE_BASH=	resources/collect-dump-logs.sh
+REPLACE_BASH+=	resources/jicofo.sh
+
+EGDIR=			share/examples/jicofo
+PKG_SYSCONFSUBDIR=	jitsi/jicofo
+CONF_FILES+=		${EGDIR}/logging.properties \
+			${PKG_SYSCONFDIR}/logging.properties
 
-SUBST_CLASSES+=		java logging
+SUBST_CLASSES+=		java
 SUBST_STAGE.java=	post-configure
 SUBST_FILES.java=	resources/jicofo.sh
 SUBST_SED.java=		-e 's,^exec java,exec ${JAVA_BINPREFIX}-java,'
+
+SUBST_CLASSES+=		logging
 SUBST_STAGE.logging=	post-configure
 SUBST_FILES.logging=	resources/jicofo.sh
-SUBST_SED.logging=	-e 's,$$SCRIPT_DIR/lib/logging\.properties,${PKG_SYSCONFDIR}/jitsi/jicofo/logging.properties,'
+SUBST_SED.logging=	-e 's,$$SCRIPT_DIR/lib/logging\.properties,${PKG_SYSCONFDIR}/logging.properties,'
+
+MAKE_JOBS_SAFE=		no
+
+INSTALLATION_DIRS+=	bin
+INSTALLATION_DIRS+=	${EGDIR} share/jicofo
+
+create-deps-file: build
+	#XXX disable offline mode for maven before using this rule
+	cd ${WRKSRC} && ${MVN} validate
+	cd ${WRKDIR} && \
+		${PAX} -wz -f jicofo-java-deps-${JITSI_MEET_VERSION}.tar.gz deps
 
 do-configure:
-	#XXX this assumes trusted CA certificates are in /etc/openssl/certs
-	cd ${WRKSRC} && \
-		for cert in /etc/openssl/certs/*.0; do \
-			/usr/pkg/java/openjdk17/bin/keytool -importcert \
-					-keystore ${WRKDIR}/keystore \
-					-noprompt -trustcacerts \
-					-storepass password -file "$$cert" \
-					-alias $$(basename "$$cert"); done
+	cd ${WRKSRC} && ${MVN} versions:set -DnewVersion="${JITSI_MEET_VERSION}"
 
 do-build:
-	cd ${WRKSRC} && \
-		mvn package ${MAVEN_FLAGS}
+	cd ${WRKSRC} && ${MVN} package
 
 do-install:
 	${RM} -rf ${DESTDIR}${PREFIX}/share/jicofo \
-		${DESTDIR}${PREFIX}/share/jicofo-1.1-SNAPSHOT
+		${DESTDIR}${PREFIX}/share/jicofo-${JITSI_MEET_VERSION}
 	cd ${DESTDIR}${PREFIX}/share && \
-		${UNZIP_CMD} ${WRKSRC}/jicofo/target/jicofo-1.1-SNAPSHOT-archive.zip
-	${MV} ${DESTDIR}${PREFIX}/share/jicofo-1.1-SNAPSHOT \
+		${UNZIP_CMD} ${WRKSRC}/jicofo/target/jicofo-${JITSI_MEET_VERSION}-archive.zip
+	${MV} ${DESTDIR}${PREFIX}/share/jicofo-${JITSI_MEET_VERSION} \
 		${DESTDIR}${PREFIX}/share/jicofo
 	${LN} -sf ../share/jicofo/jicofo.sh \
 		${DESTDIR}${PREFIX}/bin/jicofo
+	${INSTALL_DATA} ${WRKSRC}/lib/logging.properties \
+		${DESTDIR}${PREFIX}/${EGDIR}/logging.properties
+	${INSTALL_SCRIPT} ${WRKSRC}/resources/collect-dump-logs.sh \
+		${DESTDIR}${PREFIX}/share/jicofo/collect-dump-logs.sh
 
-.include "../../wip/jitsi-meet/Makefile.common"
 .include "../../mk/java-vm.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/jicofo/PLIST b/jicofo/PLIST
index 0b0149b655..27b55d5c63 100644
--- a/jicofo/PLIST
+++ b/jicofo/PLIST
@@ -1,5 +1,7 @@
 @comment $NetBSD$
 bin/jicofo
+share/examples/jicofo/logging.properties
+share/jicofo/collect-dump-logs.sh
 share/jicofo/jicofo.bat
 share/jicofo/jicofo.jar
 share/jicofo/jicofo.sh
@@ -52,8 +54,8 @@ share/jicofo/lib/jetty-util-11.0.10.jar
 share/jicofo/lib/jicoco-1.1-119-gc527d61.jar
 share/jicofo/lib/jicoco-config-1.1-119-gc527d61.jar
 share/jicofo/lib/jicoco-metrics-1.1-119-gc527d61.jar
-share/jicofo/lib/jicofo-common-1.1-SNAPSHOT.jar
-share/jicofo/lib/jicofo-selector-1.1-SNAPSHOT.jar
+share/jicofo/lib/jicofo-common-${PKGVERSION}.jar
+share/jicofo/lib/jicofo-selector-${PKGVERSION}.jar
 share/jicofo/lib/jitsi-metaconfig-1.0-9-g5e1b624.jar
 share/jicofo/lib/jitsi-utils-1.0-119-ga7b23ff.jar
 share/jicofo/lib/jitsi-xmpp-extensions-1.0-59-g76a5c13.jar
@@ -91,3 +93,4 @@ share/jicofo/lib/smack-tcp-4.4.6.jar
 share/jicofo/lib/smack-xmlparser-4.4.6.jar
 share/jicofo/lib/smack-xmlparser-stax-4.4.6.jar
 share/jicofo/lib/spotbugs-annotations-4.6.0.jar
+@pkgdir share/examples/jicofo
diff --git a/jicofo/distinfo b/jicofo/distinfo
index de80cd681a..5f10cf75c5 100644
--- a/jicofo/distinfo
+++ b/jicofo/distinfo
@@ -1,5 +1,9 @@
 $NetBSD$
 
+BLAKE2s (jicofo/jicofo-java-deps-2.0.8138.tar.gz) = d06323602159959cb4a87d6d36bc978edb91a02cdc0c249cf254321308d1fa11
+SHA512 (jicofo/jicofo-java-deps-2.0.8138.tar.gz) = 0ebf0fd98dd24c143d301efd154eb1eac65a337125689917eb734d70322769fba2f888aee8e442498814de7c07adbb0a1a1426bfb8ebd4f7c7566900fa826667
+Size (jicofo/jicofo-java-deps-2.0.8138.tar.gz) = 164169960 bytes
 BLAKE2s (jicofo/jitsi-meet_8138.tar.gz) = d0df1114b51a1dbaf7b3049cb17240867501f9a9eac2e133e5ed2d0a09a046d2
 SHA512 (jicofo/jitsi-meet_8138.tar.gz) = 76464feba02c5ecd86e45e02bc703a39d0a70bb2080e539fa7177ab170bd7d84f9489040e2928af79c2b141900dc545db6f1bd47b9e34774b6bde0971296432b
 Size (jicofo/jitsi-meet_8138.tar.gz) = 237910 bytes
+SHA1 (patch-resources_jicofo.sh) = 986445ede72ec0333bb56a52bc3c57030eca8383


Home | Main Index | Thread Index | Old Index