archrelease: copy trunk to community-any
[ArchLinux/community.git] / websocketpp / trunk / PKGBUILD
blob3f295149d1ef017959290eece66f6f55c17133b0
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Kuba Serafinowski <zizzfizzix(at)gmail(dot)com>
3 # Contributor: Daichi Shinozaki <dsdseg@gmail.com>
4 # Contributor: skydrome <skydrome@i2pmail.org>
5 # Contributor: MTsoul
7 pkgname=websocketpp
8 pkgver=0.8.2
9 pkgrel=1
10 pkgdesc='C++/Boost Asio based websocket client/server library'
11 url='https://www.zaphoyd.com/websocketpp/'
12 arch=('any')
13 license=('BSD')
14 optdepends=(
15   'openssl: TLS socket component support'
16   'asio: alternative asio transport support'
17   'boost: non C++11 environments support'
18   'boost-libs: non C++11 environments support'
20 makedepends=('cmake' 'boost' 'boost-libs' 'boost' 'zlib' 'openssl')
21 source=(https://github.com/zaphoyd/${pkgname}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz)
22 sha512sums=('b2afc63edb69ce81a3a6c06b3d857b3e8820f0e22300ac32bb20ab30ff07bd58bd5ada3e526ed8ab52de934e0e3a26cad2118b0e68ecf3e5e9e8d7101348fd06')
23 b2sums=('dacee33832f493d465afe208f9edea1393414a22c8db8f8c86b8f913521d0d8d68b95673a2e82b7479acfbab1ac541eda2d713a55d5de387b3879461d5884df7')
25 prepare() {
26   cd ${pkgname}-${pkgver}
27   sed 's|"${WEBSOCKETPP_BOOST_LIBS}"|${WEBSOCKETPP_BOOST_LIBS}|' -i CMakeLists.txt
30 build() {
31   cd ${pkgname}-${pkgver}
32   cmake -B build \
33     -DCMAKE_BUILD_TYPE=None \
34     -DCMAKE_INSTALL_PREFIX=/usr \
35     -DENABLE_CPP11=ON \
36     -DBUILD_TESTS=ON
37   make -C build
40 check() {
41   cd ${pkgname}-${pkgver}
42   make -C build test
45 package() {
46   cd ${pkgname}-${pkgver}
47   make -C build DESTDIR="${pkgdir}" install
48   install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
49   install -Dm 644 readme.md -t "${pkgdir}/usr/share/doc/${pkgname}"
52 # vim: ts=2 sw=2 et: