# maintainer : fenugrec #todo: fix cmakelists upstream + fix package() here #todo: change to git:// url pkgname=freediag-git pkgver=20150309.134.26cd55b pkgrel=1 pkgdesc="OBD-II vehicle diagnostic software and (mostly) J1978 compliant scan tool." arch=('i686' 'x86_64') url="http://freediag.sourceforge.net/" license=('GPL') makedepends=('cmake' 'git') depends=('glibc') optdepends=('fltk: needed for scangui front-end') provides=('freediag') conflicts=('freediag') source=('git+https://github.com/fenugrec/freediag') sha256sums=('SKIP') prepare () { cd $srcdir rm -rf ../builddir && mkdir ../builddir } pkgver () { _date=`date +"%Y%m%d"` cd $srcdir/freediag echo "$_date.$(git rev-list --count master).$(git rev-parse --short master)" } build() { cd $srcdir/../builddir cmake $srcdir/freediag -DCMAKE_INSTALL_PREFIX=/usr -DBUILDGUI=ON -DUSE_RCFILE=ON -DUSE_INIFILE=OFF make } package () { cd $srcdir/../builddir make DESTDIR="$pkgdir" install #this garbage is necessary until CMakeLists.txt is improved upstream. install -d "$pkgdir"/usr/share/doc/freediag/carsim_examples mv "$pkgdir"/usr/bin/*.db "$pkgdir"/usr/share/doc/freediag/carsim_examples mv "$pkgdir"/usr/doc/* "$pkgdir"/usr/share/doc/freediag mv "$pkgdir"/usr/{A*,C*,R*} "$pkgdir"/usr/share/doc/freediag rm -r "$pkgdir"/usr/doc }