# 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} %define major 0 %define libname lib%{ccnet} %define develname %{ccnet}-devel %define release 1 %define ccnet ccnet Name: %{ccnet}-server Version: 6.2.5 Release: %{release}%{dist} Summary: Networking library for Seafile License: GPLv3+ Group: Networking/File transfer URL: https://github.com/haiwen/ccnet-server Source0: https://github.com/haiwen/ccnet-server/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: pkgconfig(glib-2.0) # BuildRequires: pkgconfig(jansson) BuildRequires: sqlite-devel BuildRequires: sqlite Buildrequires: postgresql-devel Buildrequires: mysql-devel BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(libevent) BuildRequires: pkgconfig(uuid) >= 2.0 BuildRequires: pkgconfig(libsearpc) # maybe better with Buildrequires: %{scl_prefix_python}-libsearpc-devel #BuildRequires: pkgconfig(python2) # not for sclo py27 BuildRequires: python-devel #BuildRequires: vala >= 0.26 BuildRequires: vala Buildrequires: autoconf Buildrequires: automake Buildrequires: libtool # server requirements BuildRequires: pkgconfig(zdb) # scl python27 BuildRequires: scl-utils-build BuildRequires: %{scl_prefix_python}scldevel BuildRequires: %{scl_prefix_python}python-devel BuildRequires: %{scl_prefix_python}build BuildArch: x86_64 Requires: %{scl_prefix_python}pythonegg(2)(ccnet) = %{version}-%{release} %description Ccnet is a framework for writing networked applications in C. #---------------------------------------------------- %package server Summary: Ccnet server Group: Networking/File transfer Requires: %{scl_prefix_python}pythonegg(2)(ccnet) = %{version}-%{release} %description server Ccnet is a framework for writing networked applications in C. This package contains the server part for %{name}. #---------------------------------------------------- %package -n %{libname} Summary: Library for %{name} Group: System/Libraries %description -n %{libname} Ccnet is a framework for writing networked applications in C. This package contains library files for %{name}. #---------------------------------------------------- %package -n %{develname} Summary: Development files for %{name} Group: Development/C Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Provides: lib%{name}-devel = %{version}-%{release} %description -n %{develname} The %{develname} package contains libraries and header files for developing applications that use %{name}. #---------------------------------------------------- %package -n %{scl_prefix_python}python-%{ccnet} Summary: Python 2 bindings for %{name} Group: Development/Python Provides: %{scl_prefix_python}pythonegg(2)(ccnet) = %{version}-%{release} %description -n %{scl_prefix_python}python-%{ccnet} Ccnet is a framework for writing networked applications in C. This package contains the python 2 bindings for %{name}. #---------------------------------------------------- %package -n %{name}-debug Summary: Debug for %{name} Group: Development/C %description -n %{name}-debug Ccnet is a framework for writing networked applications in C. #---------------------------------------------------- %prep %setup -q sed -i -e /\(DESTDIR\)/d libccnet.pc.in NOCONFIGURE=1 ./autogen.sh %build scl enable %{scl_python} "bash" %{?scl:scl enable %{scl_python} - << \EOF} export PYTHON='/opt/rh/python27/root/usr/bin/python' %configure \ --disable-static \ make %{?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} # we don't want these find %{buildroot} -name '*.la' -delete 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 ls -R %{buildroot} |grep -v man >/dev/stderr %files %doc HACKING README.markdown #%doc COPYRIGHT %{_bindir}/%{name} %{_bindir}/ccnet-init # %{_bindir}/ccnet-tool # %{_bindir}/ccnet-servtool %files -n %{libname} %{_libdir}/libccnet.so.%{major} %{_libdir}/libccnet.so.%{major}.* %files -n %{develname} %doc HACKING README.markdown %{_includedir}/* %{_libdir}/libccnet.so %{_libdir}/pkgconfig/libccnet.pc %files -n %{scl_prefix_python}python-%{ccnet} %doc HACKING README.markdown %{python_sitearch}/ccnet/ %files -n %{name}-debug /usr/src/debug/* /usr/lib/debug/.build-id/* /usr/lib/debug/opt/rh/python27/root/usr/bin/* /usr/lib/debug/opt/rh/python27/root/usr/lib64/* %changelog * Sat Apr 07 2018 Jean-Philipe Pialasse Version: 6.2.5-1.sme - initial build of ccnet-server 6.2.5