MSYS2-packages/znc/PKGBUILD
Christoph Reiter d587d7b5e0 more CPEs
2024-03-25 11:19:53 +01:00

72 lines
1.9 KiB
Bash

# Maintainer: Yasuhiro MATSUMOTO <mattn.jp@gmail.com>
pkgname=znc
pkgver=1.8.2
pkgrel=16
pkgdesc='An IRC bouncer with modules & scripts support'
url='https://znc.in/'
msys2_repository_url="https://github.com/znc/znc"
msys2_references=(
"cpe: cpe:/a:znc:znc"
)
license=('spdx:Apache-2.0')
arch=('i686' 'x86_64')
replaces=('znc-git')
conflicts=('znc-git')
depends=('openssl' 'icu')
makedepends=('cmake'
'cyrus-sasl'
'gettext-devel'
'git'
'icu-devel'
'libsasl-devel'
'perl'
'python'
'swig'
'gcc'
#'tcl'
)
optdepends=('tcl: modtcl module'
'python: modpython module'
'perl: modperl module'
'cyrus-sasl: cyrusauth module')
source=(znc-${pkgver}::git+https://github.com/znc/znc.git#tag=znc-${pkgver}
#https://github.com/znc/znc/archive/znc-${pkgver}.tar.gz
"https://github.com/znc/znc/commit/fecdd9895894b3afe903021b0843a422eb4d3308.patch"
)
sha256sums=('SKIP'
'14957cb7c0ab33166086fdad0744b8ad0c21d5aa8f255e7cf81c6e2407d979e2')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
git submodule update --init --recursive
patch -Np1 -i "${srcdir}/fecdd9895894b3afe903021b0843a422eb4d3308.patch"
}
build() {
[[ -d "${srcdir}/build-${CARCH}" ]] && rm -rf "${srcdir}/build-${CARCH}"
mkdir -p "${srcdir}/build-${CARCH}" && cd "${srcdir}/build-${CARCH}"
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DWANT_CYRUS=ON \
-DWANT_PERL=ON \
-DWANT_PYTHON=ON \
-DWANT_I18N=OFF \
../${pkgname}-${pkgver}
make
}
package() {
cd "${srcdir}/build-${CARCH}"
make DESTDIR="${pkgdir}" install
python3 -m compileall -o 0 -o 1 -s "${pkgdir}" "${pkgdir}/usr/lib/znc"
install -Dm644 ${srcdir}/${pkgname}-${pkgver}/LICENSE ${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE
}