ldns/ldns.spec
2015-09-01 14:42:56 +00:00

205 lines
5.4 KiB
RPMSpec

#
# spec file for package ldns
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: ldns
Version: 1.6.17
Release: 0
#
#
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: libpcap-devel
BuildRequires: openssl-devel
BuildRequires: python-devel
BuildRequires: swig
#
Url: http://www.nlnetlabs.nl/projects/ldns/
Source: http://www.nlnetlabs.nl/downloads/ldns/ldns-%{version}.tar.gz
Patch0: ldns-perl-5.22.patch
#
Summary: A dns library
License: BSD-3-Clause
Group: Development/Libraries/C and C++
%description
The goal of ldns is to simplify DNS programming, it supports recent RFCs like
the DNSSEC documents, and allows developers to easily create software
conforming to current RFCs, and experimental software for current Internet
Drafts. A secondary benefit of using ldns is speed; ldns is written in C it
should be a lot faster than Perl.
This package holds the tools/examples from ldns.
%package -n libldns1
#
Summary: Tools from ldns
Group: Productivity/Networking/DNS/Servers
%description -n libldns1
The goal of ldns is to simplify DNS programming, it supports recent RFCs like
the DNSSEC documents, and allows developers to easily create software
conforming to current RFCs, and experimental software for current Internet
Drafts. A secondary benefit of using ldns is speed; ldns is written in C it
should be a lot faster than Perl.
%package devel
Requires: libldns1 = %{version}
# Openssl-devel is needed as dnssec.h has a #include ssl.h statement.
Requires: openssl-devel
#
Summary: Development files for ldns
Group: Development/Libraries/C and C++
%description devel
The goal of ldns is to simplify DNS programming, it supports recent RFCs like
the DNSSEC documents, and allows developers to easily create software
conforming to current RFCs, and experimental software for current Internet
Drafts. A secondary benefit of using ldns is speed; ldns is written in C it
should be a lot faster than Perl.
This package holds the development files.
%package -n python-ldns
Summary: Python bindings for ldns
Group: Productivity/Networking/DNS/Servers
# doesn't use symbol versioning
Requires: libldns1 >= %version
%description -n python-ldns
Python bindings for ldns library
%package -n perl-DNS-LDNS
Summary: Perl bindings for ldns
Group: Productivity/Networking/DNS/Servers
# doesn't use symbol versioning
Requires: libldns1 >= %version
%description -n perl-DNS-LDNS
Perl bindings for ldns library
%prep
%setup -q
%patch0 -p1
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
%configure \
--disable-rpath \
--disable-static \
--enable-rrtype-ninfo \
--enable-rrtype-rkey \
--enable-rrtype-cds \
--enable-rrtype-uri \
--enable-rrtype-ta \
--with-pyldns \
--with-pyldnsx \
--with-p5-dns-ldns \
--with-drill \
--with-examples \
--with-ca-path=/etc/ssl/certs/
%{__make} %{?_smp_mflags}
%install
make DESTDIR="%{buildroot}" \
install \
install-drill \
install-examples
make DESTDIR="%{buildroot}" \
install-pyldns \
install-pyldnsx
pushd contrib/DNS-LDNS
%perl_make_install
%perl_process_packlist
popd
%{__rm} -v %{buildroot}%{_libdir}/libldns.*a
%{__rm} -v %{buildroot}%{python_sitearch}/*.la
%{__rm} -rfv %{buildroot}%{perl_sitearch}/
#
%fdupes %buildroot%_mandir
%clean
%{__rm} -rf %{buildroot}
%post -n libldns1 -p /sbin/ldconfig
%postun -n libldns1 -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%{_bindir}/drill
%{_bindir}/ldns-chaos
%{_bindir}/ldns-compare-zones
%{_bindir}/ldns-dpa
%{_bindir}/ldns-gen-zone
%{_bindir}/ldns-key2ds
%{_bindir}/ldns-keyfetcher
%{_bindir}/ldns-keygen
%{_bindir}/ldns-mx
%{_bindir}/ldns-notify
%{_bindir}/ldns-nsec3-hash
%{_bindir}/ldns-read-zone
%{_bindir}/ldns-resolver
%{_bindir}/ldns-revoke
%{_bindir}/ldns-rrsig
%{_bindir}/ldns-signzone
%{_bindir}/ldns-test-edns
%{_bindir}/ldns-testns
%{_bindir}/ldns-update
%{_bindir}/ldns-verify-zone
%{_bindir}/ldns-version
%{_bindir}/ldns-walk
%{_bindir}/ldns-zcat
%{_bindir}/ldns-zsplit
%{_bindir}/ldnsd
%{_bindir}/ldns-dane
%{_mandir}/man1/drill.1*
%{_mandir}/man1/ldns*.1*
%files -n libldns1
%defattr(-,root,root,-)
%{_libdir}/libldns.so.1*
%files devel
%defattr(-,root,root,-)
%{_bindir}/ldns-config
%{_includedir}/ldns/
%{_libdir}/libldns.so
%{_mandir}/man3/ldns*.3*
%doc libdns.vim LICENSE README*
%files -n perl-DNS-LDNS
%defattr(-,root,root)
%{perl_vendorarch}/DNS/LDNS.pm
%dir %{perl_vendorarch}/DNS/
%{perl_vendorarch}/DNS/LDNS/
%dir %{perl_vendorarch}/auto/DNS/
%{perl_vendorarch}/auto/DNS/LDNS/
%{_mandir}/man3/DNS::LDNS*3pm*
%files -n python-ldns
%defattr(-,root,root)
%{python_sitearch}/*ldns*
%changelog