summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ce8cc8fd05d13b2cdc5290adafda8342a085473f (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
45
46
47
48
49
50
51
52
53
# Maintainer: Simon <simon dot hanna at serve-me dot info>
# Contributor: Garrett <floft.net/contact>

pkgname=openlp
pkgver=2.4.6
pkgrel=5
pkgdesc="Church presentation software."
arch=('any')
url='http://openlp.org/'
license=('GPLv2')
makedepends=('qt5-tools')
depends=('python>=3.9' 'python<3.10' 'python-pyqt5' 'phonon-qt5'
         'python-chardet' 'python-lxml'
         'python-beautifulsoup4' 'python-pyenchant'
         'python-alembic' 'qt5-multimedia' 'qt5-webkit')

optdepends=('libreoffice-fresh: Display impress presentations'
            'vlc: Play multimedia'
            'mupdf: Display pdfs'
            'python-mysql-connector: Use a mysql/mariadb database'
            'python-psycopg2: Use a postgresql database')
install=openlp.install
source=("https://get.openlp.org/${pkgver}/OpenLP-${pkgver}.tar.gz" "openlp.sh")
sha256sums=('f63dcf5f1f8a8199bf55e806b44066ad920d26c9cf67ae432eb8cdd1e761fc30'
            '19c2f3c622585bf308efc259013fb5518feaf8cf14b51613e1e71778fcc2e8cf')

package() {
  cd "${srcdir}/OpenLP-$pkgver"
  python setup.py install --root="${pkgdir}/" --optimize=1
  mv "${pkgdir}/usr/bin/openlp"{.py,}

  #remove tests
  rm -rf "${pkgdir}/usr/lib/python3.9/site-packages/tests"

  echo "${pkgver}" > "${pkgdir}/usr/lib/python3.9/site-packages/openlp/.version"

  install -Dm0755 "${srcdir}/openlp.sh" "${pkgdir}/etc/profile.d/openlp.sh"
  install -Dm0644 "resources/openlp.desktop" "${pkgdir}/usr/share/applications/openlp.desktop"
  install -Dm0644 "resources/images/openlp-logo.svg" "${pkgdir}/usr/share/pixmaps/openlp.svg"
  install -Dm0644 "resources/images/openlp-logo-48x48.png" "${pkgdir}/usr/share/pixmaps/openlp.png"

  #translations
  tsrcdir="${srcdir}/OpenLP-$pkgver/resources/i18n"
  tdestdir="${pkgdir}/usr/share/$pkgname/i18n"
  mkdir -p "${tdestdir}"
  cd "${tsrcdir}"
  
  for file in *.ts; do
    lconvert -i "${file}" -o "${tdestdir}/${file%%ts}qm"
  done
}

# vim:set ts=2 sw=2 et: