File argus-pep-api-c.spec of Package argus-pep-api-c
Name: argus-pep-api-c
Version: 2.3.0
Release: 1%{?dist}
Summary: Argus PEP client library
License: Apache-2.0
Group: System/Libraries
URL: https://twiki.cern.ch/twiki/bin/view/EGEE/AuthorizationFramework
Source0: https://argus-authz.github.com/%{name}/distrib/%{name}-%{version}.tar.gz
Source1: %{name}-rpmlintrc
# BuildRoot is still required for EPEL5
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
# SL5 curl-devel, SL6 libcurl-devel
%if %{?rhel}%{!?rhel:6} <= 5
BuildRequires: curl-devel
%else
BuildRequires: libcurl-devel
%endif
%description
The Argus PEP client API for C is a multi-thread friendly client library used
to communicate with the Argus PEP Server. It authorizes request and receives
authorization response back from Argus.
%package devel
Group: Development/Libraries/C and C++
Summary: Argus PEP client development libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
# the pkgconfig requirement is only necessary for EPEL5 and below;
# it's automatic for Fedora and EPEL6.
# EPEL5 doesn't correctly find the pkgconfig(libcurl) dependency.
# Make sure to only do this only on rhel.
%if %{?rhel}%{!?rhel:6} <= 5
Requires: pkgconfig
Requires: curl-devel%{?_isa}
%endif
%description devel
The Argus PEP client API for C is a multi-thread friendly client library used
to communicate with the Argus PEP Server. It authorizes request and receives
authorization response back from Argus.
This package contains the development libraries.
%prep
%setup -q
%build
%configure
# The following two lines were suggested by
# https://fedoraproject.org/wiki/Packaging/Guidelines to prevent any
# RPATHs creeping in.
# https://fedoraproject.org/wiki/Common_Rpmlint_issues#unused-direct-shlib-dependency
# to prevent unnecessary linking
%define fixlibtool() sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool\
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool\
sed -i -e 's! -shared ! -Wl,--as-needed\\0!g' libtool
%fixlibtool
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
# Patch .pc file
sed -i 's/^Requires: libcurl/Requires.private: libcurl/' \
%{buildroot}%{_libdir}/pkgconfig/libargus-pep.pc
# clean up installed documentation, will be done using doc macro
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%{_libdir}/libargus-pep.so.2.1.0
%{_libdir}/libargus-pep.so.2
%doc AUTHORS COPYING LICENSE README ChangeLog
%files devel
%{_libdir}/libargus-pep.so
%{_libdir}/pkgconfig/libargus-pep.pc
%dir %{_includedir}/argus
%{_includedir}/argus/error.h
%{_includedir}/argus/xacml.h
%{_includedir}/argus/pep.h
%{_includedir}/argus/pip.h
%{_includedir}/argus/oh.h
%{_includedir}/argus/profiles.h
%doc src/example
%changelog
* Fri May 9 2014 Mischa Salle <msalle@nikhef.nl> 2.3.0-1
- Update source URL
- Update version
* Fri Feb 14 2014 Mischa Salle <msalle@nikhef.nl> 2.2.0-3
- Fix checking of EPEL/Fedora version.
* Fri Feb 14 2014 Mischa Salle <msalle@nikhef.nl> 2.2.0-2
- Update buildroot, keep it for EPEL5
- Use name macro where possible
- Add arch to requires
- Add requirement on pkg-config for EPEL5, still need curl-devel requirement in
devel package
- Prevent unnecessary linking
- Patch pc file to use Requires.private
- Remove defattr
- Put src/example in devel package (as in Valery's version).
* Fri Dec 7 2012 Mischa Salle <msalle@nikhef.nl> 2.2.0-1
- Merge in changes from Valery Tschopp: el5/el6 differences, new location source
- Update version
* Tue Oct 4 2011 Mischa Salle <msalle@nikhef.nl> 2.0.3-2
- Initial build.