void-packages/srcpkgs/znc/template

79 lines
2.0 KiB
Bash

# Template file for 'znc'
pkgname=znc
version=1.9.1
revision=1
build_style=cmake
configure_args="-DWANT_PYTHON=YES -DWANT_PERL=YES -DWANT_TCL=YES
-DWANT_ARGON=YES -DWANT_I18N=YES"
hostmakedepends="pkg-config perl gettext"
makedepends="openssl-devel python3-devel tcl-devel libsasl-devel
icu-devel zlib-devel perl libargon2-devel boost-devel"
short_desc="Advanced IRC Bouncer"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="Apache-2.0"
homepage="https://znc.in/"
changelog="https://github.com/znc/znc/raw/master/ChangeLog.md"
distfiles="https://znc.in/releases/${pkgname}-${version}.tar.gz"
checksum=e8a7cf80e19aad510b4e282eaf61b56bc30df88ea2e0f64fadcdd303c4894f3c
system_accounts="znc"
znc_homedir="/var/lib/znc"
make_dirs="/var/lib/znc 0750 znc znc"
pre_configure() {
local perlprefix=${XBPS_STATEDIR}/perlprefix-${XBPS_TARGET_MACHINE}
mkdir -p $perlprefix
cp "$XBPS_CROSS_BASE/usr/lib/perl5/core_perl/Config"*.p? $perlprefix
cp "$XBPS_CROSS_BASE/usr/lib/perl5/core_perl/Errno.pm" $perlprefix
export PERL5LIB=$perlprefix
export TCL_FLAGS="$CFLAGS $LDFLAGS -ltcl8.6"
}
post_install() {
vsv znc
vdoc "${FILESDIR}/README.voidlinux"
vmkdir usr/lib/cmake/znc
mv "${DESTDIR}"/usr/share/znc/cmake/* "${DESTDIR}/usr/lib/cmake/znc"
}
znc-python3_package() {
depends="znc>=${version}_${revision}"
python_version=3
pycompile_dirs="/usr/lib/znc/modpython"
short_desc+=" - python3 plugin"
pkg_install() {
vmove usr/lib/znc/modpython
vmove usr/lib/znc/modpython.so
}
}
znc-perl_package() {
depends="znc>=${version}_${revision}"
short_desc+=" - perl plugin"
pkg_install() {
vmove usr/lib/znc/modperl
vmove usr/lib/znc/modperl.so
vmove usr/lib/znc/perleval.pm
}
}
znc-tcl_package() {
depends="znc>=${version}_${revision}"
short_desc+=" - tcl plugin"
pkg_install() {
vmove usr/share/znc/modtcl
vmove usr/lib/znc/modtcl.so
}
}
znc-devel_package() {
depends="znc>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/lib/cmake
}
}