aboutsummaryrefslogtreecommitdiffstats
path: root/main/irssi/APKBUILD
blob: 617e63dfa9a23927a043cd7833eacba1656c6746 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=irssi
pkgver=1.0.0
pkgrel=0
pkgdesc="A modular textUI IRC client with IPv6 support"
url="http://irssi.org/"
arch="all"
license="GPL2+"
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

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="5365bb3825536bad789ac22a293ece4d  irssi-1.0.0.tar.xz"
sha256sums="6a8a3c1fc6a021a2c02a693877b2e19cbceb3eccd78fce49e44f596f4bae4fb8  irssi-1.0.0.tar.xz"
sha512sums="5846fa3fbb0a3f457cdea37b70022ecf31acbcc1be62d090d28a292c305657f0d8efa1ca59e241254a5bfad57e9b78d5ef2553252ea67e1ba95feb87d8ab3ecf  irssi-1.0.0.tar.xz"