app=foxtrotgps
version=1.2.2
build=1sml
homepage="https://www.foxtrotgps.org/"
download="https://www.foxtrotgps.org/releases/foxtrotgps-1.2.2.tar.xz"
desc="Lightweight mapping application in GTK+"
requires="gpsd"

build() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version
  fixbuilddirpermissions

  applypatch $srcdir/fix-gpsfix.patch
  applypatch $srcdir/fix-timespec.patch

  ./configure \
    --prefix="" \
    --sysconfdir=/etc 

  make
  make install DESTDIR=$pkg 

  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
7358b1db49e7fab80b25912c9bfeeabffd58350250d3f41b4498c448e8ba21d8c04c77096886fd74ce31134bd63a2837c69b91feadd02828aa10ca10df0a6d4d  foxtrotgps-1.2.2.tar.lz
dcaae691e8459c001e80a3cbd9ab85cba86d1d8428c126d54814da21ec079664a650215787fddf2ae59a4e03f6675027f994a715dcced5032b54a1c653092d72  fix-gpsfix.patch
2f555e0f5bcb80489a8f3d23d94a40ad67730d504f36ac2f0188c9fa71c7b5e76bceaa91b02f1c4a5bf0d67381d4794b552c5e7dd0703ccc0b39956f2e11a193  fix-timespec.patch
"
