aboutsummaryrefslogtreecommitdiffstats
path: root/main/irssi/APKBUILD
blob: b7340a2a2dfb5314fd7f005141d69bff6da53956 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
pkgname=irssi
pkgver=0.8.20
pkgrel=1
pkgdesc="A modular textUI IRC client with IPv6 support"
url="http://irssi.org/"
arch="all"
license="GPL2+"
depends=
makedepends="glib-dev libressl-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"

_builddir="$srcdir"/$pkgname-$pkgver
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="67d48c5feec2d3b949d088aa4abc3601  irssi-0.8.20.tar.xz"
sha256sums="7882c4e821f5aac469c5e69e69d7e235f4986101285c675e81a9a95bfb20505a  irssi-0.8.20.tar.xz"
sha512sums="ace39022a3e7461fc33cbd0e8c6635aa84c67fc4f6364b66747f860a4538a4b17bbd677e342fbfa9ae7e97783745f8d7dab350a27330ce14f1702386231296b1  irssi-0.8.20.tar.xz"