aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PKGBUILD16
-rw-r--r--utopia-documents.bash2
-rw-r--r--utopia-documents.sh13
-rw-r--r--utopia-documents.zsh2
4 files changed, 31 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 968490b52f1a..ed20a357ae31 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,9 +13,16 @@ provides=('utopia-documents3')
conflicts=('utopia-documents')
depends=(libqglviewer pcre qt5-svg qt5-webkit qt5-script poppler-qt5 python2-pyqt5)
makedepends=(cmake boost swig glew)
-source=("http://utopiadocs.com/files/utopia-documents-${pkgver}.tgz" "configure.patch")
+source=("http://utopiadocs.com/files/utopia-documents-${pkgver}.tgz"
+ "configure.patch"
+ "utopia-documents.sh"
+ "utopia-documents.bash"
+ "utopia-documents.zsh")
sha256sums=('1c259b68fada7f98080a66a63e36c707b78bfc3a5c80a956568ee73c030c8cac'
- '808a26f259768507e864d729191b8dd85a6472f43d9c1f507dd775dd1eaedcc2')
+ '808a26f259768507e864d729191b8dd85a6472f43d9c1f507dd775dd1eaedcc2'
+ '9e4c9f9aee0b3bfa9625989f3de4de5032f7b656b5f6f050d206d1541e30d41a'
+ '64524d3a3be66f403db44ef40772717aff38445e0e4208c15ac166fe2fcfad0a'
+ '64524d3a3be66f403db44ef40772717aff38445e0e4208c15ac166fe2fcfad0a')
prepare() {
PATCH="configure.patch"
@@ -39,6 +46,11 @@ build() {
}
package() {
+ mkdir ${pkgdir}/etc/profile.d/ -p
+ install utopia-documents.bash --target-directory=${pkgdir}/etc/profile.d/
+ install utopia-documents.sh --target-directory=${pkgdir}/etc/profile.d/
+ install utopia-documents.zsh --target-directory=${pkgdir}/etc/profile.d/
+
cd utopia-documents-$pkgver/build/Linux-Release
make install
}
diff --git a/utopia-documents.bash b/utopia-documents.bash
new file mode 100644
index 000000000000..5f4ae52a2adc
--- /dev/null
+++ b/utopia-documents.bash
@@ -0,0 +1,2 @@
+
+export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/utopia-documents/lib/:/usr/lib/utopia-documents/python/:/usr/lib/utopia-documents/plugins/"
diff --git a/utopia-documents.sh b/utopia-documents.sh
new file mode 100644
index 000000000000..4ca9352ec91e
--- /dev/null
+++ b/utopia-documents.sh
@@ -0,0 +1,13 @@
+# By Jinxuan Zhu, <zhujinxuan@gmail.com>, Snow @ AUR
+# Based on autojump.sh
+
+shell=`echo ${SHELL} | awk -F/ '{ print $NF }'`
+
+# prevent circular loop for sh shells
+if [ "${shell}" = "sh" ] ; then
+ return 0
+elif [ -s ~/.utopia-documents/etc/profile.d/utopia-documents.${shell} ]; then
+ source ~/.utopia-documents/etc/profile.d/utopia-documents.${shell}
+elif [ -s /etc/profile.d/utopia-documents.${shell} ]; then
+ source /etc/profile.d/utopia-documents.${shell}
+fi
diff --git a/utopia-documents.zsh b/utopia-documents.zsh
new file mode 100644
index 000000000000..5f4ae52a2adc
--- /dev/null
+++ b/utopia-documents.zsh
@@ -0,0 +1,2 @@
+
+export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/utopia-documents/lib/:/usr/lib/utopia-documents/python/:/usr/lib/utopia-documents/plugins/"