Advertisement
ratamahata

AURModPKGBLDvrmr0.8-1

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