aboutsummaryrefslogblamecommitdiffstats
path: root/main/rabbitmq-c/APKBUILD
blob: 7d805e9aa407e411a2495860517e69ec85e722e3 (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                  
             
        



                                          



                                                                                              

         




                                             




                                         
            

 




                            
           

                                      
                                   










                                                       



                                                           

 
                                                                                                                                                                       
# Contributor: Fabio Ribeiro <fabiorphp@gmail.com>
# Maintainer: Fabio Ribeiro <fabiorphp@gmail.com>
pkgname=rabbitmq-c
pkgver=0.10.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() {
	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="52a1194fab2dc8698ed065d63898e32aa004a4d68080d4aaf5cb7148cc28ad967283f7a99910d7f054cbba92b487b3a67b839b6f0bd88486ef9be043c9517d4c  rabbitmq-c-0.10.0.tar.gz"