3 %bcond_without static_libs # static library
5 Summary: Free, simple and portable asynchronous resolver library
6 Summary(pl.UTF-8): Wolnodostępna, prosta i przenośna biblioteka asynchronicznego rozwiązywania nazw
12 Source0: https://www.opensmtpd.org/archives/%{name}-%{version}.tar.gz
13 # Source0-md5: 2a2832e8c25683bd17f4ce8b37ba940a
14 URL: https://github.com/OpenSMTPD/libasr
15 # <openssl/opensslv.h> used in openbsd-compat layer
16 BuildRequires: openssl-devel
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 Libasr allows to run DNS queries and perform hostname resolutions in a
21 fully asynchronous fashion. The implementation is thread-less,
22 fork-less, and does not make use of signals or other "tricks" that
23 might get in the developer's way. The API was initially developed for
24 the OpenBSD operating system, where it is natively supported.
26 This library is intended to bring this interface to other systems. It
27 is originally provided as a support library for the portable version
28 of the OpenSMTPD daemon, but it can be used in any other contexts.
30 %description -l pl.UTF-8
31 Libasr pozwala na wykonywanie zapytań DNS i rozwiązywanie nazw hostów
32 w sposób całkowicie asynchroniczny. Implementacja jest bezwątkowa, nie
33 tworzy nowych procesów i nie wykorzystuje sygnałów ani innych
34 "sztuczek", mogących przeszkadzać programistom. API było początkowo
35 projektowane dla systemu OpenBSD i tam jest obsługiwane natywnie.
37 Biblitoteka ma na celu dostarczenie tego interfejsu dla innych
38 systemów. Pierwotnie powstała jako biblioteka wspierająca dla
39 przenośnej wersji demona OpenSMTPD, ale może być używana także w
40 innych zastosowaniach.
43 Summary: Development files for libasr library
44 Summary(pl.UTF-8): Pliki programistyczne biblioteki libasr
45 Group: Development/Libraries
46 Requires: %{name} = %{version}-%{release}
49 This package contains the header file for developing with libasr.
51 %description devel -l pl.UTF-8
52 Ten pakiet zawiera pliki nagłówkowe do tworzenia programów z
53 wykorzystaniem libasr.
56 Summary: Static libasr library
57 Summary(pl.UTF-8): Statyczna biblioteka libasr
58 Group: Development/Libraries
59 Requires: %{name}-devel = %{version}-%{release}
62 Static libasr library.
64 %description static -l pl.UTF-8
65 Statyczna biblioteka libasr.
72 %{!?with_static_libs:--disable-static} \
78 rm -rf $RPM_BUILD_ROOT
81 DESTDIR=$RPM_BUILD_ROOT
83 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libasr.la
85 # FIXME: somehow libtool installs this with -m 644 (ltmain.sh seems patched?)
86 chmod a+x $RPM_BUILD_ROOT%{_libdir}/libasr.so.*
89 rm -rf $RPM_BUILD_ROOT
91 %post -p /sbin/ldconfig
92 %postun -p /sbin/ldconfig
95 %defattr(644,root,root,755)
96 %doc ChangeLog LICENCE README.md
97 %attr(755,root,root) %{_libdir}/libasr.so.*.*.*
98 %attr(755,root,root) %ghost %{_libdir}/libasr.so.0
101 %defattr(644,root,root,755)
102 %attr(755,root,root) %{_libdir}/libasr.so
104 %{_mandir}/man3/asr_run.3*
106 %if %{with static_libs}
108 %defattr(644,root,root,755)