APP=wireless-regdb
VERSION=2019.06.03
BUILD=1sml
HOMEPAGE="https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb"
DOWNLOAD="http://ftp.iij.ad.jp/pub/linux/kernel/software/network/wireless-regdb/wireless-regdb-2019.06.03.tar.xz"
DESC="regulatory database package for use by CRDA"
REQUIRES="musl"

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION

  tar xf $SRCDIR/$APP-$VERSION.tar.?z*
  cd $APP-$VERSION
  fixbuilddirpermissions

  install -Dm 644 regulatory.bin $PKG/lib/crda/regulatory.bin
  install -Dm 644 regulatory.db $PKG/lib/firmware/regulatory.db
  install -Dm 644 regulatory.db.p7s $PKG/lib/firmware/regulatory.db.p7s
  install -Dm 644 regulatory.bin.5 $PKG/share/man/man5/regulatory.bin.5

  cp LICENSE $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
73209ca28c59d6760349ffb713f550300e80db1592bae52b6d252ac9401fa2bb2ace7e6c30cf55df7541da9cef4c8587f3790f7aa34529552468e4b63a3d8fdb  wireless-regdb-2019.06.03.tar.xz
"
