# $Id: PKGBUILD 162204 2012-06-23 13:26:36Z andyrtr $ # Maintainer: Tobias Powalowski #Contributed: eliott , Andre Naumann pkgname=nxclient pkgver=3.5.0.7 pkgrel=3 pkgdesc="Nomachine's closed source client for NX servers" arch=('i686' 'x86_64') url="http://nomachine.com" license=('custom:nomachine') depends=('libxext' 'libxft' 'xorg-xauth' 'libxcomp' 'nx-common>=3.5.0-4.1' 'desktop-file-utils') makedepends=('rpmextract' 'chrpath') optdepends=('cups: for printing support') [ "$CARCH" = "x86_64" ] && source=(http://64.34.161.181/download/3.5.0/Linux/$pkgname-3.5.0-7.x86_64.rpm nomachine.key nxclient.wrapper) [ "$CARCH" = "x86_64" ] && md5sums=('0648c2e36a14d5810e26d7d640d8382f' 'cb5df74aff5160eab9cd4313019ae228' '13c9841df2ff943c8c35ce8fdb04ac44') [ "$CARCH" = "i686" ] && source=(http://64.34.161.181/download/3.5.0/Linux/$pkgname-3.5.0-7.i386.rpm nomachine.key nxclient.wrapper) [ "$CARCH" = "i686" ] && md5sums=('53e5b9b4a1096324e7d3dbd8ffb192a1' 'cb5df74aff5160eab9cd4313019ae228' '13c9841df2ff943c8c35ce8fdb04ac44') install=nxclient.install build() { cd ${srcdir} rpmextract.sh *.rpm sed -i -e 's:/usr/NX:/usr/lib/nx:g' etc/profile.d/nx.* sed -i -e 's:/usr/NX:/usr/lib/nx:g' ${srcdir}/usr/NX/share/applnk/network/*.desktop } package() { # profile files install -D -m 755 ${srcdir}/etc/profile.d/nx.sh ${pkgdir}/etc/profile.d/nx.sh install -D -m 755 ${srcdir}/etc/profile.d/nx.csh ${pkgdir}/etc/profile.d/nx.csh # menu entries install -D -m 644 ${srcdir}/usr/NX/share/applnk/network/nxclient-wizard.desktop ${pkgdir}/usr/share/applications/nxclient-wizard.desktop install -D -m 644 ${srcdir}/usr/NX/share/applnk/network/nxclient.desktop ${pkgdir}/usr/share/applications/nxclient.desktop install -D -m 644 ${srcdir}/usr/NX/share/applnk/network/nxclient-admin.desktop ${pkgdir}/usr/share/applications/nxclient-admin.desktop rm -r ${srcdir}/usr/NX/share/applnk # remove libs that come in system and are provided by libxcomp/nx-x11 rm ${srcdir}/usr/NX/lib/{libXcomp.*,libXcompsh.*,libcrypto.*,libjpeg.*,libz.*} # provided by nx-common rm ${srcdir}/usr/NX/bin/nxssh rm ${srcdir}/usr/NX/bin/nxesd # esd support has been fully dropped # provide default key file later rm ${srcdir}/usr/NX/share/keys/server.id_dsa.key # move files install -dm755 ${pkgdir}/usr/{bin,lib/nx} cp -aR ${srcdir}/usr/NX/* ${pkgdir}/usr/lib/nx # add symlinks cd ${pkgdir}/usr/bin ln -sv /usr/lib/nx/bin/{nxclient,nxkill,nxprint,nxservice} . # install wrapper including Linker fix mv ${pkgdir}/usr/lib/nx/bin/nxclient ${pkgdir}/usr/lib/nx/bin/nxclient_orig install -m 755 ${srcdir}/nxclient.wrapper ${pkgdir}/usr/lib/nx/bin/nxclient # add default key file install -D -m 644 ${srcdir}/nomachine.key ${pkgdir}/usr/lib/nx/share/keys/server.id_dsa.key # add license file mkdir -p ${pkgdir}/usr/share/licenses/nxclient mv ${pkgdir}/usr/lib/nx/share/documents/client/license-info ${pkgdir}/usr/share/licenses/nxclient/LICENSE # some cleanup rm -rf ${pkgdir}/usr/lib/nx/share/{documents,cups} # fix insecure rpath chrpath -d "$pkgdir/usr/lib/nx/bin/nxclient_orig" }