summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-01-18 20:54:53 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-01-18 21:05:37 -0300
commit368915cf94edf4274567e9615116d88dc9c1396e (patch)
treed167616ee46e7620f1bbfbf35cb33ce9e7900035 /pcr
parenta2153fc23092d3b54b8ce7e65cf356e4cf76a1e6 (diff)
kiwix: add new package to [pcr] -> https://labs.parabola.nu/issues/906
Diffstat (limited to 'pcr')
-rw-r--r--pcr/kiwix/0001-remove-static-makefile.patch31
-rw-r--r--pcr/kiwix/0002-fix-python2-path.patch16
-rw-r--r--pcr/kiwix/0003-fix-nspr-include-path.patch24
-rw-r--r--pcr/kiwix/PKGBUILD50
-rw-r--r--pcr/kiwix/kiwix.desktop10
-rw-r--r--pcr/kiwix/kiwix.install8
6 files changed, 139 insertions, 0 deletions
diff --git a/pcr/kiwix/0001-remove-static-makefile.patch b/pcr/kiwix/0001-remove-static-makefile.patch
new file mode 100644
index 000000000..1766981da
--- /dev/null
+++ b/pcr/kiwix/0001-remove-static-makefile.patch
@@ -0,0 +1,31 @@
+diff -Nur kiwix-0.9.orig/configure kiwix-0.9/configure
+--- kiwix-0.9.orig/configure 2014-10-29 20:55:40.000000000 -0200
++++ kiwix-0.9/configure 2016-01-18 17:54:03.155632588 -0300
+@@ -19641,7 +19641,7 @@
+
+
+ # Configure the output files
+-ac_config_files="$ac_config_files Makefile src/Makefile src/man/Makefile src/man/fr/Makefile src/dependencies/Makefile src/components/Makefile src/components/xapianAccessor/Makefile src/components/zimAccessor/Makefile src/components/zimXapianIndexer/Makefile src/components/contentManager/Makefile src/components/serverManager/Makefile src/launcher/Makefile src/server/Makefile src/manager/Makefile src/indexer/Makefile src/searcher/Makefile src/reader/Makefile src/installer/Makefile kiwix/Makefile kiwix/chrome/Makefile kiwix/defaults/Makefile kiwix/components/Makefile desktop/Makefile desktop/8x8/Makefile desktop/16x16/Makefile desktop/22x22/Makefile desktop/24x24/Makefile desktop/32x32/Makefile desktop/48x48/Makefile desktop/256x256/Makefile static/Makefile etc/Makefile"
++ac_config_files="$ac_config_files Makefile src/Makefile src/man/Makefile src/man/fr/Makefile src/dependencies/Makefile src/components/Makefile src/components/xapianAccessor/Makefile src/components/zimAccessor/Makefile src/components/zimXapianIndexer/Makefile src/components/contentManager/Makefile src/components/serverManager/Makefile src/launcher/Makefile src/server/Makefile src/manager/Makefile src/indexer/Makefile src/searcher/Makefile src/reader/Makefile src/installer/Makefile kiwix/Makefile kiwix/chrome/Makefile kiwix/defaults/Makefile kiwix/components/Makefile desktop/Makefile desktop/8x8/Makefile desktop/16x16/Makefile desktop/22x22/Makefile desktop/24x24/Makefile desktop/32x32/Makefile desktop/48x48/Makefile desktop/256x256/Makefile etc/Makefile"
+
+
+
+@@ -20921,7 +20921,6 @@
+ "desktop/32x32/Makefile") CONFIG_FILES="$CONFIG_FILES desktop/32x32/Makefile" ;;
+ "desktop/48x48/Makefile") CONFIG_FILES="$CONFIG_FILES desktop/48x48/Makefile" ;;
+ "desktop/256x256/Makefile") CONFIG_FILES="$CONFIG_FILES desktop/256x256/Makefile" ;;
+- "static/Makefile") CONFIG_FILES="$CONFIG_FILES static/Makefile" ;;
+ "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+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/0002-fix-python2-path.patch b/pcr/kiwix/0002-fix-python2-path.patch
new file mode 100644
index 000000000..947dcf042
--- /dev/null
+++ b/pcr/kiwix/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/0003-fix-nspr-include-path.patch b/pcr/kiwix/0003-fix-nspr-include-path.patch
new file mode 100644
index 000000000..674ebebe2
--- /dev/null
+++ b/pcr/kiwix/0003-fix-nspr-include-path.patch
@@ -0,0 +1,24 @@
+diff -Nur kiwix-0.9.orig/configure kiwix-0.9/configure
+--- kiwix-0.9.orig/configure 2014-10-29 20:55:40.000000000 -0200
++++ kiwix-0.9/configure 2016-01-18 19:11:30.799619838 -0300
+@@ -17217,7 +17217,7 @@
+ fi
+
+
+-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 -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/PKGBUILD b/pcr/kiwix/PKGBUILD
new file mode 100644
index 000000000..0dd6a23ab
--- /dev/null
+++ b/pcr/kiwix/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: André Silva <emulatorman@parabola.nu>
+
+pkgname=kiwix
+pkgver=0.9
+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=('zip' 'xapian-core' 'icu' 'libmicrohttpd' 'zimlib' 'pugixml'
+ 'ctpp2' 'aria2' 'bc' 'wget' 'xulrunner')
+#makedepends=('bc' 'wget')
+conflicts=(kiwix-bin)
+install=$pkgname.install
+source=("http://sourceforge.net/projects/kiwix/files/$pkgver/kiwix-$pkgver-src.tar.xz"
+ 'kiwix.desktop'
+ '0001-remove-static-makefile.patch'
+ '0002-fix-python2-path.patch'
+ '0003-fix-nspr-include-path.patch')
+sha256sums=('0cfb43cb1931856ce14bcc50f0fc675c82abe76ef449cc2e4b4559e121bce714'
+ '3790697dc5d4c7c45c0f4b24e8c0d1129446c13e300bb60934eb8a743b9176c5'
+ '849d85eda95c4306af641debaed27b3bdd34800b3a3fc9b1042290d7ba7635ec'
+ '228385a1508b7a380b87717fbb877700b5ad0bad1e327a83e32f4bea2ee71824'
+ '20db0911f4564f72edce1435912292be0f3f197c13612e60fc127ecf0cfc429d')
+
+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
+}
diff --git a/pcr/kiwix/kiwix.desktop b/pcr/kiwix/kiwix.desktop
new file mode 100644
index 000000000..3f00cc023
--- /dev/null
+++ b/pcr/kiwix/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/kiwix.install b/pcr/kiwix/kiwix.install
new file mode 100644
index 000000000..22833ce54
--- /dev/null
+++ b/pcr/kiwix/kiwix.install
@@ -0,0 +1,8 @@
+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
+ }
+