summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD44
2 files changed, 65 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..fc842488dff2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = libzim8
+ pkgdesc = Reference implementation of the ZIM specification by the openZIM project.
+ pkgver = 8.2.1
+ pkgrel = 1
+ url = https://github.com/openzim/libzim
+ arch = x86_64
+ license = GPL2
+ makedepends = meson
+ makedepends = gtest
+ makedepends = git
+ depends = xapian-core
+ depends = zlib
+ depends = xz
+ depends = icu
+ depends = zstd
+ source = libzim-8.2.1.tar.gz::https://github.com/openzim/libzim/archive/8.2.1.tar.gz
+ source = git+https://github.com/openzim/zim-testing-suite#commit=31ffbefd6699384d80e1f584b69b4321c843bc0c
+ sha256sums = b8296644b04b02c04d2ff1458fed829df39b54e8fd1bcd23c10440e160819f13
+ sha256sums = SKIP
+
+pkgname = libzim8
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..76552e69b765
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Hoang Nguyen <toi at doclai dot com>
+
+_pkgname=libzim
+pkgname=$(echo "${_pkgname}8")
+pkgver=8.2.1
+pkgrel=1
+pkgdesc="Reference implementation of the ZIM specification by the openZIM project."
+_testing_suite_commit=31ffbefd6699384d80e1f584b69b4321c843bc0c
+arch=('x86_64')
+license=('GPL2')
+depends=('xapian-core' 'zlib' 'xz' 'icu' 'zstd')
+makedepends=('meson' 'gtest' 'git')
+url='https://github.com/openzim/libzim'
+source=("${_pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz"
+ "git+https://github.com/openzim/zim-testing-suite#commit=${_testing_suite_commit}")
+sha256sums=('b8296644b04b02c04d2ff1458fed829df39b54e8fd1bcd23c10440e160819f13'
+ 'SKIP')
+
+
+build() {
+ cd "${_pkgname}-${pkgver}"
+ # https://github.com/openzim/libzim/issues/757
+ arch-meson build \
+ -Dtest_data_dir="${srcdir}/zim-testing-suite/data" \
+ -Dcpp_std=c++14
+ ninja -C build
+}
+
+check() {
+ cd "${_pkgname}-${pkgver}/build"
+ SKIP_BIG_MEMORY_TEST=1 meson test
+}
+
+package() {
+ install -Dm644 "${_pkgname}-${pkgver}/COPYING" "$pkgdir/usr/share/licenses/$_pkgname/COPYING"
+ cd "${_pkgname}-${pkgver}/build"
+ DESTDIR="${pkgdir}" ninja install
+ cd ${pkgdir}
+ rm -r "$pkgdir/usr/share"
+ rm -r "$pkgdir/usr/include"
+ rm -r "$pkgdir/usr/lib/libzim.so"
+ rm -r "$pkgdir/usr/lib/pkgconfig"
+}
+