Jelajahi Sumber

ldns-1.7.1-2

Tomohiro "Tomo-p" KATO 2 tahun lalu
induk
melakukan
8681afc239
1 mengubah file dengan 77 tambahan dan 37 penghapusan
  1. 77 37
      l/ldns/ldns-vl.spec

+ 77 - 37
l/ldns/ldns-vl.spec

@@ -1,5 +1,5 @@
-%{?!with_python:      %global with_python      1}
-%{?!enable_gost:      %global enable_gost      1}
+%{?!with_python3:     %global with_python3     0}
+%{?!enable_gost:      %global enable_gost      0}
 %{?!enable_dane:      %global enable_dane      1}
 
 %if %{enable_gost}
@@ -13,11 +13,20 @@ Summary: Lowlevel DNS(SEC) library with API
 Summary(ja): 低レベルな DNS(SEC) ライブラリと API
 Name: ldns
 Version: 1.7.1
-Release: 1%{?_dist_release}
+Release: 2%{?_dist_release}
+Group: system
+Distribution: Vine Linux
+Vendor: Project Vine
+Packager: iwaim
+
 License: BSD
-Url: http://www.nlnetlabs.nl/%{name}/
+URL: http://www.nlnetlabs.nl/%{name}/
 Source: https://www.nlnetlabs.nl/downloads/ldns/%{name}-%{version}.tar.gz
-Group: System Environment/Libraries
+Patch1: ldns-1.7.0-multilib.patch
+Patch2: ldns-1.7.1-autoconf.patch
+Patch3: ldns-1.7.1-python-libs.patch
+Patch4: ldns-1.7.1-openssl-build.patch
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 BuildRequires: libtool, autoconf, automake, gcc-c++, doxygen,
 BuildRequires: perl, libpcap-devel
@@ -26,19 +35,14 @@ BuildRequires: openssl-devel >= 1.0.0
 %else
 BuildRequires: openssl-devel
 %endif
-%if %{with_python}
-BuildRequires: python-rpm-macros
+%if %{with_python3}
+BuildRequires: python3-rpm-macros
+BuildRequires: python3-devel, swig
 %endif
+Obsoletes: ldns-python < 1.7.1-2
 
-Requires: libpcap, openssl
+Requires: ca-certificates
 
-Distribution: Vine Linux
-Vendor: Project Vine
-Packager: iwaim
-
-%if %{with_python}
-BuildRequires:  python-devel, swig
-%endif
 
 %description
 ldns is a library with the aim to simplify DNS programing in C. All
@@ -46,49 +50,79 @@ lowlevel DNS/DNSSEC operations are supported. We also define a higher
 level API which allows a programmer to (for instance) create or sign
 packets.
 
+
 %package devel
 Summary: Development package that includes the ldns header files
-Group: Development/Libraries
+Group: programming
 Requires: %{name} = %{version}-%{release}
 
 %description devel
 The devel package contains the ldns library and the include files
 
-%if %{with_python}
-%package python
-Summary: Python extensions for ldns
-Group: Applications/System
+%if %{with_python3}
+%package -n python3-ldns
+Summary: Python3 extensions for ldns
+Group: programming
 Requires: %{name} = %{version}-%{release}
 
-%description python
-Python extensions for ldns
+%description -n python3-ldns
+Python3 extensions for ldns
 %endif
 
 
+%debug_package
+
+
 %prep
-%setup -q 
+%{?extra_version:%global pkgname %{name}-%{version}%{extra_version}}%{!?extra_version:%global pkgname %{name}-%{version}}
+
+%autosetup -cn %{pkgname} -N
+pushd %{pkgname}
+%patch1 -p2
+%patch2 -p2
+%patch3 -p2
+%patch4 -p2
+
+# fixup .pc file
+sed -i "s/@includedir@/@includedir@\/ldns/" packaging/libldns.pc.in
+
+autoreconf -ivf
+popd
+
 
 %build
+CFLAGS="%{optflags} -fPIC -fno-strict-aliasing"
+CXXFLAGS="%{optflags} -fPIC -fno-strict-aliasing"
+LDFLAGS="$RPM_LD_FLAGS -Wl,-z,now -pie"
+export CFLAGS CXXFLAGS LDFLAGS
+
+pushd %{pkgname}
 %configure --disable-rpath --disable-static \
-%if %{with_python}
- --with-pyldns \
-%endif
+ --enable-ecdsa \
+ --enable-ed25519 --enable-ed448 \
+ --with-ca-file=/etc/pki/tls/certs/ca-bundle.trust.crt \
+ --with-ca-path=/etc/pki/tls/certs/ \
+ --with-trust-anchor=%{_sharedstatedir}/unbound/root.key \
+ --with-examples \
+ --with-drill \
 %if !%{enable_gost}
  --disable-gost \
 %endif
-%if !%{enable_gost}
- --disable-dane-verify \
+%if %{with_python3}
+ --with-pyldns PYTHON=%{__python3}\
 %endif
- --with-sha2
 
 make %{?_smp_mflags} 
 make %{?_smp_mflags} drill
 make %{?_smp_mflags} examples
 make %{?_smp_mflags} doc
+popd
+
 
 %install
 rm -rf %{buildroot}
 
+pushd %{pkgname}
 mkdir -p %{buildroot}%{_libdir}/pkgconfig
 
 make DESTDIR=%{buildroot} INSTALL="%{__install} -p" install 
@@ -96,9 +130,9 @@ make DESTDIR=%{buildroot} INSTALL="%{__install} -p" install-drill
 make DESTDIR=%{buildroot} INSTALL="%{__install} -p" install-examples
 make DESTDIR=%{buildroot} INSTALL="%{__install} -p" install-doc
 
-%if %{with_python}
+%if %{with_python3}
 # remove execute perms from python files
-chmod a-x %{buildroot}%{python_sitearch}/*py
+chmod a-x %{buildroot}%{python3_sitearch}/*py
 %endif
 
 # don't package building script in doc
@@ -109,11 +143,14 @@ rm -rf doc/.svn
 rm -rf doc/man
 
 # remove .la files
-rm -rf %{buildroot}%{_libdir}/*.la %{buildroot}%{python_sitearch}/*.la
+rm -rf %{buildroot}%{_libdir}/*.la %{buildroot}%{python3_sitearch}/*.la
+popd
+
 
 %clean
 rm -rf %{buildroot}
 
+
 %files 
 %defattr(-,root,root)
 %{_libdir}/libldns*so.*
@@ -135,17 +172,20 @@ rm -rf %{buildroot}
 %{_includedir}/ldns/*.h
 %doc doc Changelog README
 
-%if %{with_python}
-%files python
+%if %{with_python3}
+%files python3-ldns
 %defattr(-,root,root)
 %{python_sitearch}/*
 %endif
 
-%post -p /sbin/ldconfig
-
-%postun -p /sbin/ldconfig
 
 %changelog
+* Sat Oct 16 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.7.1-2
+- rebuilt with openssl-3.0.0.
+- imported Patch1-4 from rawhide.
+- dropped ldconfig scriptlets.
+- dropped python support.
+
 * Sat Aug 24 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.7.1-1
 - updated to 1.7.1.