summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Cromer2016-09-04 16:19:40 -0300
committerChris Cromer2016-09-04 16:19:40 -0300
commit0dc1f4368e22be8f3881e525851d67741645e783 (patch)
tree203502243b04ce3fbe2987ae71b88bdf18c7c607
downloadaur-firewalld-openrc.tar.gz
intial commit
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD32
-rw-r--r--firewalld-openrc.install16
-rw-r--r--firewalld.init13
4 files changed, 80 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..470938a17b4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = firewalld-openrc
+ pkgdesc = OpenRC scripts for firewalld.
+ pkgver = 1.0
+ pkgrel = 2
+ url = https://github.com/cromerc/arch-openrc
+ arch = any
+ license = GPL2
+ depends = firewalld
+ depends = openrc
+ provides = firewalld-openrc
+ source = firewalld.init
+ sha256sums = 96593cc0e8efcb60b0aa6b9e994dae31ec31cd812aca1145b7829b0a40e0dfa6
+
+pkgname = firewalld-openrc
+ pkgdesc = OpenRC scripts for firewalld.
+ install = firewalld-openrc.install
+ depends = firewalld
+ depends = openrc
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..4e9b93e279c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Chris Cromer <chris@cromer.cl>
+
+pkgname=firewalld-openrc
+pkgver=1.0
+pkgrel=2
+pkgdesc="OpenRC scripts for firewalld."
+arch=('any')
+provides=('firewalld-openrc')
+pkgname=('firewalld-openrc')
+depends=('firewalld' 'openrc')
+url="https://github.com/cromerc/arch-openrc"
+license=("GPL2")
+source=("firewalld.init")
+sha256sums=('96593cc0e8efcb60b0aa6b9e994dae31ec31cd812aca1145b7829b0a40e0dfa6')
+
+_inst_initd(){
+ install -Dm755 firewalld.init ${pkgdir}/etc/init.d/firewalld
+
+ sed -e 's|#!/sbin/runscript|#!/usr/bin/openrc-run|' \
+ -e 's|#!/sbin/openrc-run|#!/usr/bin/openrc-run|' \
+ -e 's|/var/run|/run|g' \
+ -e 's|/usr/sbin|/usr/bin|g' \
+ -i ${pkgdir}/etc/init.d/$1
+}
+
+package_firewalld-openrc() {
+ pkgdesc="OpenRC scripts for firewalld."
+ depends=('firewalld' 'openrc')
+ install=firewalld-openrc.install
+
+ _inst_initd 'firewalld'
+}
diff --git a/firewalld-openrc.install b/firewalld-openrc.install
new file mode 100644
index 00000000000..ddab9e43a17
--- /dev/null
+++ b/firewalld-openrc.install
@@ -0,0 +1,16 @@
+_svc="firewalld"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/firewalld.init b/firewalld.init
new file mode 100644
index 00000000000..b1d7d15d985
--- /dev/null
+++ b/firewalld.init
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="FirewallD"
+command=/usr/sbin/firewalld
+pidfile=/var/run/firewalld.pid
+
+depend() {
+ need dbus
+ provide iptables ip6tables ebtables
+}