jobcore/libevent/PKGBUILD

82 lines
2.4 KiB
Text
Raw Normal View History

2022-03-20 13:19:37 +01:00
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
2022-11-15 16:49:16 +01:00
# Maintainer : Joe Bo Run <joborun@disroot.org>
2022-03-20 13:19:37 +01:00
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
2022-11-15 16:49:16 +01:00
# Website : https://pozol.eu
2022-03-20 13:19:37 +01:00
#-----------------------------------------| DESCRIPTION |---------------------------------------
2022-08-07 13:17:14 +02:00
pkgbase=libevent
2022-11-15 16:49:16 +01:00
pkgname=(libevent) # libevent-docs)
2022-03-20 13:19:37 +01:00
pkgver=2.1.12
2022-11-15 16:49:16 +01:00
pkgrel=04
2022-03-20 13:19:37 +01:00
pkgdesc="An event notification library"
arch=('x86_64')
url="https://libevent.org/"
depends=('openssl')
2022-08-07 13:17:14 +02:00
makedepends=(cmake ninja python zlib doxygen)
#options=(debug) ### uncomment this line to have the debug pkg produced
source=(https://github.com/libevent/libevent/releases/download/release-$pkgver-stable/$pkgbase-$pkgver-stable.tar.gz{,.asc}
2022-11-15 16:49:16 +01:00
EVENT__SIZEOF_TIME_T.patch
libevent-2.1.12-openssl-compat.patch)
2022-08-07 13:17:14 +02:00
prepare() {
cd libevent-$pkgver-stable
# Fix Firefox build
patch -Np1 -i ../EVENT__SIZEOF_TIME_T.patch
2022-11-15 16:49:16 +01:00
# Fix build with OpenSSL 3.0
patch -Np1 -i ../libevent-2.1.12-openssl-compat.patch
2022-08-07 13:17:14 +02:00
}
2022-03-20 13:19:37 +01:00
build() {
2022-08-07 13:17:14 +02:00
cmake -S ${pkgbase}-${pkgver}-stable -B build -G Ninja \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_SKIP_INSTALL_RPATH=TRUE \
-DEVENT__LIBRARY_TYPE=SHARED \
-DEVENT__DISABLE_REGRESS=OFF \
-DEVENT__DOXYGEN=ON
2022-03-20 13:19:37 +01:00
cmake --build build
}
#check() {
2022-08-07 13:17:14 +02:00
# cd build
# ctest --output-on-failure --stop-on-failure -j$(nproc)
2022-03-20 13:19:37 +01:00
#}
2022-08-07 13:17:14 +02:00
package_libevent() {
provides=(libevent{,_core,_extra,_openssl,_pthreads}-2.1.so)
optdepends=('python: event_rpcgen.py')
DESTDIR="$pkgdir" cmake --install build
mkdir -p doc/usr/share
mv {"$pkgdir",doc}/usr/share/doc
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 libevent-$pkgver-stable/LICENSE
}
2022-11-15 16:49:16 +01:00
## uncomment the following block to make your own libevent-docs pkg, otherwise just use arch's
#package_libevent-docs() {
# pkgdesc+=" (documentation)"
# depends=()
#
# mv doc/* "$pkgdir"
#}
#
2022-03-20 13:19:37 +01:00
#---- license gpg-key sha256sums ----
license=('BSD')
validpgpkeys=('B35BF85BF19489D04E28C33C21194EBB165733EA'
'9E3AC83A27974B84D1B3401DB86086848EF8686D')
2022-08-07 13:17:14 +02:00
2022-03-20 13:19:37 +01:00
sha256sums=(92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb # libevent-2.1.12-stable.tar.gz
2022-08-07 13:17:14 +02:00
3cd3d764777540305813495912cd5f7ea7d16edb456d6c88b331a1aa8974dfc2 # libevent-2.1.12-stable.tar.gz.asc
2022-11-15 16:49:16 +01:00
945fc885b15692721bc7ae52f5774ef4fab8cc0f6108baa8860ab368de8675cf # EVENT__SIZEOF_TIME_T.patch
e41527c55f6dacc6453b13eeeea2664798496896b796abcd2a5c8304c9eb2bae) # libevent-2.1.12-openssl-compat.patch
2022-08-07 13:17:14 +02:00