pkgsrc-WIP-changes archive

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

cannonball: Adds a desktop file and icon.



Module Name:	pkgsrc-wip
Committed By:	Santhosh Raju <fox%NetBSD.org@localhost>
Pushed By:	fox
Date:		Tue Oct 22 06:36:40 2019 -0500
Changeset:	bce1b90172c1463bb0ded47dc938164e178505fa

Modified Files:
	cannonball/Makefile
	cannonball/PLIST
Added Files:
	cannonball/files/cannonball.desktop

Log Message:
cannonball: Adds a desktop file and icon.

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

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

diffstat:
 cannonball/Makefile                 | 21 ++++++++++++++++++++-
 cannonball/PLIST                    |  2 ++
 cannonball/files/cannonball.desktop |  8 ++++++++
 3 files changed, 30 insertions(+), 1 deletion(-)

diffs:
diff --git a/cannonball/Makefile b/cannonball/Makefile
index d198d12ade..62ffc150ba 100644
--- a/cannonball/Makefile
+++ b/cannonball/Makefile
@@ -21,10 +21,23 @@ CMAKE_ARGS.NetBSD+=	-G "Unix Makefiles"
 CMAKE_ARGS.NetBSD+=	-DTARGET=bsd
 CMAKE_ARGS.NetBSD+=	-DBSD_PREFIX_PATH:STRING=${PREFIX}
 
-INSTALLATION_DIRS+=	bin libexec share/cannonball share/cannonball/res \
+TOOL_DEPENDS+=	icoutils-[0-9]*:../../graphics/icoutils
+
+ICON_SIZES=	16
+
+INSTALLATION_DIRS+=	bin libexec share/applications \
+			share/cannonball share/cannonball/res \
 			share/cannonball/conf ${PKGMANDIR}/man6
+.for s in ${ICON_SIZES}
+INSTALLATION_DIRS+=	share/icons/hicolor/${s}x${s}/apps
+.endfor
 
 pre-configure:
+.for s in ${ICON_SIZES}
+	cd ${WRKSRC} && ${PREFIX}/bin/icotool -w ${s} -h ${s} -x -o ${s}.png \
+	   res/cannonball.ico
+.endfor
+
 	${MKDIR} ${WRKSRC}/build
 
 post-build:
@@ -38,12 +51,18 @@ do-install:
 	    ${DESTDIR}${PREFIX}/share/cannonball/res/tilepatch.bin
 	${INSTALL_DATA} ${WRKSRC}/build/config.xml \
 	    ${DESTDIR}${PREFIX}/share/cannonball/conf/config.xml
+	${INSTALL_DATA} ${FILESDIR}/cannonball.desktop \
+		${DESTDIR}${PREFIX}/share/applications
 	${INSTALL_SCRIPT} ${WRKDIR}/cannonball.sh \
 	    ${DESTDIR}${PREFIX}/bin/cannonball
 	${INSTALL_PROGRAM} ${WRKSRC}/build/cannonball \
 	    ${DESTDIR}${PREFIX}/libexec
 	${INSTALL_MAN} ${WRKSRC}/docs/cannonball.6 \
 	    ${DESTDIR}${PREFIX}/${PKGMANDIR}/man6
+.for s in ${ICON_SIZES}
+	${INSTALL_DATA} ${WRKSRC}/${s}.png \
+	    ${DESTDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/cannonball.png
+.endfor
 
 .include "../../devel/boost-headers/buildlink3.mk"
 .include "../../devel/boost-libs/buildlink3.mk"
diff --git a/cannonball/PLIST b/cannonball/PLIST
index f472cd4884..5847710b37 100644
--- a/cannonball/PLIST
+++ b/cannonball/PLIST
@@ -2,6 +2,8 @@
 bin/cannonball
 libexec/cannonball
 man/man6/cannonball.6
+share/applications/cannonball.desktop
 share/cannonball/conf/config.xml
 share/cannonball/res/tilemap.bin
 share/cannonball/res/tilepatch.bin
+share/icons/hicolor/16x16/apps/cannonball.png
diff --git a/cannonball/files/cannonball.desktop b/cannonball/files/cannonball.desktop
new file mode 100644
index 0000000000..7c7db6f1fb
--- /dev/null
+++ b/cannonball/files/cannonball.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=CannonBall
+Comment=CannonBall: The Enhanced OutRun Engine.
+Exec=cannonball %f
+Icon=cannonball
+Terminal=false
+Type=Application
+Categories=Game;ArcadeGame;Emulator


Home | Main Index | Thread Index | Old Index