From bd6152be686ebe4f4de5ca14ed4387c0934d4344 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Fri, 27 Sep 2019 20:16:06 +0200 Subject: [PATCH] - cleanup, pl, added -static --- libasr.spec | 60 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 50 insertions(+), 10 deletions(-) diff --git a/libasr.spec b/libasr.spec index c3b45b7..a43cb08 100644 --- a/libasr.spec +++ b/libasr.spec @@ -1,12 +1,18 @@ +# +# Conditional build: +%bcond_without static_libs # static library + Summary: Free, simple and portable asynchronous resolver library +Summary(pl.UTF-8): Wolnodostępna, prosta i przenośna biblioteka asynchronicznego rozwiązywania nazw Name: libasr Version: 1.0.2 Release: 1 -License: BSD +License: ISC, BSD Group: Libraries Source0: https://www.opensmtpd.org/archives/%{name}-%{version}.tar.gz # Source0-md5: 2a2832e8c25683bd17f4ce8b37ba940a URL: https://github.com/OpenSMTPD/libasr +# used in openbsd-compat layer BuildRequires: openssl-devel BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -21,34 +27,62 @@ This library is intended to bring this interface to other systems. It is originally provided as a support library for the portable version of the OpenSMTPD daemon, but it can be used in any other contexts. +%description -l pl.UTF-8 +Libasr pozwala na wykonywanie zapytań DNS i rozwiązywanie nazw hostów +w sposób całkowicie asynchroniczny. Implementacja jest bezwątkowa, nie +tworzy nowych procesów i nie wykorzystuje sygnałów ani innych +"sztuczek", mogących przeszkadzać programistom. API było początkowo +projektowane dla systemu OpenBSD i tam jest obsługiwane natywnie. + +Biblitoteka ma na celu dostarczenie tego interfejsu dla innych +systemów. Pierwotnie powstała jako biblioteka wspierająca dla +przenośnej wersji demona OpenSMTPD, ale może być używana także w +innych zastosowaniach. + %package devel -Summary: Development files for %{name} +Summary: Development files for libasr library +Summary(pl.UTF-8): Pliki programistyczne biblioteki libasr Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel -This package contains the header files and libraries for developing -with %{name}. +This package contains the header file for developing with libasr. + +%description devel -l pl.UTF-8 +Ten pakiet zawiera pliki nagłówkowe do tworzenia programów z +wykorzystaniem libasr. + +%package static +Summary: Static libasr library +Summary(pl.UTF-8): Statyczna biblioteka libasr +Group: Development/Libraries +Requires: %{name}-devel = %{version}-%{release} + +%description static +Static libasr library. + +%description static -l pl.UTF-8 +Statyczna biblioteka libasr. %prep %setup -q %build %configure \ - --enable-shared \ - --disable-static \ + %{!?with_static_libs:--disable-static} \ --with-mantype=man %{__make} %install rm -rf $RPM_BUILD_ROOT + %{__make} install \ DESTDIR=$RPM_BUILD_ROOT -rm $RPM_BUILD_ROOT%{_libdir}/libasr.la +%{__rm} $RPM_BUILD_ROOT%{_libdir}/libasr.la -# FIXME: somehow libtool installs this with -m 644 +# FIXME: somehow libtool installs this with -m 644 (ltmain.sh seems patched?) chmod a+x $RPM_BUILD_ROOT%{_libdir}/libasr.so.* %clean @@ -61,10 +95,16 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %doc ChangeLog LICENCE README.md %attr(755,root,root) %{_libdir}/libasr.so.*.*.* -%ghost %{_libdir}/libasr.so.0 +%attr(755,root,root) %ghost %{_libdir}/libasr.so.0 %files devel %defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libasr.so %{_includedir}/asr.h -%{_libdir}/libasr.so %{_mandir}/man3/asr_run.3* + +%if %{with static_libs} +%files static +%defattr(644,root,root,755) +%{_libdir}/libasr.a +%endif -- 2.43.0