# SPDX-License-Identifier: CC0-1.0
# Maintainer: Parabola Hackers <dev@lists.parabola.nu>


# NOTE: This PKGBUILD does not need to be edited manually.
#       The package is normally built automatically by the auto-builder.
#       To generate a new package, simply push changes to blacklist.git.
#       If ${pkgname}-blacklist.txt is modified, the auto-builder will
#       replace $pkgver, $_srcver, and the checksum (updpkgsums),
#       build and publish the package, and commit the changes to abslibre.


pkgname=your-freedom
pkgver=20260619
_srcver=4392f59d98169ae60113ea6a9dfa6a6610471436
pkgrel=1
pkgdesc="This meta-package conflicts with every known non-free Arch package"
arch=(any)
url=https://wiki.parabola.nu/Blacklist
license=(CC0-1.0)

makedepends=(librelib)
install=${pkgname}.install
_srcname=${pkgname}-blacklist-${_srcver}.txt
source=(${_srcname}::https://git.parabola.nu/blacklist.git/plain/blacklist.txt?id=${_srcver})

sha256sums=('fe7bc2a9eed99c7eba9f6843e6adfb8fc5e1001c880f762e8bcc81f2b3cbdca3')


package()
{
  # collect blacklisted package names as pacman conflicts,
  # also to be excluded by the repo importer, and rejected by libremakepkg
  conflicts=( $( libreblacklist normalize < ${_srcname}     | \
                 cut -d: -f1,2 | sed -n 's/:$//p' | sort -u ) )

  install -Dm644 ${_srcname} "${pkgdir}"/usr/share/doc/${pkgname}/blacklist.txt
}
