1 # Contributor: Tom Gundersen <teg@jklm.no>
2 # Contributor: Judd <jvinet@zeroflux.org>
5 pkgname=(libevent libevent-docs)
8 pkgdesc="Event notification library"
9 url="https://libevent.org/"
13 makedepends=(cmake ninja python zlib doxygen)
15 https://github.com/libevent/libevent/releases/download/release-$pkgver-stable/libevent-$pkgver-stable.tar.gz{,.asc}
16 EVENT__SIZEOF_TIME_T.patch
17 libevent-2.1.12-openssl-compat.patch
19 sha256sums=('92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb'
21 '945fc885b15692721bc7ae52f5774ef4fab8cc0f6108baa8860ab368de8675cf'
22 'e41527c55f6dacc6453b13eeeea2664798496896b796abcd2a5c8304c9eb2bae')
23 validpgpkeys=('B35BF85BF19489D04E28C33C21194EBB165733EA'
24 '9E3AC83A27974B84D1B3401DB86086848EF8686D')
27 cd libevent-$pkgver-stable
30 patch -Np1 -i ../EVENT__SIZEOF_TIME_T.patch
32 # Fix build with OpenSSL 3.0
33 patch -Np1 -i ../libevent-2.1.12-openssl-compat.patch
37 cmake -S libevent-$pkgver-stable -B build -G Ninja \
38 -DCMAKE_BUILD_TYPE=None \
39 -DCMAKE_INSTALL_PREFIX=/usr \
40 -DCMAKE_SKIP_INSTALL_RPATH=TRUE \
41 -DEVENT__LIBRARY_TYPE=SHARED \
42 -DEVENT__DISABLE_REGRESS=OFF \
49 ctest --output-on-failure --stop-on-failure -j$(nproc)
53 provides=(libevent{,_core,_extra,_openssl,_pthreads}-2.1.so)
54 optdepends=('python: event_rpcgen.py')
56 DESTDIR="$pkgdir" cmake --install build
58 mkdir -p doc/usr/share
59 mv {"$pkgdir",doc}/usr/share/doc
61 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 libevent-$pkgver-stable/LICENSE
64 package_libevent-docs() {
65 pkgdesc+=" (documentation)"