Date: Fri, 28 May 2021 01:37:42 GMT From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: eabb1532ca37 - main - cad/digital: Install icons and desktop file provided by the project Message-ID: <202105280137.14S1bgpM069459@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=eabb1532ca37317952fd79ee8ce3fa91108882eb commit eabb1532ca37317952fd79ee8ce3fa91108882eb Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2021-05-28 01:33:26 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2021-05-28 01:37:40 +0000 cad/digital: Install icons and desktop file provided by the project PR: 256210 Reported by: Duane <parakleta@darkreality.org> --- cad/digital/Makefile | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/cad/digital/Makefile b/cad/digital/Makefile index 5520c9e0a802..6c4d3b2a0ef9 100644 --- a/cad/digital/Makefile +++ b/cad/digital/Makefile @@ -1,6 +1,7 @@ PORTNAME= digital DISTVERSIONPREFIX= v DISTVERSION= 0.27 +PORTREVISION= 1 CATEGORIES= cad java MAINTAINER= yuri@FreeBSD.org @@ -11,6 +12,8 @@ LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= mvn:devel/maven +USES= desktop-file-utils + USE_JAVA= yes USE_GITHUB= yes GH_ACCOUNT= hneemann @@ -37,10 +40,14 @@ DISTFILES+= ${PORTNAME}-${DISTVERSION}-deps${EXTRACT_SUFX}:maven MVN_ARGS= --offline .endif -DESKTOP_ENTRIES= "Digital logic designer" "Digital logic designer and circuit simulator" "" "${PORTNAME}" "Electronics;" "" +ICON_SIZES= 32 48 64 128 +ICON_NAME= digital-logic-designer PLIST_FILES= bin/${PORTNAME} \ - ${JAVAJARDIR}/Digital.jar + ${JAVAJARDIR}/Digital.jar \ + ${ICON_SIZES:C/(.*)/share\/icons\/hicolor\/\1x\1\/apps\/${ICON_NAME}.png/} \ + share/icons/hicolor/scalable/apps/${ICON_NAME}.svg \ + share/applications/${PORTNAME}.desktop do-build: @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ @@ -51,11 +58,26 @@ do-build: -P no-git-rev -Dgit.commit.id.describe=${DISTVERSIONFULL} \ package do-install: + # install jar ${INSTALL_DATA} ${WRKSRC}/target/Digital.jar ${STAGEDIR}${JAVAJARDIR} + # install shell wrapper @(echo "#!/bin/sh"; \ echo ""; \ echo "${JAVA} -jar ${JAVAJARDIR}/Digital.jar \""$$"@\"" \ ) > ${STAGEDIR}${PREFIX}/bin/${PORTNAME} @${CHMOD} +x ${STAGEDIR}${PREFIX}/bin/${PORTNAME} + # install desktop file + ${SED} -e '\ + s|<EXEC_LOCATION>|${PREFIX}/bin/${PORTNAME}| ; \ + s|<ICON_LOCATION>|${ICON_NAME}|' \ + < ${WRKSRC}/distribution/linux/desktop.template \ + > ${STAGEDIR}${PREFIX}/share/applications/${PORTNAME}.desktop + # install icons +.for SZ in ${ICON_SIZES} + ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${SZ}x${SZ}/apps + ${INSTALL_DATA} ${WRKSRC}/src/main/resources/icons/icon${SZ}.png ${STAGEDIR}${PREFIX}/share/icons/hicolor/${SZ}x${SZ}/apps/${ICON_NAME}.png +.endfor + ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps + ${INSTALL_DATA} ${WRKSRC}/src/main/svg/icon.svg ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${ICON_NAME}.svg .include <bsd.port.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105280137.14S1bgpM069459>