From Toxic Bee, 2 Weeks ago, written in Plain Text.
This paste will hop the perch in 1 Week.
Embed
  1. # Contributor: artoo <[email protected]>
  2. # Contributor: Oscar Campos <[email protected]>
  3.  
  4. pkgbase=firewalld
  5. pkgname=firewalld-openrc
  6. pkgver=20200513
  7. pkgrel=1
  8. pkgdesc="OpenRC firewalld init script"
  9. arch=('any')
  10. url="https://github.com/artix-linux/packages-galaxy"
  11. license=('GPL2')
  12. groups=('openrc-galaxy')
  13. depends=('openrc' 'firewalld')
  14. conflicts=('systemd-sysvcompat')
  15. backup=('etc/conf.d/firewalld')
  16. source=("$pkgbase.initd::https://gitweb.gentoo.org/repo/gentoo.git/plain/net-firewall/firewalld/files/firewalld.init")
  17. sha256sums=('03e682fa5a426a97ac8de1abc91b9c9b449ecaaaad14eca00be5c88f722a7342')
  18.  
  19.  pkgver() {
  20.         date +%Y%m%d
  21.  }
  22.  
  23. _inst_initd(){
  24.     install -Dm755 ${srcdir}/$1.initd ${pkgdir}/etc/init.d/$1
  25.  
  26.     sed -e 's|#!/sbin/openrc-run|#!/usr/bin/openrc-run|g' \
  27.         -re 's_( |\t)/var/run_\1/run_g' \
  28.         -re 's_( |\t)/usr/sbin_\1/usr/bin_g' \
  29.         -re 's_( |\t)/sbin_\1/usr/bin_g' \
  30.         -re 's_( |\t)/bin_\1/usr/bin_g' \
  31.         -i ${pkgdir}/etc/init.d/$1
  32. }
  33.  
  34.  
  35. package() {
  36.     _inst_initd 'firewalld'
  37. }
  38.