]> git.pld-linux.org Git - packages/libasr.git/blob - libasr.spec
- cleanup, pl, added -static
[packages/libasr.git] / libasr.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
4
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
7 Name:           libasr
8 Version:        1.0.2
9 Release:        1
10 License:        ISC, BSD
11 Group:          Libraries
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)
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
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
42 %package devel
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}
47
48 %description devel
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.
66
67 %prep
68 %setup -q
69
70 %build
71 %configure \
72         %{!?with_static_libs:--disable-static} \
73         --with-mantype=man
74
75 %{__make}
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79
80 %{__make} install \
81         DESTDIR=$RPM_BUILD_ROOT
82
83 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libasr.la
84
85 # FIXME: somehow libtool installs this with -m 644 (ltmain.sh seems patched?)
86 chmod a+x $RPM_BUILD_ROOT%{_libdir}/libasr.so.*
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %post   -p /sbin/ldconfig
92 %postun -p /sbin/ldconfig
93
94 %files
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
99
100 %files devel
101 %defattr(644,root,root,755)
102 %attr(755,root,root) %{_libdir}/libasr.so
103 %{_includedir}/asr.h
104 %{_mandir}/man3/asr_run.3*
105
106 %if %{with static_libs}
107 %files static
108 %defattr(644,root,root,755)
109 %{_libdir}/libasr.a
110 %endif
This page took 0.076622 seconds and 3 git commands to generate.