updated on Fri Jan 20 16:18:17 UTC 2012
[aur-mirror.git] / muduo / PKGBUILD
blob79b4d2cb4f0c3bb651062847a8f3257f786d2f72
1 # Contributor: Kun Wang <ifreedom.dot.cn.at.gmail.dot.com>
3 pkgname=muduo
4 pkgver=0.2.8
5 pkgsubver=alpha
6 pkgrel=2
7 pkgdesc="A reactor-based light weight C++ network library"
8 arch=('i686' 'x86_64')
9 # groups=('')
10 url="http://code.google.com/p/muduo"
11 license=('New BSD License')
12 depends=('boost' 'linux-api-headers>2.6.28')
13 optdepends=("protobuf")
14 makedepends=('cmake' 'make')
15 # conflicts=('')
16 # provides=('')
17 # replaces=('')
18 # options=('!libtool')
19 source=("http://muduo.googlecode.com/files/muduo-$pkgver-$pkgsubver.tar.gz"
20                 "build2.patch")
21 md5sums=('858091c7dc3f683f58133666814aad1b'
22          '6dbc46ddd52206adffed8758b3e65d7c')
24 _name="$pkgname"
26 build() {
27   cd "$srcdir/$_name"
29   patch -p1 <../build2.patch
31   BUILD_TYPE=Release INSTALL_DIR=/usr \
32           EXTRA_CMAKE_ARGS="-DBUILD_TESTS=off -DBUILD_EXAMPLES=off" ./build.sh
35 install_dir() {
36         ls $1 | while read f; do
37                 local file="$1/$f"
38                 if [ -f $file ]; then
39                         install -Dm644 $file $2
40                 elif [ -d $file ]; then
41                         local dir="$2/`basename $f`"
42                         mkdir -p $dir
43                         install_dir $file $dir
44                 fi
45         done
48 package(){
49   cd "$srcdir/$_name"
50 # install license files
51   mkdir -p $pkgdir/usr/share/licenses/$_name
52   install -Dm644 License \
53         $pkgdir/usr/share/licenses/$_name/License
55   cd ../build
56 # install doc files
57   mkdir -p $pkgdir/usr/share/doc/$_name
58   install_dir html $pkgdir/usr/share/doc/$_name
60   cd Release
61   make DESTDIR=$pkgdir install || return 1
63   # rm -rf "$srcdir/build"