OCaml 4.14.0 rebuild
[arch-packages.git] / libevent / trunk / PKGBUILD
blob36d5bccebdbb78edb5198c798e6ae239b2777fe3
1 # Contributor: Tom Gundersen <teg@jklm.no>
2 # Contributor: Judd <jvinet@zeroflux.org>
4 pkgbase=libevent
5 pkgname=(libevent libevent-docs)
6 pkgver=2.1.12
7 pkgrel=2
8 pkgdesc="Event notification library"
9 url="https://libevent.org/"
10 arch=(x86_64)
11 license=(BSD)
12 depends=(openssl)
13 makedepends=(cmake ninja python zlib doxygen)
14 options=(debug)
15 source=(
16   https://github.com/libevent/libevent/releases/download/release-$pkgver-stable/libevent-$pkgver-stable.tar.gz{,.asc}
17   EVENT__SIZEOF_TIME_T.patch
19 sha256sums=('92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb'
20             'SKIP'
21             '945fc885b15692721bc7ae52f5774ef4fab8cc0f6108baa8860ab368de8675cf')
22 validpgpkeys=('B35BF85BF19489D04E28C33C21194EBB165733EA'
23               '9E3AC83A27974B84D1B3401DB86086848EF8686D')
25 prepare() {
26   cd libevent-$pkgver-stable
28   # Fix Firefox build
29   patch -Np1 -i ../EVENT__SIZEOF_TIME_T.patch
32 build() {
33   cmake -S libevent-$pkgver-stable -B build -G Ninja \
34     -DCMAKE_BUILD_TYPE=None \
35     -DCMAKE_INSTALL_PREFIX=/usr \
36     -DCMAKE_SKIP_INSTALL_RPATH=TRUE \
37     -DEVENT__LIBRARY_TYPE=SHARED \
38     -DEVENT__DISABLE_REGRESS=OFF \
39     -DEVENT__DOXYGEN=ON
40   cmake --build build
43 check() {
44   cd build
45   ctest --output-on-failure --stop-on-failure -j$(nproc)
48 package_libevent() {
49   provides=(libevent{,_core,_extra,_openssl,_pthreads}-2.1.so)
50   optdepends=('python: event_rpcgen.py')
52   DESTDIR="$pkgdir" cmake --install build
54   mkdir -p doc/usr/share
55   mv {"$pkgdir",doc}/usr/share/doc
57   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 libevent-$pkgver-stable/LICENSE
60 package_libevent-docs() {
61   pkgdesc+=" (documentation)"
62   depends=()
64   mv doc/* "$pkgdir"