blob: 13380c8686665b360808ac7b09b5a5315339d9c4 (
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
|
# Contributor: Fabio Ribeiro <fabiorphp@gmail.com>
# Maintainer: Fabio Ribeiro <fabiorphp@gmail.com>
pkgname=rabbitmq-c
pkgver=0.9.0
pkgrel=0
pkgdesc="RabbitMQ C client"
url="https://github.com/alanxz/rabbitmq-c"
arch="all"
license="MIT"
depends_dev="popt-dev"
makedepends="$depends_dev openssl-dev cmake xmlto doxygen"
subpackages="$pkgname-utils $pkgname-doc::noarch $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/alanxz/rabbitmq-c/archive/v$pkgver.tar.gz"
build() {
cd "$builddir"
mkdir -p build && cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_C_FLAGS="$CFLAGS" \
-DBUILD_STATIC_LIBS=ON \
-DBUILD_SHARED_LIBS=ON \
-DENABLE_SSL_SUPPORT=ON \
-DBUILD_TESTS=ON \
-DBUILD_TOOLS=ON
make
}
check() {
cd "$builddir"/build
ctest -E basic
}
package() {
cd "$builddir"/build
make DESTDIR="$pkgdir" install
rm -f "$pkgdir"/usr/lib/*.a
}
utils() {
pkgdesc="$pkgdesc (command line utilities)"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}
doc() {
pkgdesc="$pkgdesc (documentation and examples)"
mkdir -p "$subpkgdir"/usr/share/"$pkgname"
cp -a "$builddir"/build/docs "$builddir"/examples \
"$subpkgdir"/usr/share/"$pkgname"/
}
sha512sums="a63fe267a3ec112a5e9456a03066132b91f897181947fba18ea3efb14ca0a69996d7dfaecda61a0dd360e03a4e56569e70592e1674b75d20b937a118e1acfc64 rabbitmq-c-0.9.0.tar.gz"
|