]>
Commit | Line | Data |
---|---|---|
bd6152be JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library | |
4 | ||
e48cff68 | 5 | Summary: Free, simple and portable asynchronous resolver library |
bd6152be | 6 | Summary(pl.UTF-8): Wolnodostępna, prosta i przenośna biblioteka asynchronicznego rozwiązywania nazw |
e48cff68 | 7 | Name: libasr |
b94abb72 | 8 | Version: 1.0.4 |
20877221 | 9 | Release: 1 |
bd6152be | 10 | License: ISC, BSD |
e48cff68 ER |
11 | Group: Libraries |
12 | Source0: https://www.opensmtpd.org/archives/%{name}-%{version}.tar.gz | |
b94abb72 | 13 | # Source0-md5: ad76b488a19de962efd2e1c57e45a13a |
e48cff68 | 14 | URL: https://github.com/OpenSMTPD/libasr |
bd6152be | 15 | # <openssl/opensslv.h> used in openbsd-compat layer |
e48cff68 ER |
16 | BuildRequires: openssl-devel |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
18 | ||
19 | %description | |
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. | |
25 | ||
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. | |
29 | ||
bd6152be JB |
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. | |
36 | ||
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. | |
41 | ||
e48cff68 | 42 | %package devel |
bd6152be JB |
43 | Summary: Development files for libasr library |
44 | Summary(pl.UTF-8): Pliki programistyczne biblioteki libasr | |
e48cff68 ER |
45 | Group: Development/Libraries |
46 | Requires: %{name} = %{version}-%{release} | |
47 | ||
48 | %description devel | |
bd6152be JB |
49 | This package contains the header file for developing with libasr. |
50 | ||
51 | %description devel -l pl.UTF-8 | |
52 | Ten pakiet zawiera pliki nagłówkowe do tworzenia programów z | |
53 | wykorzystaniem libasr. | |
54 | ||
55 | %package static | |
56 | Summary: Static libasr library | |
57 | Summary(pl.UTF-8): Statyczna biblioteka libasr | |
58 | Group: Development/Libraries | |
59 | Requires: %{name}-devel = %{version}-%{release} | |
60 | ||
61 | %description static | |
62 | Static libasr library. | |
63 | ||
64 | %description static -l pl.UTF-8 | |
65 | Statyczna biblioteka libasr. | |
e48cff68 ER |
66 | |
67 | %prep | |
68 | %setup -q | |
69 | ||
70 | %build | |
71 | %configure \ | |
bd6152be | 72 | %{!?with_static_libs:--disable-static} \ |
e48cff68 ER |
73 | --with-mantype=man |
74 | ||
75 | %{__make} | |
76 | ||
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
bd6152be | 79 | |
e48cff68 ER |
80 | %{__make} install \ |
81 | DESTDIR=$RPM_BUILD_ROOT | |
82 | ||
bd6152be | 83 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libasr.la |
e48cff68 | 84 | |
b94abb72 JB |
85 | # not installed as of 1.0.4 |
86 | install -d $RPM_BUILD_ROOT%{_mandir}/man3 | |
87 | cp -p src/asr_run.3 $RPM_BUILD_ROOT%{_mandir}/man3 | |
e48cff68 ER |
88 | |
89 | %clean | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
92 | %post -p /sbin/ldconfig | |
93 | %postun -p /sbin/ldconfig | |
94 | ||
95 | %files | |
96 | %defattr(644,root,root,755) | |
97 | %doc ChangeLog LICENCE README.md | |
98 | %attr(755,root,root) %{_libdir}/libasr.so.*.*.* | |
bd6152be | 99 | %attr(755,root,root) %ghost %{_libdir}/libasr.so.0 |
e48cff68 ER |
100 | |
101 | %files devel | |
102 | %defattr(644,root,root,755) | |
bd6152be | 103 | %attr(755,root,root) %{_libdir}/libasr.so |
e48cff68 | 104 | %{_includedir}/asr.h |
20877221 | 105 | %{_mandir}/man3/asr_run.3* |
bd6152be JB |
106 | |
107 | %if %{with static_libs} | |
108 | %files static | |
109 | %defattr(644,root,root,755) | |
110 | %{_libdir}/libasr.a | |
111 | %endif |