# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sic
pkgver=1.2
pkgrel=1
pkgdesc="an extremely simple IRC client"
url="http://tools.suckless.org/sic"
arch="all"
license="MIT"
depends=""
options="!check" # upstream doesn't have a test suite
subpackages="$pkgname-doc"
source="http://dl.suckless.org/tools/$pkgname-$pkgver.tar.gz
	musl-fix.patch"
builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	default_prepare
	sed -i "$builddir/config.mk" \
		-e '/CFLAGS/{s/-g -O0//;s/=/+=/}' \
		-e '/LDFLAGS/{s/-s//;s/=/+=/}'
}

build() {
	cd "$builddir"
	make PREFIX=/usr
}

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

sha512sums="5659ed9d8a5986dda90dbe1155c27a5fd0ab4b1fcad2c1a20997c530bf03864e6c08bdeffc025c728629ab11872af6a1250761160b91f148dc37d77a49046dc9  sic-1.2.tar.gz
94d9dc44a1a33c67141db312004a2c9d2113223c921ae210a6451b1c0f408d93fff4b16049f49d393ab4ca3ffca3fb5fc62265ec6195317abfbb70abdcd8ad5e  musl-fix.patch"
