# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sic
pkgver=1.2
pkgrel=0
pkgdesc="an extremely simple IRC client"
url="http://tools.suckless.org/sic"
arch="all"
license="GPL"
depends=""
subpackages="$pkgname-doc"
source="http://dl.suckless.org/tools/sic-$pkgver.tar.gz
	musl-fix.patch"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	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"
	make PREFIX=/usr || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" PREFIX=/usr install
}

md5sums="eb099e790c3ce7866df50d3fe1a52c25  sic-1.2.tar.gz
216be8b79c23f4a5fa59a64ec06188af  musl-fix.patch"
sha256sums="ac07f905995e13ba2c43912d7a035fbbe78a628d7ba1c256f4ca1372fb565185  sic-1.2.tar.gz
e6b089bf64a7ac8ce7c531698aaede0ba93064b8b7c052ab7f6a44b70673530c  musl-fix.patch"
sha512sums="5659ed9d8a5986dda90dbe1155c27a5fd0ab4b1fcad2c1a20997c530bf03864e6c08bdeffc025c728629ab11872af6a1250761160b91f148dc37d77a49046dc9  sic-1.2.tar.gz
94d9dc44a1a33c67141db312004a2c9d2113223c921ae210a6451b1c0f408d93fff4b16049f49d393ab4ca3ffca3fb5fc62265ec6195317abfbb70abdcd8ad5e  musl-fix.patch"
