summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcr/kiwix-git/0001-remove-static-makefile.patch11
-rw-r--r--pcr/kiwix-git/0002-fix-python2-path.patch16
-rw-r--r--pcr/kiwix-git/0003-fix-nspr-include-path.patch12
-rw-r--r--pcr/kiwix-git/PKGBUILD56
-rw-r--r--pcr/kiwix-git/kiwix.desktop10
-rw-r--r--pcr/kiwix-git/kiwix.install7
6 files changed, 112 insertions, 0 deletions
diff --git a/pcr/kiwix-git/0001-remove-static-makefile.patch b/pcr/kiwix-git/0001-remove-static-makefile.patch
new file mode 100644
index 000000000..081935817
--- /dev/null
+++ b/pcr/kiwix-git/0001-remove-static-makefile.patch
@@ -0,0 +1,11 @@
+diff -Nur kiwix-0.9.orig/configure.ac kiwix-0.9/configure.ac
+--- kiwix-0.9.orig/configure.ac 2014-10-29 20:55:35.000000000 -0200
++++ kiwix-0.9/configure.ac 2016-01-18 17:52:58.488836188 -0300
+@@ -1866,7 +1866,6 @@
+ desktop/32x32/Makefile
+ desktop/48x48/Makefile
+ desktop/256x256/Makefile
+- static/Makefile
+ etc/Makefile
+ ])
+
diff --git a/pcr/kiwix-git/0002-fix-python2-path.patch b/pcr/kiwix-git/0002-fix-python2-path.patch
new file mode 100644
index 000000000..947dcf042
--- /dev/null
+++ b/pcr/kiwix-git/0002-fix-python2-path.patch
@@ -0,0 +1,16 @@
+diff -Nur kiwix-0.9.orig/configure.ac kiwix-0.9/configure.ac
+--- kiwix-0.9.orig/configure.ac 2014-10-29 20:55:35.000000000 -0200
++++ kiwix-0.9/configure.ac 2016-01-18 18:25:25.287664496 -0300
+@@ -831,10 +831,10 @@
+ else
+ # SDK 0.9 and further do not have an xpidl binary anymore
+ # This is replace by the python script typelib.py and header.py
+- AC_PATH_PROG([PYTHON], "python")
++ AC_PATH_PROG([PYTHON], "python2")
+ if test [ ! "$PYTHON" ]
+ then
+- AC_MSG_ERROR([[cannot find python]])
++ AC_MSG_ERROR([[cannot find python2]])
+ fi
+
+ if test [ ! -f "$XPIDL_PATH/header.py" -o ! -f "$XPIDL_PATH/typelib.py" ]
diff --git a/pcr/kiwix-git/0003-fix-nspr-include-path.patch b/pcr/kiwix-git/0003-fix-nspr-include-path.patch
new file mode 100644
index 000000000..4941c77dc
--- /dev/null
+++ b/pcr/kiwix-git/0003-fix-nspr-include-path.patch
@@ -0,0 +1,12 @@
+diff -Nur kiwix-0.9.orig/configure.ac kiwix-0.9/configure.ac
+--- kiwix-0.9.orig/configure.ac 2014-10-29 20:55:35.000000000 -0200
++++ kiwix-0.9/configure.ac 2016-01-18 19:11:38.275882125 -0300
+@@ -805,7 +805,7 @@
+ AM_CONDITIONAL([GECKO_OLD_BOOL_TYPE], [test "$GECKO_OLD_BOOL_TYPE"])
+ AM_CONDITIONAL([GECKO_OLD_INT_TYPE], [test "$GECKO_OLD_INT_TYPE"])
+
+-LIBXUL_CFLAGS="-I${GECKO_SDK_INCLUDE} -I${GECKO_INCLUDE_PATH} -I${GECKO_INCLUDE_PATH}/nspr/ -I/usr/include/nspr4 -fshort-wchar"
++LIBXUL_CFLAGS="-I${GECKO_SDK_INCLUDE} -I${GECKO_INCLUDE_PATH} -I${GECKO_INCLUDE_PATH}/nspr/ -I/usr/include/nspr -fshort-wchar"
+ if test [ $IS_OSX -eq 0 ]; then
+ LIBXUL_CFLAGS+=" -D__STDC_LIMIT_MACROS"
+ fi
diff --git a/pcr/kiwix-git/PKGBUILD b/pcr/kiwix-git/PKGBUILD
new file mode 100644
index 000000000..ea242122f
--- /dev/null
+++ b/pcr/kiwix-git/PKGBUILD
@@ -0,0 +1,56 @@
+# Maintainer: André Silva <emulatorman@parabola.nu>
+
+_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
+}
diff --git a/pcr/kiwix-git/kiwix.desktop b/pcr/kiwix-git/kiwix.desktop
new file mode 100644
index 000000000..3f00cc023
--- /dev/null
+++ b/pcr/kiwix-git/kiwix.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Kiwix
+GenericName=Offline reader for Web content
+Comment=It's especially intended to make Wikipedia available offline.
+Exec=kiwix
+Icon=kiwix
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=Education;
diff --git a/pcr/kiwix-git/kiwix.install b/pcr/kiwix-git/kiwix.install
new file mode 100644
index 000000000..08b2eaca1
--- /dev/null
+++ b/pcr/kiwix-git/kiwix.install
@@ -0,0 +1,7 @@
+post_remove() {
+ echo
+ echo " WARNING:"
+ echo "You may have huge files under the ~/.www.kiwix.org folder (e.g. the wikipedia)."
+ echo "Please consider if you want to leave them there."
+ echo
+ }