void-packages/srcpkgs/irssi/template

74 lines
2.1 KiB
Bash

# Template file for 'irssi'
pkgname=irssi
version=1.2.2
revision=6
build_style=gnu-configure
configure_args="--disable-static --with-proxy --enable-true-color
--with-otr --with-perl=module"
hostmakedepends="pkg-config perl"
makedepends="libglib-devel libressl-devel ncurses-devel libgcrypt-devel
libotr-devel perl"
depends="ca-certificates"
conf_files="/etc/irssi.conf"
short_desc="Secure and modular IRC client with text mode user interface"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.irssi.org"
distfiles="https://github.com/irssi/irssi/releases/download/${version}/irssi-${version}.tar.gz"
checksum=53182861d4d2be6db35fa7e3f0524a64d2a54a374307574dab5f5362bfea563c
LDFLAGS="-lncursesw"
pre_configure() {
[ -z "$CROSS_BUILD" ] && return 0
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
vsed -i -e "s;archlibexp => '\(.*\)';archlibexp => '${XBPS_CROSS_BASE}\1';" \
${perlprefix}/Config.pm
vsed -i -e "s;^archlibexp='\(.*\)';archlibexp='${XBPS_CROSS_BASE}\1';" \
${perlprefix}/Config_heavy.pl
export PERL5LIB=$perlprefix
export OPTIMIZE="$CFLAGS"
export LDDLFLAGS="-shared $CFLAGS -L${XBPS_CROSS_BASE}/usr/lib -lperl"
export PERL_MM_USE_DEFAULT=1
}
post_configure() {
for i in common irc textui ui; do
perlmkf="$wrksrc/src/perl/$i/Makefile.PL"
if [ ! -f $perlmkf ]; then
msg_error "*** ERROR: couldn't find $perlmkf, aborting **\n"
fi
cd $wrksrc/src/perl/$i
perl Makefile.PL INSTALLDIRS=vendor
done
}
irssi-perl_package() {
depends="irssi"
short_desc+=" - perl support"
pkg_install() {
vmove usr/lib/perl5
vmove "usr/lib/irssi/modules/*perl*"
vmove usr/share/irssi/scripts
}
}
irssi-otr_package() {
depends="irssi"
short_desc+=" - OTR support"
pkg_install() {
vmove "usr/lib/irssi/modules/*otr*"
}
}
irssi-devel_package() {
depends="${makedepends}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
}
}