SHARE
TWEET

PKGBUILD for hdf-java

Scindix Aug 17th, 2016 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Maintainer  : Martin Wimpress <code@flexion.org>
  2. #Contributor : Nick Pope
  3. #Contributor : Bryce Nordgren  <bnordgren at gmail dot com>
  4.  
  5. pkgname=hdf-java
  6. _pkgname=HDFView
  7. pkgver=2.13.0
  8. pkgrel=1
  9. pkgdesc="Java interface to HDF 4 and 5; plus the HDFView application"
  10. arch=('i686' 'x86_64')
  11. url="http://www.hdfgroup.org/hdf-java-html/"
  12. license=('custom')
  13. depends=('java-runtime')
  14. optdepends=('hdf4: to work with hdf4 files',
  15.             'hdf5: to work with hdf5 files')
  16. options=(!strip)
  17. #source=("http://www.hdfgroup.org/ftp/HDF5/releases/HDF-JAVA/${pkgname}-${pkgver}/bin/${pkgname}-${pkgver}-linux.tar.gz"
  18. source=("http://www.hdfgroup.org/ftp/HDF5/hdf-java/current/bin/${_pkgname}-${pkgver}-centos6-x64.tar.gz"
  19.         license
  20.         HDFView
  21.         HDFView.desktop
  22.         HDFView.ico)
  23. md5sums=('8ad9c8eca89221078a58f70a999ae0b4'
  24.          'db0de6079dd881781768d05de29c50e0'
  25.          '19a7c18ec9673860e1a3fb3ee5716ee3'
  26.          '965c57f4c686cc145a7fa05679bc8335'
  27.          'b86542f80203ea9f93f447fa7c20d25a')
  28.  
  29. prepare() {
  30.     # Make extraction automatic
  31.     sed -i 's/interactive=TRUE/interactive=FALSE/' "${srcdir}/HDFView-${pkgver}-Linux.sh"
  32.     sed -i 's/cpack_skip_license=FALSE/cpack_skip_license=TRUE/' "${srcdir}/HDFView-${pkgver}-Linux.sh"
  33. }
  34.  
  35. build() {
  36.     cd "${srcdir}"
  37.     mv ./HDFView ./HDFView-moved-temporarily
  38.     ./HDFView-${pkgver}-Linux.sh
  39.     mv ./HDFView ./${_pkgname}-${pkgver}
  40.     mv ./HDFView-moved-temporarily ./HDFView
  41. }
  42.  
  43. package() {
  44.     # JARs
  45.     mkdir -p "${pkgdir}/usr/share/java/${pkgname}"
  46.     cp -r "${srcdir}/${_pkgname}-${pkgver}/${pkgver}/lib" "${pkgdir}/usr/share/java/${pkgname}"
  47.     find "${pkgdir}/usr/share/java/${pkgname}" -type 'f' -exec chmod 644 '{}' \;
  48.     find "${pkgdir}/usr/share/java/${pkgname}" -type 'd' -exec chmod 755 '{}' \;
  49.  
  50.     # Main script
  51.     mkdir -p "${pkgdir}/usr/bin"
  52.     sed "s:JAVABIN=${srcdir}/HDFView/${pkgver}/jre/bin:JAVABIN=/usr/bin:" "${srcdir}/${_pkgname}-${pkgver}/${pkgver}/hdfview.sh" > "${pkgdir}/usr/bin/hdf-java"
  53.     sed -i "s:INSTALLDIR=${srcdir}/HDFView/${pkgver}:INSTALLDIR=/usr/share/java/hdf-java:" "${pkgdir}/usr/bin/hdf-java"
  54.     chmod 755 "${pkgdir}/usr/bin/hdf-java"
  55.  
  56.     # Documentation
  57.     mkdir -p "${pkgdir}/usr/share/${pkgname}"
  58.     cp -r "${srcdir}/${_pkgname}-${pkgver}/${pkgver}/share/doc" "${pkgdir}/usr/share/${pkgname}/doc"
  59.     find "${pkgdir}/usr/share/${pkgname}/doc" -type 'f' -exec chmod 644 '{}' \;
  60.     find "${pkgdir}/usr/share/${pkgname}/doc" -type 'd' -exec chmod 755 '{}' \;
  61.  
  62.     # Desktop files, icons, wrappers and license
  63.     install -D -m 755 "${srcdir}/HDFView" "${pkgdir}/usr/bin/HDFView"
  64.     install -D -m 644 "${srcdir}/HDFView.desktop" "${pkgdir}/usr/share/applications/HDFView.desktop"
  65.     install -D -m 644 "${srcdir}/HDFView.ico" "${pkgdir}/usr/share/pixmaps/HDFView.ico"
  66.     install -D -m 644 "${srcdir}/license" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  67. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top