LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File libasr.spec of Package libasr (Project home:aredridel)

%define realname libasr
%define realver  1.0.2
%define srcext   tar.gz

%define so_ver   0

# turn off the generation of debuginfo rpm  (RH9) ??
%global debug_package %{nil}

# Use obsolete find-provides instead of rpmdeps
%define _use_internal_dependency_generator 0

# Common info
Name:          %{realname}%{?so_ver}
Version:       %{realver}
Release:       %{?extraver:0.}1%{?rhel:.el%{rhel}}%{?fedora:.fc%{fedora}}
License:       BSD-2-Clause
Group:         System/Libraries
URL:           https://github.com/OpenSMTPD/libasr
Summary:       Free, simple and portable asynchronous resolver library

# Install-time parameters
Provides:      %{realname} = %{version}

# Build-time parameters
BuildRequires: openssl-devel
BuildRoot:     %{_tmppath}/%{name}-root
Source:        https://www.opensmtpd.org/archives/%{realname}-%{realver}%{?extraver}.%{srcext}

libasr is a free, simple and portable asynchronous resolver library.

It allows to run dns queries and perform hostname resolutions in a fully
asynchronous fashion. The implementation is thread-less, fork-less, and does not
make use of signals or other "tricks" that might get in the developer's way.
The API was initially developed for the OpenBSD operating system, where it is
natively supported.

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.

%package -n %{realname}-devel
Group:         Development/Languages/C and C++
Summary:       Development files for %{name}
Requires:      %{name} = %{version}
Provides:      %{name}-devel

%description -n %{realname}-devel
Development files for asynchronous resolver library

# Preparation step (unpackung and patching if necessary)
%setup -q -n %{realname}-%{realver}%{?extraver}

%configure \
 --disable-static \
 --with-cflags="%{optflags}" \
 --with-ldflags="-Wl,--as-needed -Wl,--strip-all"
%{__make} %{?_smp_mflags}

%{__make} install DESTDIR=%{buildroot}
test -d %{buildroot}%{_mandir}/cat3 && %{__mv} -f %{buildroot}%{_mandir}/cat3 %{buildroot}%{_mandir}/man3

[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}


# Development stuff
%files -n %{realname}-devel
%exclude %{_libdir}/*.la
%doc %{_mandir}/man3/*

%post   -p /sbin/ldconfig
%postun -p /sbin/ldconfig