# Maintainer: Developer <dev@opalos.org>
# Maintainer: Developer <dev@opalos.org>

pkgname=mobile-broadband-provider-info
pkgver=%version%
pkgrel=%release%
pkgdesc="APN configuration presets for mobile broadband connections"
url="https://gitlab.gnome.org/GNOME/mobile-broadband-provider-info"
arch=(any)
license=(custom)
makedepends=(git libxslt)
_commit=aae7c68671d225e6d35224613d5b98192b9b2ffe  # tags/20230416^0
source=("git+https://gitlab.gnome.org/GNOME/mobile-broadband-provider-info.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

check() {
  cd $pkgname
  make check
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING
}

# vim:set sw=2 sts=-1 et:
