summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 080a1b117ab87dca228d9ec7a6d76d24f63f8f42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Maintainer: Simon Legner <Simon.Legner@gmail.com>
# Contributor: bartus <arch-user-repoᘓbartus.33mail.com>
# Contributor: Rafael Fontenelle <rafaelff@gnome.org>
pkgname=odadrawingsexplorer
_pkgname=ODADrawingsExplorer
pkgver=21.11.0.0
_pkgver=${pkgver/.0.0/}
pkgrel=1
pkgdesc="Application for the visualization of CAD drawing files (supersedes Teigha Viewer)"
arch=('x86_64')
url="https://www.opendesign.com/guestfiles/oda_drawings_explorer"
license=('custom')
depends=('qt5-base' 'libxfixes' 'libgl' 'libxkbcommon-x11' 'bash' 'hicolor-icon-theme')
replaces=('teighaviewer-qt5')
source=("https://download.opendesign.com/guestfiles/Demo/${_pkgname}_QT5_lnxX64_7.2dll_${_pkgver}.deb")
sha256sums=('0e6ca0794049e8947e1d9c7bd5a723876e82c1c09728aeb51b3ae1249c227245')

prepare() {
  rm -rf ${pkgname}-${pkgver}
  mkdir ${pkgname}-${pkgver}
  tar xf data.tar.xz -C ${pkgname}-${pkgver}
}

package() {
  cd ${pkgname}-${pkgver}

  # libs
  for file in $(ls "usr/bin/${_pkgname}_${pkgver}/"); do
    install -Dm755 "usr/bin/${_pkgname}_${pkgver}/${file}" "${pkgdir}/usr/lib/${pkgname}/${file}"
  done

  # binary
  install -Dm755 "usr/bin/$_pkgname" "${pkgdir}/usr/bin/${pkgname}"
  sed -e "s#usr/bin/${_pkgname}_${pkgver}#usr/lib/${pkgname}#" -i "${pkgdir}/usr/bin/${pkgname}"

  # desktop item
  install -Dm644 usr/share/applications/${_pkgname}_${pkgver}.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop"
  sed -e "s#/$_pkgname#/${pkgname}#" -i "${pkgdir}/usr/share/applications/${pkgname}.desktop"

  # hicolor icons
  for icon in $(find usr/share/icons -type f); do
    install -Dm644 ${icon} "${pkgdir}/${icon}"
  done
}