# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=convertlit
pkgver=1.8
pkgrel=11
pkgdesc='An extractor/converter for .LIT eBooks'
arch=(x86_64)
url='http://www.convertlit.com/'
license=(GPL)
depends=(libtommath)
source=(http://www.convertlit.com/clit18src.zip)
sha256sums=('d70a85f5b945104340d56f48ec17bcf544e3bb3c35b1b3d58d230be699e557ba')

prepare() {
# Link to shared libtommath and use system LDFLAGS
  sed -i 's|../libtommath-0.30/libtommath.a|/usr/lib/libtommath.so ${LDFLAGS}|' clit18/Makefile
}

build() {
  cd lib
  make 

  cd ../clit18
  make
}

package() {
  cd clit18

  install -Dm755 clit "$pkgdir/usr/bin/clit"
}
