APKBUILD 2.64 KB
Newer Older
1
# Contributor: Sergei Lukin <sergej.lukin@gmail.com>
2
# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
Carlo Landmeter's avatar
Carlo Landmeter committed
3
pkgname=irssi
4
pkgver=0.8.21
5
pkgrel=1
Carlo Landmeter's avatar
Carlo Landmeter committed
6 7
pkgdesc="A modular textUI IRC client with IPv6 support"
url="http://irssi.org/"
8
arch="all"
Fabian Affolter's avatar
Fabian Affolter committed
9
license="GPL2+"
10 11 12
depends=
makedepends="glib-dev openssl-dev ncurses-dev perl-dev automake autoconf libtool"
subpackages="$pkgname-doc $pkgname-dev $pkgname-proxy $pkgname-perl"
13 14 15 16
source="https://github.com/irssi/irssi/releases/download/$pkgver/irssi-$pkgver.tar.xz
	CVE-2017-9468.patch
	"
_builddir="$srcdir"/$pkgname-$pkgver
Carlo Landmeter's avatar
Carlo Landmeter committed
17

18
# secfixes:
19 20
#   0.8.21-r1:
#     - CVE-2017-9468
21 22 23 24 25 26 27
#   0.8.21-r0:
#     - CVE-2017-5193
#     - CVE-2017-5194
#     - CVE-2017-5356
#     - CVE-2017-5195
#     - CVE-2017-5196

28 29 30 31 32 33 34 35 36 37
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
}

Carlo Landmeter's avatar
Carlo Landmeter committed
38
build() {
39
	cd "$_builddir"
40 41 42 43 44 45
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
46
		--with-perl=module \
Natanael Copa's avatar
Natanael Copa committed
47
		--with-perl-lib=vendor \
48 49
		--with-proxy \
		|| return 1
50
	make || return 1
Carlo Landmeter's avatar
Carlo Landmeter committed
51 52
}

53 54
package() {
	cd "$_builddir"
Natanael Copa's avatar
Natanael Copa committed
55
	make DESTDIR="$pkgdir" install || return 1
56
	find "$pkgdir" -name perllocal.pod -delete
57 58
}

59 60 61 62 63 64 65 66 67 68 69 70 71
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
Natanael Copa's avatar
Natanael Copa committed
72
		chmod +w "$subpkgdir"/usr/lib/perl5/vendor_perl/auto/Irssi/$1 || return 1
73 74 75
	done
}

76
proxy() {
77 78 79 80
	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/
81 82
}

83 84 85 86 87 88
md5sums="b820760c3b4f3b0c24abe4db82b6366a  irssi-0.8.21.tar.xz
09307e506db9deef2d678101041ac79a  CVE-2017-9468.patch"
sha256sums="e433063b8714dcf17438126902c9a9d5c97944b3185ecd0fc5ae25c4959bf35a  irssi-0.8.21.tar.xz
8d032e96ff6273de052dfc203fb2b16b90cfd029b71805fda9cfda0ce1a053ba  CVE-2017-9468.patch"
sha512sums="110934ab85c8574fc76bce367c58378e28603898e63a5014a72170ffe441ffe3dbda432531e899176f5c4126f47d929a3a01a2f87bcacbfe0ba4d6d8cb31e642  irssi-0.8.21.tar.xz
9fe90deea2002c976678739bda7a58f88c611969a1800bf2e15e152fff3075b63117f3dddc3f491ef845b84dc928503b95f7db13b6a23d80a2f9bb8aef3f2bb6  CVE-2017-9468.patch"