# Contributor: Sergei Lukin # Maintainer: Kiyoshi Aman pkgname=irssi pkgver=0.8.21 pkgrel=2 pkgdesc="A modular textUI IRC client with IPv6 support" url="http://irssi.org/" arch="all" license="GPL2+" depends= makedepends="glib-dev openssl-dev ncurses-dev perl-dev automake autoconf libtool" subpackages="$pkgname-doc $pkgname-dev $pkgname-proxy $pkgname-perl" source="https://github.com/irssi/irssi/releases/download/$pkgver/irssi-$pkgver.tar.xz CVE-2017-9468.patch CVE-2017-10965-10966.patch " _builddir="$srcdir"/$pkgname-$pkgver # secfixes: # 0.8.21.r2: # - CVE-2017-10965 # - CVE-2017-10966 # 0.8.21-r1: # - CVE-2017-9468 # 0.8.21-r0: # - CVE-2017-5193 # - CVE-2017-5194 # - CVE-2017-5356 # - CVE-2017-5195 # - CVE-2017-5196 prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --with-perl=module \ --with-perl-lib=vendor \ --with-proxy \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 find "$pkgdir" -name perllocal.pod -delete } perl() { depends="$pkgname perl" pkgdesc="Irssi perl support and scripts" mkdir -p "$subpkgdir"/usr/share/irssi mv "$pkgdir"/usr/share/irssi/scripts \ "$subpkgdir"/usr/share/irssi/ mkdir -p "$subpkgdir"/usr/lib/irssi/modules mv "$pkgdir"/usr/lib/irssi/modules/libfe_perl.* \ "$pkgdir"/usr/lib/irssi/modules/libperl_core.* \ "$subpkgdir"/usr/lib/irssi/modules/ mv "$pkgdir"/usr/lib/perl5 "$subpkgdir"/usr/lib/ #need write permission when stripping for i in TextUI/TextUI.so Irssi.so Irc/Irc.so UI/UI.so; do chmod +w "$subpkgdir"/usr/lib/perl5/vendor_perl/auto/Irssi/$1 || return 1 done } proxy() { depends="$pkgname" pkgdesc="Irssi module for enabling bouncer-like functionality" mkdir -p "$subpkgdir"/usr/lib/irssi/modules mv "$pkgdir"/usr/lib/irssi/modules/libirc_proxy.* "$subpkgdir"/usr/lib/irssi/modules/ } md5sums="b820760c3b4f3b0c24abe4db82b6366a irssi-0.8.21.tar.xz 09307e506db9deef2d678101041ac79a CVE-2017-9468.patch f3c8acd17229df9c19fab1691217982f CVE-2017-10965-10966.patch" sha256sums="e433063b8714dcf17438126902c9a9d5c97944b3185ecd0fc5ae25c4959bf35a irssi-0.8.21.tar.xz 8d032e96ff6273de052dfc203fb2b16b90cfd029b71805fda9cfda0ce1a053ba CVE-2017-9468.patch a54c17663204b8a928e65fe136d57f473ac8b59437e6741a2a018aab60954a7a CVE-2017-10965-10966.patch" sha512sums="110934ab85c8574fc76bce367c58378e28603898e63a5014a72170ffe441ffe3dbda432531e899176f5c4126f47d929a3a01a2f87bcacbfe0ba4d6d8cb31e642 irssi-0.8.21.tar.xz 9fe90deea2002c976678739bda7a58f88c611969a1800bf2e15e152fff3075b63117f3dddc3f491ef845b84dc928503b95f7db13b6a23d80a2f9bb8aef3f2bb6 CVE-2017-9468.patch 166833d0008b2555d1bf787835a06663f4ffc7cde9138f7b1690b18d59018df56329ef361c42e5b1f0064aa490e21829a25791d13f92cc5d0b06f7802282951c CVE-2017-10965-10966.patch"