Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:indimail
tinydnssec
_service:extract_file:PKGBUILD
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:extract_file:PKGBUILD of Package tinydnssec
# Maintainer: Manvendra Bhangui <tinydnssec@indimail.org> pkgname=tinydnssec pkgver=1.1.0 pkgrel=1.1 pkgdesc="A collection of Domain Name System tools" arch=('i686' 'x86_64') url="https://github.com/mbhangui/tinydnssec" license=('GPL2') groups=('base-devel') depends=('coreutils' 'findutils' 'sed' 'binutils') makedepends=('libqmail' 'libsodium' 'libev' 'gzip') source=("$pkgname-${pkgver}.tar.gz") sha256sums=('SKIP') provides=("pkgname") options=('strip' '!libtool' 'docs' 'staticlibs' 'zipman' 'debug') backup=('etc/indimail/dnsroots.global' 'etc/indimail/curvedns.private.key') install=archpkg.install changelog=$pkgname.changes _prefix=/usr _curvedns_version=0.88 _mandir=${_prefix}/share/man _sysconfdir=/etc/indimail _libexecdir=/usr/libexec/indimail _servicedir=/service build() { cd $srcdir/$pkgname-${pkgver} ./default.configure make -s if [ -d dq-20161210 ] ; then cd dq-20161210 make -s cd .. fi if [ -d curvedns-${_curvedns_version} ] ; then echo "configuring curvedns" cd curvedns-${_curvedns_version} ./default.configure make -s cd .. fi } package() { depends=('daemontools') cd $srcdir/$pkgname-${pkgver} sed -i 's|/sbin|/bin|g' SBIN sed -i 's|/sbin|/bin|g' SBIN.extra sed -i '/sbin/d' DIRS.in install -D -m 0644 ${pkgname}.changes "$pkgdir"${_prefix}/share/doc/${pkgname}/${pkgname}.changes make -s DESTDIR=${pkgdir} install ./installer -fc ${pkgdir} < DIRS ./installer -fc ${pkgdir}${_prefix} < BIN ./installer -fc ${pkgdir}${_prefix} < SBIN ./installer -fc ${pkgdir}${_libexecdir} < LIBEXEC ./installer -fc ${pkgdir}${_sysconfdir} < ETC ./installer -fc ${pkgdir}${_prefix}/share/man < MAN if [ -d dq-20161210 ] ; then cd dq-20161210 echo "/usr/bin" > conf-sbin sh make-install.sh ${pkgdir} cd .. fi if [ -d curvedns-${_curvedns_version} ] ; then cd curvedns-${_curvedns_version} make -s DESTDIR=${pkgdir} install fi cd $srcdir ( echo "NAME=${pkgname}" echo "Description=\"A collection of Domain Name System tools\"" echo "tinydnssec_version="${pkgver}-${pkgrel}"" echo "ID=${pkgname}" echo "HOME_URL=\"https://github.com/mbhangui/tinydnssec\"" echo "PACKAGE_BUGREPORT=\"'Manvendra Bhangui <tinydnssec@indimail.org>'\"" ) > ${pkgname}-release install -D -m 0644 ${pkgname}-release "$pkgdir"${_rcdir}/${pkgname}-release } #### INSTALL SCRIPTS ##### _prefix=/usr _sysconfdir=/etc/indimail _servicedir=/service stop_service() { if [ -f ${_prefix}/bin/svstat ] ; then for i in tinydns tinydns/log dnscache dnscache/log curvedns curvedns/log dqcache dqcache/log do ${_prefix}/bin/svstat ${_sysconfdir}/$i >/dev/null 2>&1 if [ $? -eq 0 ] ; then touch ${_sysconfdir}/$i/.down ${_prefix}/bin/svc -d ${_sysconfdir}/$i >/dev/null 2>&1 fi done fi } pre_install() { for i in dnscache tinydns do rm -f /var/spool/mail/$i /usr/bin/getent passwd $i > /dev/null || /usr/sbin/useradd -l -M -g nofiles -d ${_sysconfdir} -s /sbin/nologin $i || true done } configure_resolvconf() { dnscache_configured=0 if [ -d ${_sysconfdir}/dnscache ] ; then dnscache_configured=1 if [ -d ${_servicedir} ] ; then if [ ! -h ${_servicedir}/dnscache ] ; then ln -sf ${_sysconfdir}/dnscache ${_servicedir}/dnscache || true if [ $? -ne 0 ] ; then dnscache_configured=0 fi fi elif [ -h ${_servicedir} ] ; then dir=`readlink ${_servicedir}` if [ -d $dir ] ; then if [ ! -h $dir/dnscache ] ; then ln -sf ${_sysconfdir}/dnscache $dir/dnscache || true if [ $? -ne 0 ] ; then dnscache_configured=0 fi fi fi fi fi if [ $dnscache_configured -eq 1 ] ; then if [ -d ${_servicedir}/.svscan ] ; then mkdir -p ${_servicedir}/.svscan/variables echo > ${_servicedir}/.svscan/variables/UNSHARE # used by svscanboot if [ -x /usr/bin/unshare -a -x ${_servicedir}/dnscache/run ] ; then if [ -f ${_servicedir}/.svscan/run ] ; then /bin/chmod +x ${_servicedir}/.svscan/run fi fi fi grep resolvconf ${_servicedir}/.svscan/variables/.options > /dev/null 2>&1 if [ $? -ne 0 ] ; then options="`cat ${_servicedir}/.svscan/variables/.options`" options="$options --resolvconf" mv ${_servicedir}/.svscan/variables/.options \ ${_servicedir}/.svscan/variables/.options.noresolvconf echo $options > ${_servicedir}/.svscan/variables/.options if [ -d ${_servicedir}/resolvconf/variables ] ; then echo $options > ${_servicedir}/resolvconf/variables/.options fi if [ -x ${_prefix}/sbin/minisvc ] ; then ${_prefix}/sbin/minisvc --refreshsvc=/service/.svscan fi fi fi } post_install() { dnscache_configured=0 if [ ! -d ${_sysconfdir}/dnscache ] ; then ${_prefix}/sbin/dnscache-conf dnscache qmaill ${_sysconfdir}/dnscache 127.0.0.1 if [ $? -eq 0 ] ; then dnscache_configured=1 if [ -d ${_servicedir} ] ; then if [ ! -h /service/dnscache ] ; then ln -s ${_sysconfdir}/dnscache /service/dnscache if [ $? -ne 0 ] ; then dnscache_configured=0 fi fi elif [ -h ${_servicedir} ] ; then dir=`readlink ${_servicedir}` if [ -d $dir ] ; then if [ ! -h ${_servicedir}/dnscache ] ; then ln -sf ${_sysconfdir}/dnscache ${_servicedir}/dnscache || true if [ $? -ne 0 ] ; then dnscache_configured=0 fi fi fi fi else echo "${_prefix}/sbin/dnscache-conf dnscache qmaill ${_sysconfdir}/dnscache 127.0.0.1: failed" fi else dnscache_configured=1 if [ ! -h /service/dnscache ] ; then ln -s ${_sysconfdir}/dnscache /service/dnscache fi fi for i in tinydns dqcache curvedns do if [ " $i" = " dqcache" ] ; then acct=dnscache else acct=tinydns fi if [ " $i" = " curvedns" ] ; then ip=x.x.x.x else ip=127.0.0.1 fi if [ ! -d ${_sysconfdir}/$i ] ; then ${_prefix}/sbin/$i-conf $acct qmaill ${_sysconfdir}/$i $ip if [ ! " $i" = " curvedns" ] ; then continue fi if [ -d ${_sysconfdir}/$i ] ; then mask=`umask` umask 077 # Generate private key sed -n \$p ${_sysconfdir}/curvedns.private.key > ${_sysconfdir}/$i/curvedns.keygen /bin/sh ${_sysconfdir}/$i/curvedns.keygen && rm -f ${_sysconfdir}/$i/curvedns.keygen umask $mask fi fi done } post_upgrade() { configure_resolvconf if [ -f ${_prefix}/bin/svok ] ; then for i in tinydns tinydns/log dnscache dnscache/log curvedns curvedns/log dqcache dqcache/log do ${_prefix}/bin/svok ${_sysconfdir}/$i >/dev/null 2>&1 if [ $? -eq 0 -a -f ${_sysconfdir}/$i/.down ] ; then rm -f ${_sysconfdir}/$i/.down ${_prefix}/bin/svc -u ${_sysconfdir}/$i >/dev/null 2>&1 fi done fi }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor