aboutsummaryrefslogtreecommitdiffstats
path: root/testing/sphinx/APKBUILD
blob: 88ce5b6720548b8d2147b602804ccd709748c3d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Contributor: Francesco Colista <francesco.colista@gmail.com>
# Maintainer: Francesco Colista <francesco.colista@gmail.com>
pkgname=sphinx
pkgver=2.0.6
pkgrel=2
pkgdesc="Free open-source SQL full-text search engine"
url="http://www.sphinxsearch.com"
arch="all"
license="GPL2"
depends=""
depends_dev="postgresql-dev mysql-dev unixodbc-dev expat-dev libiconv snowball-dev"
makedepends="$depends_dev"
install=""
pkgusers="$pkgname"
pkggroups="$pkgname"
subpackages="$pkgname-doc $pkgname-php $pkgname-python"
source="http://sphinxsearch.com/files/$pkgname-$pkgver-release.tar.gz
	sphinx.initd
	sphinx.confd"
_builddir="$srcdir"/$pkgname-$pkgver-release

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--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 \
		--with-libexpat \
		--with-iconv \
		--with-libstemmer \
		--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
b64a6ef4efc424d94a43d73e5f17d833  sphinx.initd
275efea3b1c4964955637862f60706bb  sphinx.confd"