summaryrefslogtreecommitdiff
path: root/pcr/kiwix-git/PKGBUILD
blob: 9f9b21f09e0a7c38d38300bbd14a1145171f9f35 (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
54
55
56
# Maintainer: André Silva <emulatorman@hyperbola.info>

_pkgname=kiwix
pkgname=kiwix-git
pkgver=r4591.785a7f1
_gitver=785a7f156f4bf46b447f3a2ae8ba749fc3a5008a
pkgrel=1
pkgdesc="Offline reader for Web content. It's especially intended to make Wikipedia available offline"
arch=('i686' 'x86_64' 'armv7h')
url="http://www.kiwix.org/"
license=('GPL3')
depends=('rpcbind' 'gtk2' 'alsa-lib' 'libxt' 'libcanberra' 'sqlite3' 'java-environment')
makedepends=('cmake' 'zip' 'xapian-core' 'icu' 'libmicrohttpd' 'zimlib' 'pugixml'
             'ctpp2' 'aria2' 'bc' 'wget' 'xulrunner' 'git')
conflicts=(kiwix-bin kiwix)
install=kiwix.install
source=(kiwix-$pkgver::git+https://github.com/kiwix/kiwix_mirror.git#commit=$_gitver
        kiwix.desktop
        0001-remove-static-makefile.patch
        0002-fix-python2-path.patch
        0003-fix-nspr-include-path.patch)
sha256sums=('SKIP'
            '3790697dc5d4c7c45c0f4b24e8c0d1129446c13e300bb60934eb8a743b9176c5'
            '7dba1e10bd5cd49c771534a83c6591d22444edae21a719634876e99c943cc245'
            '228385a1508b7a380b87717fbb877700b5ad0bad1e327a83e32f4bea2ee71824'
            'd3696513bef5506bc397bfbd7870e259a3c88870b682b0052aed5c29b2fa5f75')
pkgver() {
  cd $_pkgname-$pkgver
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd $_pkgname-$pkgver
  patch -Np1 -i ../0001-remove-static-makefile.patch
  patch -Np1 -i ../0002-fix-python2-path.patch
  patch -Np1 -i ../0003-fix-nspr-include-path.patch
}

build() {
  cd $_pkgname-$pkgver
  ./autogen.sh
  ./configure --prefix=/usr \
              --sysconfdir=/etc \
              --enable-indexer \
              --enable-installer \
              --enable-manager \
              --enable-server \
              --enable-jar
  make
}

package() {
  cd $_pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  install -D -m644 $srcdir/$_pkgname.desktop $pkgdir/usr/share/applications/$_pkgname.desktop
}