### this file is sourced not run
PKGVER=2.1.12
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=dnscrypt-proxy-linux_x86_64-$PKGVER.tar.gz
MD5SUM=dfb9f66733fc4ae8b8ac5638bb6c7574
SRC_URL=https://github.com/DNSCrypt/dnscrypt-proxy/releases/download/$PKGVER/$TARBALL
BUNDLE=

SLACKREQ=
SLACKDESC="dnscrypt-proxy: dnscrypt-proxy $PKGVER (Secure DNS proxy)
dnscrypt-proxy: 
dnscrypt-proxy: A flexible DNS proxy, with support for modern encrypted DNS protocols 
dnscrypt-proxy: such as DNSCrypt v2, DNS-over-HTTPS, Anonymized DNSCrypt and ODoH 
dnscrypt-proxy: (Oblivious DoH).
dnscrypt-proxy:
dnscrypt-proxy: This is a repackaging of the official binary.
dnscrypt-proxy: 
dnscrypt-proxy: https://github.com/DNSCrypt/dnscrypt-proxy
dnscrypt-proxy: 
dnscrypt-proxy: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/linux* &&
	
	# main binary
	install -m755 dnscrypt-proxy /usr/bin &&
	
	# main example config file
	install -m644 example-dnscrypt-proxy.toml /etc/dnscrypt-proxy.toml &&
	
	# other stuff we don't know yet, parked it under here
	mkdir /usr/share/dnscrypt-proxy &&
	install -m644 *.txt localhost.pem LICENSE /usr/share/dnscrypt-proxy &&
	
	# config and initscript 
	echo nameserver 127.0.0.1 > /etc/resolv.conf.head &&
	mkdir -p /etc/init.d &&
	install -m644 /tmp/pkg/99-dnscrypt-proxy /etc/init.d # disable by default

	pkg_build_slackdesc
}
