updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / clucene-git / PKGBUILD
blobb3c10f1989dc044ab94379c1cd01cf1e91161d41
1 # Maintainer: Kuba Serafinowski <zizzfizzix(at)gmail(dot)com>
3 # This PKGBUILD derives from official clucene PKGBUILD so below is a credits list for that one.
4 # Contributor: Alois Nespor <alois.nespor@gmail.com>
5 # Contributor: Tobias Powalowski <tpowa@archlinux.org>
7 ##############################################################
8 #### The section below can be adjusted to suit your needs ####
9 ##############################################################
11 # What type of build do you want?
12 # See http://techbase.kde.org/Development/CMake/Addons_for_KDE#Buildtypes to check what is supported.
13 # Default is RelWithDebInfo to help with debugging.
15 _buildtype="RelWithDebInfo"
17 ##############################################################
19 pkgname=clucene-git
20 pkgver=20110621
21 pkgrel=1
22 pkgdesc="CLucene is a C++ port of Lucene: A high-performance, full-featured text search engine."
23 arch=('i686' 'x86_64')
24 url="http://clucene.sourceforge.net"
25 license=('APACHE' 'LGPL')
26 depends=('gcc-libs' 'zlib' 'boost-libs')
27 makedepends=('boost' 'cmake' 'git')
28 provides=('clucene=2.3.3.4')
29 conflicts=('clucene')
30 options=('!strip')
31 changelog=ChangeLog
33 if [[ ${_buildtype} == "Release" ]] || [[ ${_buildtype} == "release" ]]; then
34   options=()
37 _gitroot="git://clucene.git.sourceforge.net/gitroot/clucene/clucene"
38 _gitname="clucene"
40 build() {
41   cd ${srcdir}
42   msg "Connecting to GIT server..."
44   if [ -d ${_gitname} ]; then
45     cd ${_gitname} && git pull origin
46     msg "Local files are updated."
47   else
48     git clone --depth 1 ${_gitroot}
49   fi
51   msg "GIT checkout done or server timeout"
52   msg "Starting build..."
54   rm -rf ${srcdir}/${_gitname}-build
55   cp -r ${srcdir}/$_gitname ${srcdir}/${_gitname}-build
56   cd ${srcdir}/${_gitname}-build
58   cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${_buildtype}
59   make
62 package() {
63   cd ${srcdir}/${_gitname}-build
64   make DESTDIR=${pkgdir} install