SPECS/bindutils/bindutils.spec
f4d17450
 Summary:	Domain Name System software
 Name:		bindutils
fccca5af
 Version:	9.10.4
52d2668a
 Release:	2%{?dist}
f4d17450
 License:	ISC
 URL:		http://www.isc.org/downloads/bind/
fccca5af
 Source0:	ftp://ftp.isc.org/isc/bind9/%{version}-P1/bind-%{version}-P1.tar.gz
 %define sha1 bind=b3e4ba2ec08c37bb432f82e1a532a74967530cef
f4d17450
 Group:		Development/Tools
 Vendor:		VMware, Inc.
 Distribution:	Photon
 Requires:	openssl
52d2668a
 Requires:	shadow
f4d17450
 BuildRequires:	openssl-devel
 %description
 BIND is open source software that implements the Domain Name System (DNS) protocols 
 for the Internet. It is a reference implementation of those protocols, but it is 
 also production-grade software, suitable for use in high-volume and high-reliability applications.
 %prep
fccca5af
 %setup -qn bind-%{version}-P1
f4d17450
 %build
 ./configure \
 	--prefix=%{_prefix}
 make -C lib/dns %{?_smp_mflags}
 make -C lib/isc %{?_smp_mflags}
 make -C lib/bind9 %{?_smp_mflags}
 make -C lib/isccfg %{?_smp_mflags}
 make -C lib/lwres %{?_smp_mflags}
 make -C bin/dig %{?_smp_mflags}
 %install
 make -C bin/dig DESTDIR=%{buildroot} install
 find %{buildroot} -name '*.la' -delete
78ba12b1
 mkdir -p %{buildroot}/%{_sysconfdir}
 mkdir -p %{buildroot}/%{_prefix}/lib/tmpfiles.d
 cat << EOF >> %{buildroot}/%{_sysconfdir}/named.conf
 zone "." in {
     type master;
     allow-update {none;}; // no DDNS by default
 };
 EOF
 echo "d /run/named 0755 named named - -" > %{buildroot}/%{_prefix}/lib/tmpfiles.d/named.conf
2e8486dc
 
 %pre
 if ! getent group named >/dev/null; then
     groupadd -r named
 fi
 if ! getent passwd named >/dev/null; then
     useradd -g named -d /var/lib/bind\
         -s /bin/false -M -r named
 fi
 %post -p /sbin/ldconfig
 
 %postun	
 /sbin/ldconfig
 if getent passwd named >/dev/null; then
     userdel named
 fi
 if getent group named >/dev/null; then
     groupdel named
 fi
 
f4d17450
 %files
 %defattr(-,root,root)
 %{_bindir}/*
 %{_mandir}/man1/*
78ba12b1
 %{_sysconfdir}/*
 %{_prefix}/lib/tmpfiles.d/named.conf
 
f4d17450
 
 %changelog
52d2668a
 *	Mon Nov 21 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 9.10.4-2
 -	add shadow to requires
fccca5af
 *	Mon Jun 06 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 9.10.4-1
 -	Upgraded the version to 9.10.4
c3a3fd12
 *	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 9.10.3-3
 -	GA - Bump release of all rpms
2e8486dc
 *   Fri Apr 29 2016 Xiaolin Li <xiaolinl@vmware.com> 9.10.3-2
 -   Add group named and user named
30aed4f1
 *   Thu Jan 21 2016 Xiaolin Li <xiaolinl@vmware.com> 9.10.3-1
 -   Updated to version 9.10.3
bb84a5d2
 *	Tue Aug 11 2015 Divya Thaluru <dthaluru@vmware.com> 9.10.1-1
 -	Fixing release 
f4d17450
 *	Tue Jan 20 2015 Divya Thaluru <dthaluru@vmware.com> 9.10.1-P1
 -	Initial build. First version