updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / libwibble / PKGBUILD
blob9052490c6eb8e21bc78d912228a954dbd6ec1fa4
1 # Contributor: Mildred <mildred593 at online dot fr>
3 pkgname=libwibble
4 pkgver=0.1.6
5 pkgrel=2
6 pkgdesc="collect useful bits and pieces of C++ code"
7 url="http://web.mornfall.net/libwibble.html"
9 makedepends=('darcs' 'cmake' 'tut-framework' 'boost')
10 depends=('boost')
11 conflicts=()
12 replaces=()
13 provides=()
14 options=()
16 install=()
17 source=()
18 md5sums=()
20 _trunk="http://repos.mornfall.net/libwibble/"
22 _log() {
23     msg "$*"
24     "$@"
25     return $?
28 build() {
29     cd "$startdir/src/"                     || return 1
30     if [ -d libwibble ]; then
31         cd libwibble                        || return 1
32         if [ darcs = "$pkgver" ]; then
33             _log darcs pull                 || return 1
34         fi
35     else
36         if [ darcs = "$pkgver" ]; then
37             _log darcs get "${_trunk}"      || return 1
38         else
39             _log darcs get --tag="$pkgver" "${_trunk}" || return 1
40         fi
41         cd libwibble                        || return 1
42     fi
43     [ -d build ] || _log mkdir build
44     cd build                                || return 1
45     #msg "in `pwd`"
46     #for f in ../wibble/tests.h ../wibble/tests.cpp; do
47     #    if [ -e "$f" ]; then
48     #        _log mv "$f" "$f.old"           || return 1
49     #    fi
50     #done
51     #msg "Patching ../wibble/CMakeLists.txt"
52     #sed \
53     #    's/ADD_SUBDIRECTORY( tests )/# ADD_SUBDIRECTORY( tests )/' \
54     #    ../wibble/CMakeLists.txt \
55     #    | sed 's/XXX_BUILD_TESTING/NO/' \
56     #    > CMakeLists.txt.new                || return 1
57     #cat CMakeLists.txt.new \
58     #    > ../wibble/CMakeLists.txt          || return 1
59     _log cmake \
60         -D CMAKE_INSTALL_PREFIX:PATH=/usr \
61         ..                                  || return 1
62     _log make                               || return 1
63     _log make DESTDIR="$startdir/pkg/" install || return 1