summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorijan Hamzic2018-05-18 12:43:50 +0200
committerFlorijan Hamzic2018-05-18 12:43:50 +0200
commit24a176389a51ec685a0e607f1c910266968f03ab (patch)
treea4dff529a2ebc8f6bab35bc1ac8a108c1d72dabb
downloadaur-24a176389a51ec685a0e607f1c910266968f03ab.tar.gz
initial commit
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD47
-rw-r--r--sphinx.conf.d5
-rw-r--r--sphinx.install17
-rw-r--r--sphinx.service15
5 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..69b75911e29
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+# Generated by mksrcinfo v8
+# Fri May 18 10:42:43 UTC 2018
+pkgbase = sphinx-bin
+ pkgdesc = Closed Source SQL full-text search engine.
+ pkgver = 3.0.3
+ pkgrel = 1
+ url = http://www.sphinxsearch.com/
+ install = sphinx.install
+ arch = x86_64
+ license = GPL
+ conflicts = sphinx
+ backup = etc/conf.d/sphinx
+ source = http://sphinxsearch.com/files/sphinx-3.0.3-facc3fb-linux-amd64.tar.gz
+ source = sphinx.conf.d
+ source = sphinx.install
+ source = sphinx.service
+ md5sums = 3635a44114e136776ecdc2ddacc046de
+ md5sums = 48e3e1857919d26d5104a48caffb531b
+ md5sums = a5968e77e1c2f7e69cd7431a78d37ae3
+ md5sums = fe06a8aff0520a6f75596ee43d2e5935
+
+pkgname = sphinx-bin
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..e01af21f835
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Florijan Hamzic <fh@infinicode.de>
+
+pkgname='sphinx-bin'
+pkgver=3.0.3
+pkgrel=1
+pkgdesc='Closed Source SQL full-text search engine.'
+arch=('x86_64')
+url='http://www.sphinxsearch.com/'
+license=('GPL')
+backup=('etc/conf.d/sphinx')
+conflicts=("sphinx")
+install='sphinx.install'
+
+source=(
+ "http://sphinxsearch.com/files/sphinx-${pkgver}-facc3fb-linux-amd64.tar.gz"
+ 'sphinx.conf.d'
+ 'sphinx.install'
+ 'sphinx.service')
+
+package() {
+ cd "${srcdir}/sphinx-${pkgver}"
+
+ # create directories
+ install -d "$pkgdir"/usr/bin
+ install -d "$pkgdir"/etc/sphinx
+ install -d "$pkgdir"/usr/share/sphinx/lib
+ install -d "$pkgdir"/usr/share/licenses/sphinx
+
+ mv etc/* "${pkgdir}"/etc/sphinx/
+ mv api "${pkgdir}"/usr/share/sphinx/lib/api
+ mv doc/license-* "$pkgdir"/usr/share/licenses/sphinx/
+ mv doc "${pkgdir}"/usr/share/sphinx/lib/doc
+
+ # create links
+ for _f in "bin/"*; do
+ install -Dm755 "bin/${_f##*/}" "${pkgdir}/usr/bin/${_f##*/}"
+ ln -s "/usr/bin/${_f##*/}" "${pkgdir}/usr/bin/sphinx-${_f##*/}"
+ done
+
+ install -Dm644 "${srcdir}/sphinx.conf.d" "${pkgdir}/etc/conf.d/sphinx"
+ install -Dm644 "${srcdir}/sphinx.service" "${pkgdir}/usr/lib/systemd/system/sphinx.service"
+}
+
+md5sums=('3635a44114e136776ecdc2ddacc046de'
+ '48e3e1857919d26d5104a48caffb531b'
+ 'a5968e77e1c2f7e69cd7431a78d37ae3'
+ 'fe06a8aff0520a6f75596ee43d2e5935')
diff --git a/sphinx.conf.d b/sphinx.conf.d
new file mode 100644
index 00000000000..c809e56fa3e
--- /dev/null
+++ b/sphinx.conf.d
@@ -0,0 +1,5 @@
+#
+# Arguments to be passed to the sphinx daemon
+#
+
+SPHINX_ARGS=""
diff --git a/sphinx.install b/sphinx.install
new file mode 100644
index 00000000000..7fbeb17fef2
--- /dev/null
+++ b/sphinx.install
@@ -0,0 +1,17 @@
+post_install() {
+ groupadd --system sphinx &>/dev/null
+ useradd --system -g sphinx -d /var/lib/sphinx -s /bin/false sphinx &>/dev/null
+ chown -R sphinx:sphinx /var/lib/sphinx
+}
+
+post_upgrade(){
+ getent group sphinx >/dev/null 2>&1 || groupadd --system sphinx &>/dev/null
+ getent passwd sphinx >/dev/null 2>&1 || useradd --system -s /bin/false -g sphinx -d /var/lib/sphinx \
+ -s /bin/false sphinx &>/dev/null
+}
+
+## arg 1: the old package version
+post_remove() {
+ userdel sphinx
+ groupdel sphinx
+}
diff --git a/sphinx.service b/sphinx.service
new file mode 100644
index 00000000000..cb22f01ceba
--- /dev/null
+++ b/sphinx.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Sphinx - SQL Full Text Search Engine
+After=local-fs.target network.target mysqld.service
+
+[Service]
+Type=forking
+Restart=always
+PIDFile=/var/lib/sphinx/log/searchd.pid
+ExecStart=/usr/bin/searchd --config /etc/sphinx/sphinx.conf
+ExecStop=/usr/bin/searchd --config /etc/sphinx/sphinx.conf --stopwait
+#User=sphinx
+#Group=sphinx
+
+[Install]
+WantedBy=multi-user.target