### this file is sourced not run
PKGBUILD=1
PKGARCH=noarch

# source: james
#PKGVER=
#TARBALL=
#MD5SUM=
#SRC_URL=
#BUNDLE=

# git-master tarball
PKGVER=2021.01
MD5SUM=f8f096be561724663f0f113b604a055a
hash=158901665f1aaed94b7598838df9a88e35365025
hash7=${hash#???????}; hash7=${hash%$hash7}
TARBALL=eztables-$PKGVER-$hash7.tar.gz
SRC_URL=https://github.com/louwrentius/eztables/archive/$hash.tar.gz

SLACKREQ='iptables' # 
SLACKDESC="eztables-firewall: eztables-firewall $PKGVER (Easy Firewall)  
eztables-firewall:  
eztables-firewall: Eztables is a simple yet powerful firewall configuration 
eztables-firewall: for Linux. It enables you to quickly configure a firewall 
eztables-firewall: without ever touching iptables. The firewall rule syntax is 
eztables-firewall: designed to be easy to read and to apply.  
eztables-firewall: 
eztables-firewall: http://eztables.net/
eztables-firewall: 
eztables-firewall: 
eztables-firewall: 
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/eztables* &&
	# patch -Np1 -i $CHROOT_DIR/tmp/pkg/eztables-ifconfig.patch && # updated upstream since commit 897454cdfdc5b989590581832e3cbb6906372acc
	true
}
### package - use out default config and initscript
pkg_package() {
	rm etc/init.d/eztables &&
	cp tmp/pkg/55-eztables etc/init.d &&
	cp tmp/pkg/eztables.cfg etc/eztables &&
	chmod -x etc/init.d/55-eztables # disable by default
}

### build
pkg_build() {
	cd /tmp/eztables*
		
	mkdir -p /etc/init.d &&
	./install.sh &&
		
	mkdir -p /usr/share/doc/eztables &&
	cp *.md /usr/share/doc/eztables &&
	pkg_build_slackdesc
}
