Install .desktop file and icons. Icon bits and patch from kirby@.

While there, remove unneeded WRKDIST variable and do some minor
reformatting.

OK landry@ (previous version), kirby@
This commit is contained in:
fcambus 2017-05-06 13:45:49 +00:00
parent 8adc59652f
commit 1eedcbbff8
3 changed files with 37 additions and 6 deletions

View File

@ -1,10 +1,11 @@
# $OpenBSD: Makefile,v 1.9 2016/01/06 20:02:19 jasper Exp $
# $OpenBSD: Makefile,v 1.10 2017/05/06 13:45:49 fcambus Exp $
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,9 @@ PERMIT_PACKAGE_CDROM = Yes
WANTLIB += Imlib2 exif gif X11 c
RUN_DEPENDS = devel/desktop-file-utils \
x11/gtk+3,-guic
LIB_DEPENDS = graphics/imlib2 \
graphics/libexif
@ -24,6 +28,9 @@ MAKE_FLAGS = CC=${CC} MANPREFIX=${PREFIX}/man \
NO_TEST = Yes
WRKDIST= ${WRKDIR}/${PKGNAME}
post-install:
cd ${WRKSRC}/icon && make install
${INSTALL_DATA_DIR} ${PREFIX}/share/applications
${INSTALL_DATA} ${WRKSRC}/sxiv.desktop ${PREFIX}/share/applications
.include <bsd.port.mk>

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-icon_Makefile,v 1.1 2017/05/06 13:45:49 fcambus Exp $
Index: icon/Makefile
--- icon/Makefile.orig
+++ icon/Makefile
@@ -5,7 +5,7 @@ all:
install:
for f in $(ICONS); do \
- dir="$(DESTDIR)$(PREFIX)/share/icons/hicolor/$${f%.png}/apps"; \
+ dir="$(PREFIX)/share/icons/hicolor/$${f%.png}/apps"; \
mkdir -p "$$dir"; \
cp "$$f" "$$dir/sxiv.png"; \
chmod 644 "$$dir/sxiv.png"; \

View File

@ -1,6 +1,16 @@
@comment $OpenBSD: PLIST,v 1.3 2015/04/16 10:27:26 jung Exp $
@comment $OpenBSD: PLIST,v 1.4 2017/05/06 13:45:49 fcambus 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
share/icons/hicolor/128x128/apps/sxiv.png
share/icons/hicolor/16x16/apps/sxiv.png
share/icons/hicolor/32x32/apps/sxiv.png
share/icons/hicolor/48x48/apps/sxiv.png
share/icons/hicolor/64x64/apps/sxiv.png
@exec %D/bin/update-desktop-database
@unexec-delete %D/bin/update-desktop-database
@exec %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor
@unexec-delete %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor