Use upstream-provided Makefile instead of regenerating it with qmake

use post-patch instead of do-configure and post-install instead of
do-install, allowing us  while here to install the desktop file and
icons for proper desktop integration.

ok rsadowski@ (MAINTAINER)
This commit is contained in:
landry 2020-12-27 17:01:44 +00:00
parent 7d13de3fc5
commit 6ba48060b6
3 changed files with 46 additions and 13 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.14 2020/03/19 19:51:09 rsadowski Exp $
# $OpenBSD: Makefile,v 1.15 2020/12/27 17:01:44 landry Exp $
COMMENT = Qt client for the X2Go system
DISTNAME = x2goclient-4.1.2.2
REVISION = 0
CATEGORIES = x11
@ -28,12 +29,14 @@ LIB_DEPENDS = databases/openldap \
RUN_DEPENDS = x11/nx/nxcomp \
x11/nx/nxproxy \
x11/gtk+3,-guic \
devel/desktop-file-utils \
shells/bash
DOCSDIR = ${PREFIX}/share/doc/x2goclient
EXAMPLESDIR = ${PREFIX}/share/examples/x2goclient
MAKE_ENV = CURDIR=${WRKSRC}
do-configure:
post-patch:
find ${WRKSRC} -type f -iname "*.cpp" -exec \
perl -pi -e 's,Q_OS_LINUX,Q_OS_UNIX,g;' \
-e 's,#include <linux/fs.h>,,g;' {} \;
@ -42,14 +45,8 @@ do-configure:
-e 's,#include <linux/fs.h>,,g;' {} \;
sed -i -e 's,nxproxy -S nx,${LOCALBASE}/NX/bin/nxproxy -S nx,' \
${WRKSRC}/src/onmainwindow.cpp
cd ${WRKSRC} && ${MODQT_LRELEASE} x2goclient.pro \
&& ${MODQT_QMAKE} x2goclient.pro
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/x2goclient ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/man/man1/x2goclient.1 ${PREFIX}/man/man1
${INSTALL_DATA_DIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/LICENSE ${DOCSDIR}
post-install:
${INSTALL_DATA_DIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/examples/x2goclient-cli ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/HOWTO.GPGCARD ${EXAMPLESDIR}

View File

@ -0,0 +1,26 @@
$OpenBSD: patch-Makefile,v 1.1 2020/12/27 17:01:44 landry Exp $
Index: Makefile
--- Makefile.orig
+++ Makefile
@@ -19,9 +19,9 @@ PREFIX=/usr/local
ETCDIR=/etc/x2go
BINDIR=$(PREFIX)/bin
SHAREDIR=$(PREFIX)/share
-MANDIR=$(SHAREDIR)/man
-QMAKE_BINARY=qmake-qt4
-LRELEASE_BINARY=lrelease-qt4
+MANDIR=$(PREFIX)/man
+QMAKE_BINARY=qmake-qt5
+LRELEASE_BINARY=lrelease-qt5
QMAKE_OPTS=
LDFLAGS=
@@ -115,7 +115,6 @@ install_man:
$(INSTALL_DIR) $(DESTDIR)$(MANDIR)/
$(INSTALL_DIR) $(DESTDIR)$(MANDIR)/man1
$(INSTALL_FILE) man/man1/x2goclient.1 $(DESTDIR)$(MANDIR)/man1/x2goclient.1
- gzip -f $(DESTDIR)$(MANDIR)/man1/x2goclient.1
uninstall: uninstall_client uninstall_man

View File

@ -1,8 +1,18 @@
@comment $OpenBSD: PLIST,v 1.2 2018/06/26 16:56:50 rsadowski Exp $
@comment $OpenBSD: PLIST,v 1.3 2020/12/27 17:01:44 landry Exp $
@bin bin/x2goclient
@man man/man1/x2goclient.1
share/doc/x2goclient/
share/doc/x2goclient/LICENSE
share/applications/x2goclient.desktop
share/examples/x2goclient/
share/examples/x2goclient/HOWTO.GPGCARD
share/examples/x2goclient/x2goclient-cli
share/icons/hicolor/128x128/apps/x2goclient.png
share/icons/hicolor/16x16/apps/x2goclient.png
share/icons/hicolor/32x32/apps/x2goclient.png
share/icons/hicolor/64x64/apps/x2goclient.png
share/x2goclient/
share/x2goclient/icons/
share/x2goclient/icons/x2goclient.png
share/x2goclient/icons/x2goclient.xpm
share/x2goclient/icons/x2gosession.png
@tag update-desktop-database
@tag gtk-update-icon-cache %D/share/icons/hicolor