]> git.pld-linux.org Git - packages/libasr.git/commitdiff
- cleanup, pl, added -static
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 27 Sep 2019 18:16:06 +0000 (20:16 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 27 Sep 2019 18:16:06 +0000 (20:16 +0200)
libasr.spec

index c3b45b704a0e5a37285072da85d0586488332a9e..a43cb08fa5fd7bb7246edbf8b179f416f0990f05 100644 (file)
@@ -1,12 +1,18 @@
+#
+# Conditional build:
+%bcond_without static_libs     # static library
+
 Summary:       Free, simple and portable asynchronous resolver 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
 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
 Group:         Libraries
 Source0:       https://www.opensmtpd.org/archives/%{name}-%{version}.tar.gz
 # Source0-md5: 2a2832e8c25683bd17f4ce8b37ba940a
 URL:           https://github.com/OpenSMTPD/libasr
+# <openssl/opensslv.h> used in openbsd-compat layer
 BuildRequires: openssl-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 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.
 
 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
 %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
 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 \
 
 %prep
 %setup -q
 
 %build
 %configure \
-       --enable-shared \
-       --disable-static \
+       %{!?with_static_libs:--disable-static} \
        --with-mantype=man
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
        --with-mantype=man
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
 %{__make} install \
        DESTDIR=$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
 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.*.*.*
 %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)
 
 %files devel
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libasr.so
 %{_includedir}/asr.h
 %{_includedir}/asr.h
-%{_libdir}/libasr.so
 %{_mandir}/man3/asr_run.3*
 %{_mandir}/man3/asr_run.3*
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libasr.a
+%endif
This page took 0.083846 seconds and 4 git commands to generate.