summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Lobtsov2017-06-05 15:54:25 +0400
committerAlex Lobtsov2017-06-05 15:54:25 +0400
commitf6e5755bf1e6375d33479f88c3f2253548b075d2 (patch)
tree8a48f9fe24aa2c6ae149495af1cc6c3f737c6c6c
downloadaur-f6e5755bf1e6375d33479f88c3f2253548b075d2.tar.gz
init sphinx-beta package
-rw-r--r--.SRCINFO20
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD56
-rw-r--r--sphinx.service13
4 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6a33207e7ee4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = sphinx-beta
+ pkgdesc = Free open-source SQL full-text search engine (SVN version, with libsphinxclient, with systemd support)
+ pkgver = 2.3.2
+ pkgrel = 1
+ url = http://www.sphinxsearch.com
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = libmariadbclient
+ provides = sphinx
+ conflicts = sphinx
+ conflicts = sphinx-svn
+ options = !makeflags
+ source = http://sphinxsearch.com/files/sphinx-2.3.2-beta.tar.gz
+ source = sphinx.service
+ sha256sums = d2e71e094b7f979cdd554069006983e1c1289601d8572428b36d488c61621460
+ sha256sums = 847218ba5cd0b8f5a3b0d851352ffca1085229bfdf2779cbe2eff5e5eef99351
+
+pkgname = sphinx-beta
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..f52b2f5a9940
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg/
+src/
+*.tar.xz
+*.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ee48be7e8d3a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,56 @@
+# Contributor: Lobtsov Alexander <alex at lobtsov dot com>
+pkgname=sphinx-beta
+_pkgname=sphinx
+pkgver=2.3.2
+pkgrel=1
+pkgdesc="Free open-source SQL full-text search engine (SVN version, with libsphinxclient, with systemd support)"
+arch=(i686 x86_64)
+url="http://www.sphinxsearch.com"
+license=('GPL')
+depends=('libmariadbclient')
+source=(
+ "http://sphinxsearch.com/files/${_pkgname}-${pkgver}-beta.tar.gz"
+ "sphinx.service"
+)
+
+provides=("sphinx")
+conflicts=("sphinx" "sphinx-svn")
+
+# https://bbs.archlinux.org/viewtopic.php?id=77214
+options=('!makeflags')
+
+sha256sums=('d2e71e094b7f979cdd554069006983e1c1289601d8572428b36d488c61621460'
+ '847218ba5cd0b8f5a3b0d851352ffca1085229bfdf2779cbe2eff5e5eef99351')
+
+package() {
+ cd "${srcdir}/${_pkgname}-${pkgver}-beta"
+
+ msg "Starting sphinx make..."
+
+ ./configure --prefix=/usr \
+ --exec-prefix=/usr \
+ --program-prefix=sphinx- \
+ --localstatedir=/var/lib/sphinx \
+ --sysconfdir=/etc/sphinx \
+ --enable-id64
+ make || return 1
+ make DESTDIR=${pkgdir} -j4 install || return 1
+
+ cd "$srcdir/${_pkgname}-${pkgver}-beta/api/libsphinxclient"
+ msg "Starting libsphinxclient make..."
+
+ sed -i 's/\/lib\/cpp/\/usr\/bin\/cpp/g' ./configure
+
+ ./configure --prefix=/usr \
+ --exec-prefix=/usr \
+ --program-prefix=sphinx- \
+ --localstatedir=/var/lib/sphinx \
+ --sysconfdir=/etc/sphinx \
+ --enable-id64
+ make || return 1
+ make DESTDIR=${pkgdir} install || return 1
+
+ msg "Install service file..."
+
+ install -Dm644 "${srcdir}/sphinx.service" "${pkgdir}/usr/lib/systemd/system/sphinx.service"
+}
diff --git a/sphinx.service b/sphinx.service
new file mode 100644
index 000000000000..a0997ccb2672
--- /dev/null
+++ b/sphinx.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Sphinx - SQL Full Text Search Engine
+After=local-fs.target network.target mysqld.service
+
+[Service]
+Type=forking
+Restart=always
+PIDFile=/var/run/sphinx/searchd.pid
+ExecStart=/bin/sh -c '/usr/bin/mkdir -p /var/run/sphinx && /usr/bin/sphinx-searchd --config /etc/sphinx/sphinx.conf'
+ExecStop=/usr/bin/sphinx-searchd --config /etc/sphinx/sphinx.conf --stopwait
+
+[Install]
+WantedBy=multi-user.target