PKGBUILD 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # SPDX-License-Identifier: CC0-1.0
  2. # Maintainer: Parabola Hackers <dev@lists.parabola.nu>
  3. # NOTE: This PKGBUILD does not need to be edited manually.
  4. # The package is normally built automatically by autobuilder.
  5. # To generate a new package, simply push changes to blacklist.git.
  6. # The autobuilder will modify this PKGBUILD,
  7. # replacing $pkgver, $_gitver, and the checksum (updpkgsums),
  8. # build and publish the package,
  9. # and commit the modified PKGBUILD to abslibre.
  10. pkgname=your-privacy
  11. pkgver=20221006
  12. pkgrel=1
  13. _gitver=ab32447a5a47a2a5ec5a3fa6043dc6b9024e3674
  14. pkgdesc="This package will remove support for protocols and services known to endanger privacy."
  15. arch=(any)
  16. url=https://wiki.parabola.nu/Blacklist
  17. license=(GPL3)
  18. makedepends=(librelib)
  19. backup=(etc/NetworkManager/conf.d/20-connectivity.conf)
  20. install=${pkgname}.install
  21. source=(${pkgname}-blacklist-${_gitver}.txt::https://git.parabola.nu/blacklist.git/plain/${pkgname}-blacklist.txt?id=${_gitver}
  22. archlinux-keyring.hook)
  23. sha512sums=('9ab837a9ca351bb844ecdfc147d69ec1f0d1971fbe12ceeed3b837fc59c54b10d2476901e60f677b0f53166a805b493b0a8bcd638e9e6638012dd454c7930cf8'
  24. '4f0e63c89ceb06ac976902355e2b0f9607abc3f910ac16cf90fefb46b70ba5a8c7b4c196a1767bf9b4a274da3b97faa54bed039e83f483dc2bc6d7daa3f20d91')
  25. package()
  26. {
  27. # collect blacklisted package names as pacman conflicts
  28. conflicts=( $( libreblacklist normalize < blacklist-${_gitver}.txt | \
  29. cut -d: -f1,2 | \
  30. sed -n 's/:$//p' | \
  31. sort -u ) )
  32. install -Dm644 ${pkgname}-blacklist-${_gitver}.txt "${pkgdir}"/usr/share/doc/${pkgname}/blacklist.txt
  33. # disable automatic archlinux-keyring refresh
  34. install -Dm644 archlinux-keyring.hook "${pkgdir}"/usr/share/libalpm/hooks/archlinux-keyring.hook
  35. # disable NetworkManager connectviity check
  36. # TODO: This may disable some user-friendliness features.
  37. # Something a bit more sophisticated may be needed,
  38. # such as a source-level replacement check:
  39. # $ dns_ip=$(sed 's|^nameserver ||p;d' /etc/resolv.conf) ; [[ -n "${dns_ip}" ]] && ping -c 1 ${dns_ip} &> /dev/null ;
  40. # As of now, we are over-riding 'networkmanager' only for [nonsystemd],
  41. # which already changes the target URI to parabola.nu.
  42. # This simple solution is an attempt to avoid also packaging it for [nonprism].
  43. install -Dm644 /dev/stdin "${pkgdir}"/etc/NetworkManager/conf.d/20-connectivity.conf <<EOF
  44. [connectivity]
  45. uri=https://www.parabola.nu/static/nm-check.txt
  46. enabled=false
  47. EOF
  48. }