aboutsummaryrefslogtreecommitdiffstats
path: root/community/xapian-bindings/APKBUILD
blob: acb449ef5796b328b59e898b337dd968da990973 (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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
_php="php5"
pkgname=xapian-bindings
pkgver=1.4.1
pkgrel=0
pkgdesc="Binding libraries for xapian"
url="http://www.xapian.org"
arch="all"
license="GPL2+"
depends=""
makedepends="automake autoconf libtool bash 
	xapian-core-dev 
	perl-dev 
	lua5.2-dev
	${_php}-dev ${_php}-cli 
	python2-dev py-sphinx-autobuild
	ruby-dev ruby ruby-rdoc ruby-irb 
	tcl-dev"
subpackages="$pkgname-perl $pkgname-lua $pkgname-doc
	$pkgname-php $pkgname-python $pkgname-ruby $pkgname-tcl"
install=""
source="http://www.oligarchy.co.uk/xapian/$pkgver/$pkgname-$pkgver.tar.xz"

builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	default_prepare || return 1
	cd "$builddir"
	aclocal && autoconf || return 1                                 
	libtoolize || return 1 
	autoreconf -fvi || return 1
}

build() {
	cd "$builddir"
	export LUA=/usr/bin/lua5.2
	export LUA_INC=/usr/include/lua5.2
	export LUA_LIB=/usr/lib/lua/5.2
	export LUA_SO=.so
	export PERL=/usr/bin/perl
	export PERL_LIB=/usr/share/perl5/vendor_perl
	export PERL_ARCH=/usr/share/perl5/vendor_perl
	export PHP=/usr/bin/php
	export PYTHON=/usr/bin/python2
	export PYTHON_LIB=/usr/lib/python2.7/site-packages
	export RUBY=/usr/bin/ruby
	export RUBY_INC=/usr/include/ruby-2.3.0
	export RUBY_LIB=/usr/lib/ruby
	export RUBY_LIB_ARCH=/usr/lib/ruby
	export TCLSH=/usr/bin/tclsh8.6
	export TCL_LIB=/usr/lib/tcl8.6/$pkgname-$pkgver
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-perl \
		--with-lua \
		--with-php \
		--with-python \
		--with-ruby \
		--with-tcl \
		XAPIAN_CONFIG=/usr/bin/xapian-config
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR=$pkgdir install || return 1
}

php() {
	pkgdesc="PHP bindings for the Xapian search engine library"

	install -d "$subpkgdir"/usr/share/php5 \
		"$subpkgdir"/usr/lib/$_php/modules \
		"$subpkgdir"/etc/$_php/conf.d || return 1
	echo ';extension=xapian.so' > "$subpkgdir/etc/$_php/conf.d/xapian.ini" \
		|| return 1
	mv "$pkgdir"/usr/lib/$_php/modules/* "$subpkgdir"/usr/lib/$_php/modules/
	mv "$pkgdir"/usr/share/php5 "$subpkgdir"/usr/share/
}

perl() {
	pkgdesc="Perl bindings for the Xapian search engine library"

	install -d "$subpkgdir"/usr/share/perl5
	mv "$pkgdir"/usr/share/perl5 "$subpkgdir"/usr/share/
}

lua() {
	pkgdesc="Lua bindings for the Xapian search engine library"

	install -d "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/lua "$subpkgdir"/usr/lib
}

python() {
	pkgdesc="Python bindings for the Xapian search engine library"

	install -d "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python2.7 "$subpkgdir"/usr/lib
}

ruby() {
	pkgdesc="Ruby bindings for the Xapian search engine library"

	install -d "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/ruby "$subpkgdir"/usr/lib
}

tcl() {
	pkgdesc="Tcl bindings for the Xapian search engine library"

	install -d "$subpkgdir"/usr/lib/tcl8.6
	mv "$pkgdir"/usr/lib/tcl8.6/$pkgname-$pkgver "$subpkgdir"/usr/lib/tcl8.6
}

md5sums="2587defe5d412b4f96b946d8000a2611  xapian-bindings-1.4.1.tar.xz"
sha256sums="6ca9731eed0fdfd84c6f8d788389bc7e7a7dc62fa46e0383eb0bb502576c2331  xapian-bindings-1.4.1.tar.xz"
sha512sums="5a7e070d25a8ffe50e5bed473b4975366533ee646699c5c53fc0eb797a4d031c87fc8e5b0b93f77a9f122d17022cbc97862ae93c0d3510cd77588f2cd77dd179  xapian-bindings-1.4.1.tar.xz"