# define name of the scl %global scl python27 %scl_package %scl # Defaults for the values for the python27/rh-python35 Software Collection. These # will be used when python27-scldevel (or rh-python35-scldevel) is not in the # build root %{!?scl_python:%global scl_python python27} %{!?scl_no_vendor:%global scl_no_vendor python27} %{!?scl_prefix_python:%global scl_prefix_python %{scl_python}-} # Only for this build, you need to override default __os_install_post, # because the default one would find /opt/.../lib/python2.7/ and try # to bytecompile with the system /usr/bin/python2.7 %global __os_install_post %{%{scl_no_vendor}_os_install_post} # Similarly, override __python_requires for automatic dependency generator %global __python_requires %{%{scl_no_vendor}_python_requires} # The directory for site packages for this Software Collection %global seafile_sitelib %(echo %{python27python_sitelib} | sed 's|%{scl_python}|%{scl}|') %global _hardened_build 1 %define release 4 Name: libsearpc Version: 3.0.7 Release: %{release}%{?dist} Summary: A simple and easy-to-use C language RPC framework License: LGPLv3 URL: https://github.com/haiwen/%{name} Source0: https://github.com/haiwen/%{name}/archive/v%{version}.tar.gz BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool BuildRequires: glib2-devel BuildRequires: jansson-devel BuildRequires: pygobject2 #might need pygobject227 instead BuildRequires: %{scl_prefix_python}python-simplejson #SCL BuildRequires: scl-utils-build # Always make sure that there is the python27-sclbuild (or rh-python35-sclbuild) # package in the build root BuildRequires: %{scl_prefix_python}scldevel # Require python27-python-devel, you will need macros from that package BuildRequires: %{scl_prefix_python}python-devel BuildRequires: %{scl_prefix_python}build Requires: %{scl_prefix}python-versiontools %description Searpc is a simple C language RPC framework based on GObject system. Searpc handles the serialization/deserialization part of RPC, the transport part is left to users. %package -n %{scl_python}-%{name}-devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: glib2-devel Requires: jansson-devel >= 2.2.1 %description -n %{scl_python}-%{name}-devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. #---------------------------------------------------- %package -n %{scl_python}-%{name} Summary: A simple and easy-to-use C language RPC framework Requires: %{scl_prefix}python-versiontools %description -n %{scl_python}-%{name} Searpc is a simple C language RPC framework based on GObject system. Searpc handles the serialization/deserialization part of RPC, the transport part is left to users. #---------------------------------------------------- %package -n %{scl_python}-%{name}-debug Summary: debug package for %{scl_python}-%{name} %description -n %{scl_python}-%{name}-debug Searpc is a simple C language RPC framework based on GObject system. Searpc handles the serialization/deserialization part of RPC, the transport part is left to users. %prep %setup -qn %{name}-%{version} sed -i -e /\(DESTDIR\)/d %{name}.pc.in %build %{?scl:scl enable %{scl_python} - << \EOF} export PYTHON='/opt/rh/python27/root/usr/bin/python' ./autogen.sh %configure --disable-static --disable-compile-demo %{__make} %{?_smp_mflags} CFLAGS="%{optflags}" %{?scl:EOF} %install %scl_install %{?scl:scl enable %{scl_python} - << \EOF} export PYTHON='/opt/rh/python27/root/usr/bin/python' %{__make} install DESTDIR=%{buildroot} %{?scl:EOF} find %{buildroot} -name '*.la' -exec rm -f {} ';' rm -rf %{buildroot}/etc/rpm/macros.python27-config rm -rf %{buildroot}/etc/scl/prefixes/python27 rm -rf %{buildroot}/opt/rh/python27/root/usr/tmp rm -rf %{buildroot}/opt/rh/python27/root/var/mail %check %{?scl:scl enable %{scl_python} - << \EOF} export PYTHON='/opt/rh/python27/root/usr/bin/python' %{__make} check %{?scl:EOF} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files -n %{scl_python}-%{name} %doc AUTHORS README.markdown %doc COPYING %{_libdir}/%{name}.so.* %{_bindir}/searpc-codegen.py %{python_sitearch}/pysearpc/ %files -n %{scl_python}-%{name}-devel %doc COPYING %{_includedir}/searpc* %{_libdir}/%{name}.so %{_libdir}/pkgconfig/%{name}.pc %files -n %{scl_python}-%{name}-debug /usr/src/debug/* /usr/lib/debug/.build-id/* /usr/lib/debug/opt/rh/python27/root/usr/lib64/* %changelog * Wed Mar 07 2018 Jean-Philipe Pialasse - 3.0.7-4.sme - fix [SME: ] * Mon Feb 19 2018 Jean-Philippe Pialasse - 3.0.7-3 - first import for SME Server * Tue Jul 19 2016 Fedora Release Engineering - 3.0.7-2 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Tue Feb 02 2016 Nikos Roussos - 3.0.7-1 - Update to 3.0.7 * Fri Dec 04 2015 Nikos Roussos - 3.0-6 - Add optflags * Fri Sep 11 2015 Nikos Roussos - 3.0-5 - Fix license * Fri Sep 11 2015 Nikos Roussos - 3.0-4 - Fix license - Fix build requiremets - Add check * Sat Apr 11 2015 Nikos Roussos - 3.0-3 - Use release tag instead of commit * Wed Nov 05 2014 Nikos Roussos - 3.0-2 - Update to latest tag - Remove merged patch * Tue Aug 12 2014 Nikos Roussos - 3.0-1 - Initial version of the package