[arch-commits] Commit in nxclient/trunk (PKGBUILD nxclient.install)

andyrtr at archlinux.org andyrtr at archlinux.org
Sun Apr 15 12:22:43 EDT 2012


    Date: Sunday, April 15, 2012 @ 12:22:43
  Author: andyrtr
Revision: 156198

upgpkg: nxclient 3.5.0.7-1.1

mv files to /usr

Modified:
  nxclient/trunk/PKGBUILD
  nxclient/trunk/nxclient.install

------------------+
 PKGBUILD         |   51 +++++++++++++++++++++++++++++++--------------------
 nxclient.install |   26 ++++++++++++++++++++------
 2 files changed, 51 insertions(+), 26 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-04-15 16:00:02 UTC (rev 156197)
+++ PKGBUILD	2012-04-15 16:22:43 UTC (rev 156198)
@@ -4,13 +4,13 @@
 
 pkgname=nxclient
 pkgver=3.5.0.7
-pkgrel=1
+pkgrel=1.1
 pkgdesc="Nomachine's closed source client for NX servers"
-arch=(i686 x86_64)
+arch=('i686' 'x86_64')
 url="http://nomachine.com"
-makedepends=('rpmextract')
 license=('custom:nomachine')
-depends=('nx-common>=3.5.0' 'libxext' 'libxft' 'xorg-xauth')
+depends=('libxext' 'libxft' 'xorg-xauth' 'libxcomp' 'nx-x11' '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)
 [ "$CARCH" = "x86_64" ] && md5sums=('0648c2e36a14d5810e26d7d640d8382f' 'cb5df74aff5160eab9cd4313019ae228')
@@ -21,41 +21,52 @@
 build() {
   cd ${srcdir}/
   rpmextract.sh *.rpm
-  sed -i -e 's,/usr/NX,/opt/NX,g' etc/profile.d/nx.sh etc/profile.d/nx.csh
-  sed -i -e 's,/usr/NX/,/opt/NX/,g' ${srcdir}/usr/NX/share/applnk/network/*.desktop
+  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() {
-  mkdir -p ${pkgdir}/opt
-  cd ${srcdir}/usr
+  # 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 nx-common
+  # remove libs that come in system and are provided by libxcomp/nx-x11
   rm ${srcdir}/usr/NX/lib/{libXcomp.*,libXcompsh.*,libcrypto.*,libjpeg.*,libz.*}
-  ### HACK: fix libpng linking until nomachine fixes upstream! - shouldn't be needed, why not /opt/NX/lib ?
-  mkdir -p ${pkgdir}/usr/NX/lib/
-  cp -a NX/lib/libpng* ${pkgdir}/usr/NX/lib/
-  rm -r NX/lib
 
   # provided by nx-common
-  rm NX/bin/nxssh 
-  rm NX/bin/nxesd # esd support has been fully dropped
+  rm ${srcdir}/usr/NX/bin/nxssh 
+  rm ${srcdir}/usr/NX/bin/nxesd # esd support has been fully dropped
  
   # provide default key file later
-  rm NX/share/keys/server.id_dsa.key
+  rm ${srcdir}/usr/NX/share/keys/server.id_dsa.key
 
-  # move files to /opt
-  cp -a NX ${pkgdir}/opt
+  # move files
+  install -dm755 ${pkgdir}/usr/{bin,lib}
+  cp -aR ${srcdir}/usr/NX ${pkgdir}/usr/lib
+  # add symlinks
+  cd ${pkgdir}/usr/bin
+  ln -sv /usr/lib/NX/bin/{nxclient,nxkill,nxprint,nxservice} .
 
+  # move libs into proper ld.conf.so place provided by nx-x11
+  install -dm 755 ${pkgdir}/usr/lib/nx
+  cp -aR ${pkgdir}/usr/lib/NX/lib* ${pkgdir}/usr/lib/nx
+  rm -rf ${pkgdir}/usr/lib/NX/lib*
+
   # add default key file
-  install -D -m 644 ${srcdir}/nomachine.key ${pkgdir}/opt/NX/share/keys/server.id_dsa.key
+  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}/opt/NX/share/documents/client/license-info ${pkgdir}/usr/share/licenses/nxclient/LICENSE
+  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"
 }

Modified: nxclient.install
===================================================================
--- nxclient.install	2012-04-15 16:00:02 UTC (rev 156197)
+++ nxclient.install	2012-04-15 16:22:43 UTC (rev 156198)
@@ -1,8 +1,22 @@
-# arg 1:  the new package version
 post_install() {
-/bin/cat <<THEEND
-ATTENTION NXCLIENT:
-For correct setup please take a look at the wiki:
-http://wiki.archlinux.org/index.php/FreeNX
-THEEND
+  update-desktop-database -q
+  
+  echo "For correct setup please take a look at the wiki:"
+  echo "http://wiki.archlinux.org/index.php/FreeNX"
+  
+  
 }
+
+post_upgrade() {
+  update-desktop-database -q
+  
+  if [ "`vercmp $2 3.5.0.7-1`" -lt 0 ]; then
+    # important upgrade notice
+    echo "because file location of the default key has been moved"
+    echo "you may need to reconfigure your connection and settings"
+  fi
+}
+
+post_remove() {
+  update-desktop-database -q
+}



More information about the arch-commits mailing list