Hi ports@,
Here is a diff to install the .desktop file. This allows using sxiv with
xdg-open.
While there, remove unneeded WRKDIST variable and do some minor
reformatting.
Comments? OK?
Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/sxiv/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- Makefile 6 Jan 2016 20:02:19 -0000 1.9
+++ Makefile 28 Apr 2017 07:42:01 -0000
@@ -2,9 +2,10 @@
COMMENT = simple (or small or suckless) X Image Viewer
-GH_PROJECT= sxiv
-GH_ACCOUNT= muennich
-GH_TAGNAME= v1.3.2
+GH_PROJECT = sxiv
+GH_ACCOUNT = muennich
+GH_TAGNAME = v1.3.2
+REVISION = 0
CATEGORIES = graphics x11
@@ -15,6 +16,8 @@ PERMIT_PACKAGE_CDROM = Yes
WANTLIB += Imlib2 exif gif X11 c
+RUN_DEPENDS = devel/desktop-file-utils
+
LIB_DEPENDS = graphics/imlib2 \
graphics/libexif
@@ -24,6 +27,8 @@ MAKE_FLAGS = CC=${CC} MANPREFIX=${PREFIX
NO_TEST = Yes
-WRKDIST= ${WRKDIR}/${PKGNAME}
+post-install:
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/applications
+ ${INSTALL_DATA} ${WRKSRC}/sxiv.desktop ${PREFIX}/share/applications
.include <bsd.port.mk>
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/graphics/sxiv/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST 16 Apr 2015 10:27:26 -0000 1.3
+++ pkg/PLIST 28 Apr 2017 07:42:01 -0000
@@ -1,6 +1,9 @@
@comment $OpenBSD: PLIST,v 1.3 2015/04/16 10:27:26 jung Exp $
@bin bin/sxiv
@man man/man1/sxiv.1
+share/applications/sxiv.desktop
share/examples/sxiv/
share/examples/sxiv/image-info
share/examples/sxiv/key-handler
+@exec %D/bin/update-desktop-database
+@unexec-delete %D/bin/update-desktop-database