diff options
Diffstat (limited to 'testing/sphinx/APKBUILD')
-rw-r--r-- | testing/sphinx/APKBUILD | 54 |
1 files changed, 39 insertions, 15 deletions
diff --git a/testing/sphinx/APKBUILD b/testing/sphinx/APKBUILD index 8de899b28..88ce5b672 100644 --- a/testing/sphinx/APKBUILD +++ b/testing/sphinx/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Francesco Colista <francesco.colista@gmail.com> pkgname=sphinx pkgver=2.0.6 -pkgrel=1 +pkgrel=2 pkgdesc="Free open-source SQL full-text search engine" url="http://www.sphinxsearch.com" arch="all" @@ -11,20 +11,13 @@ depends="" depends_dev="postgresql-dev mysql-dev unixodbc-dev expat-dev libiconv snowball-dev" makedepends="$depends_dev" install="" -subpackages="$pkgname-doc" +pkgusers="$pkgname" +pkggroups="$pkgname" +subpackages="$pkgname-doc $pkgname-php $pkgname-python" source="http://sphinxsearch.com/files/$pkgname-$pkgver-release.tar.gz - sphinx.initd" - + sphinx.initd + sphinx.confd" _builddir="$srcdir"/$pkgname-$pkgver-release -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} build() { cd "$_builddir" @@ -32,6 +25,8 @@ build() { --exec-prefix=/usr \ --localstatedir=/var/lib/sphinx \ --sysconfdir=/etc/sphinx \ + --docdir=/usr/share/doc/sphinx \ + --mandir=/usr/share/man \ --with-pgsql \ --with-mysql \ --with-unixodbc \ @@ -41,17 +36,46 @@ build() { --with-syslog \ --enable-id64 make || return 1 - } package() { cd "$_builddir" make DESTDIR="$pkgdir" install + install -Dm755 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname \ + || return 1 install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname \ || return 1 + chown -R sphinx:sphinx "$pkgdir"/var/lib/sphinx +} + + +php() { + pkgdesc="PHP api for sphinx search engine" + arch="noarch" + mkdir -p "$subpkgdir"/usr/share/php/$pkgname/api + for i in $(ls $_builddir/api/*.php); do + mv $i "$subpkgdir"/usr/share/php/$pkgname/api ; + done +} + + +python() { + + pkgdesc="Python api for sphinx search engine" + arch="noarch" + mkdir -p "$subpkgdir"/usr/lib/python2.7/site-packages/$pkgname/ + for i in $(ls $_builddir/api/*.py); do + mv $i "$subpkgdir"/usr/lib/python2.7/site-packages/$pkgname/ ; + done +} +doc() { + default_doc; + mkdir -p "$subpkgdir"/usr/share/doc/$pkgname/misc + cp -r "$_builddir"/misc/* "$subpkgdir"/usr/share/doc/$pkgname/misc } md5sums="de6be5ee20b1bfafa2a0cea7155a8331 sphinx-2.0.6-release.tar.gz -38a9a10e6b927c597005d571be737f70 sphinx.initd" +b64a6ef4efc424d94a43d73e5f17d833 sphinx.initd +275efea3b1c4964955637862f60706bb sphinx.confd" |