Advertisement
ratamahata

Modified PKGBUILD about vuurmuur 0.8

Dec 26th, 2019 (edited)
803
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.51 KB | None | 0 0
  1. #This PKGBUILD isn't mine. Is created by loqs in arch linux forum...
  2.  
  3. # Maintainer: Piotr Rogoża <rogoza dot piotr at gmail dot com>
  4. # Contributor: skydrome <skydrome@i2pmail.org>
  5. # Contributor: Valere Monseur <valere_monseur@hotmail.com>
  6. # Contributor: Phillip Smith <fukawi2@NO-SPAM.gmail.com>
  7. # Contributor: (asper, noob
  8. # Contributor: ratamahata <sarakinp@gmail.com>
  9.  
  10. pkgname=vuurmuur
  11. pkgver=0.8
  12. pkgrel=1
  13. pkgdesc='powerful front-end for iptables aimed at system-administrators who need a decent firewall, but dont have netfilter specific knowledge'
  14. arch=('i686' 'x86_64' 'armv7h')
  15. url='http://www.vuurmuur.org'
  16. license=('GPL')
  17. install='vuurmuur.install'
  18. depends=(libnetfilter_log iptables ncurses libjpeg)
  19. optdepends=('conntrack-tools: for connection tracking'
  20. 'iproute2: for traffic shapping'
  21. 'iptrafvol: for traffic volume logging')
  22. conflicts=(vuurmuur-devel)
  23. backup=('etc/vuurmuur/config.conf'
  24. 'etc/vuurmuur/modules.conf'
  25. 'etc/vuurmuur/vuurmuur_conf.conf'
  26. 'etc/vuurmuur/plugins/textdir.conf'
  27. )
  28. source=(ftp://ftp.vuurmuur.org/releases/$pkgver/${pkgname}-$pkgver.tar.gz
  29. modules.conf
  30. vuurmuur.rc
  31. vuurmuur.service
  32. vuurmuur.script)
  33. sha256sums=('ff44c6be378d629ec3c5637830f87f2a41cff8f679c1f58bad901eebc69f4f1e'
  34. 'a18d4093075f8e0a24f902780b04d03116be8c057b139a7502d8517009bd65e0'
  35. 'f1b49c9e1480f9d37ef2df779f725f926552f8713f7aacfc49e0b359e10f27a5'
  36. '1bf559e49ac64cdf6bff9b003adbe97af1b222d59ec49242545cf13daee07a24'
  37. 'de4cee0e33d3431c985289d8de2844eeb1b1e614e69b7e3b1d6c99e8cda3aa4f')
  38.  
  39. build() {
  40. cd ${pkgname}-${pkgver}
  41.  
  42. ./configure --prefix=/usr --sysconfdir=/etc
  43. make
  44. }
  45.  
  46. package() {
  47. cd ${pkgname}-${pkgver}
  48.  
  49. make DESTDIR="$pkgdir" install
  50.  
  51. # make directory structure
  52. install -dm700 "$pkgdir"/etc/$pkgname
  53. install -dm700 "$pkgdir"/etc/${pkgname}/plugins
  54. install -dm755 "$pkgdir"/usr/share/$pkgname/textdir/{interfaces,services,zones,rules}
  55. install -dm700 "$pkgdir"/var/log/$pkgname
  56.  
  57. # install daemon and log
  58. install -Dm755 ../vuurmuur.rc "$pkgdir"/etc/rc.d/$pkgname
  59.  
  60. # install systemd's files
  61. install -Dm755 ../vuurmuur.script "$pkgdir"/usr/lib/systemd/scripts/vuurmuur
  62. install -Dm644 ../vuurmuur.service "$pkgdir"/usr/lib/systemd/system/vuurmuur.service
  63.  
  64. # install configuration
  65. install -Dm600 "$pkgdir"/usr/share/vuurmuur/config/config.conf.sample \
  66. "$pkgdir"/etc/${pkgname}/config.conf
  67. install -Dm600 ../modules.conf "$pkgdir"/etc/${pkgname}/modules.conf
  68. install -Dm600 "$pkgdir"/usr/share/vuurmuur/config/vuurmuur_conf.conf.sample \
  69. "$pkgdir"/etc/${pkgname}/${pkgname}_conf.conf
  70.  
  71. sed -i "$pkgdir"/etc/${pkgname}/config.conf \
  72. -e 's|"/sbin/tc|"/usr/bin/tc|' \
  73. -e 's|"/sbin/ip6tables|"/usr/bin/ip6tables|' \
  74. -e 's|"/sbin/iptables|"/usr/bin/iptables|' \
  75. -e 's|"/sbin/ip6tables-restore|"/usr/bin/ip6tables-restore|' \
  76. -e 's|"/sbin/iptables-restore|"/usr/bin/iptables-restore|'
  77.  
  78.  
  79. echo "LOCATION=\"/etc/${pkgname}/textdir\"" > "$pkgdir"/etc/${pkgname}/plugins/textdir.conf
  80.  
  81. # default firewall setup in /usr/share
  82. touch "$pkgdir"/usr/share/${pkgname}/textdir/rules/rules.conf
  83. touch "$pkgdir"/usr/share/${pkgname}/textdir/rules/blocklist.conf
  84.  
  85. # cp -R zones/* "$pkgdir"/usr/share/${pkgname}/textdir/zones/
  86. mv "$pkgdir"/usr/share/${pkgname}/services/* "$pkgdir"/usr/share/${pkgname}/textdir/services/
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement