Guest User

Untitled

a guest
May 15th, 2020
96
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Maintainer: Simon Legner <Simon.Legner@gmail.com>
  2. # Contributor: bartus <arch-user-repoᘓbartus.33mail.com>
  3. # Contributor: Rafael Fontenelle <rafaelff@gnome.org>
  4. pkgname=odadrawingsexplorer
  5. _pkgname=ODADrawingsExplorer
  6. pkgver=21.4.0.0
  7. pkgrel=1
  8. pkgdesc="Application for the visualization of CAD drawing files (supersedes Teigha Viewer)"
  9. arch=('x86_64')
  10. url="https://www.opendesign.com/guestfiles/oda_drawings_explorer"
  11. license=('custom')
  12. depends=('qt5-base' 'libxfixes' 'libgl' 'libxkbcommon-x11' 'bash' 'hicolor-icon-theme')
  13. replaces=('teighaviewer-qt5')
  14. source=("${pkgname}-x86_64-${pkgver}.deb::https://download.opendesign.com/guestfiles/${_pkgname}/${_pkgname}_QT5_lnxX64_7.2dll.deb")
  15. sha256sums=('0bb1ed89502624bde3dde9a890aa834a3e50f52b5760fbd973260773d960c179')
  16.  
  17. prepare() {
  18.   rm -rf ${pkgname}-${pkgver}
  19.   mkdir ${pkgname}-${pkgver}
  20.   tar xf data.tar.xz -C ${pkgname}-${pkgver}
  21. }
  22.  
  23. package() {
  24.   cd ${pkgname}-${pkgver}
  25.  
  26.   # libs
  27.   for file in $(ls "usr/bin/${_pkgname}_${pkgver}/"); do
  28.     install -Dm755 "usr/bin/${_pkgname}_${pkgver}/${file}" "${pkgdir}/usr/lib/${pkgname}/${file}"
  29.   done
  30.  
  31.   # binary
  32.   install -Dm755 "usr/bin/$_pkgname" "${pkgdir}/usr/bin/${pkgname}"
  33.   sed -e "s#usr/bin/${_pkgname}_${pkgver}#usr/lib/${pkgname}#" -i "${pkgdir}/usr/bin/${pkgname}"
  34.  
  35.   # desktop item
  36.   install -Dm644 usr/share/applications/${_pkgname}_${pkgver}.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop"
  37.   sed -e "s#/$_pkgname#/${pkgname}#" -i "${pkgdir}/usr/share/applications/${pkgname}.desktop"
  38.  
  39.   # hicolor icons
  40.   for icon in $(find usr/share/icons -type f); do
  41.     install -Dm644 ${icon} "${pkgdir}/${icon}"
  42.   done
  43. }
RAW Paste Data