# Maintainer (AUR): Gaetan Bisson <bisson@archlinux.org>
# Maintainer: Luke R. <g4jc@openmailbox.org> GPG: rsa4096/3EAE8697

pkgname=xteddy
pkgver=2.2
pkgrel=5
pkgdesc='Your virtual comfort when things get rough'
url='http://webstaff.itn.liu.se/~stegu/xteddy/'
license=('GPL')
depends=('imlib2')
arch=('i686' 'x86_64' 'armv7h')
source=("http://webstaff.itn.liu.se/~stegu/${pkgname}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('d8885a1e2e08787cb469857a9404619cadab9bddcae7fa398a565d53633291e2')

prepare() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	sed '/AM_LDFLAGS =/s/$/ -lXext/' -i Makefile.*
	sed 's:/usr/games/xteddy:/usr/bin/xteddy:g' -i xtoys
}

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	./configure --prefix=/usr --mandir=/usr/share/man
	make
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make DESTDIR="${pkgdir}" install
}
