--- rpms/seafile/contribs9/seafile.spec 2018/02/28 06:56:56 1.2 +++ rpms/seafile/contribs9/seafile.spec 2018/03/09 04:57:10 1.3 @@ -1,10 +1,32 @@ +# 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}|') + + %define major 0 %define libname %{name}-lib %define develname %{name}-devel -%define release 1 +%define release 2 Name: seafile Version: 5.1.3 -Release: %{release} +Release: %{release}%{?dist} Summary: Open source cloud storage system with features on privacy protection and teamwork License: GPLv3+ Group: Networking/File transfer @@ -27,7 +49,16 @@ BuildRequires: pkgconfig(libsearpc) #BuildRequires: pkgconfig(libccnet) BuildRequires: ccnet-devel ##BuildRequires: pkgconfig(python) -BuildRequires: python-devel +#BuildRequires: python-devel +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 +#BuildRequires: python27-python-devel #BuildRequires: vala >= 0.26 BuildRequires: vala # server requirements @@ -98,12 +129,25 @@ developing applications that use %{name} #---------------------------------------------------- +%package -n %{name}-debug +Summary: Debug files for %{name} +Group: Development/C +Requires: %{libname} = %{version}-%{release} + +%description -n %{name}-debug +The %{name}-debug package contains debugs files and header files for +debuging applications that use %{name}. + +#---------------------------------------------------- + %package -n python-%{name} Summary: Python 2 bindings for %{name} Group: Development/Python BuildArch: noarch Provides: pythonegg(2)(seafile) = %{version}-%{release} Provides: pythonegg(2)(seaserv) = %{version}-%{release} +Requires: scl-utils +Requires: %{scl_prefix_python}runtime %description -n python-%{name} Seafile is an open source cloud storage system with features on privacy @@ -115,6 +159,7 @@ This package contains the python 2 bindi #---------------------------------------------------- + %prep %setup -q %patch0 -p1 @@ -125,18 +170,31 @@ sed -i -e /\(DESTDIR\)/d lib/libseafile. 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 \ - --with-mysql \ --enable-server \ - --enable-client \ + --enable-client + make +%{?scl:EOF} +# --with-mysql unknown for 5.1.3 %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 %files %doc README.markdown @@ -172,8 +230,16 @@ find %{buildroot} -name '*.la' -delete %{python_sitearch}/%{name}/ %{python_sitearch}/seaserv/ +%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 +* Wed Mar 07 2018 Jean-Philipe Pialasse Version: 5.1.3-2.sme +- build against python27 sclo, packaged as element of this sclo + * Mon Feb 19 2018 Jean-Philippe Pialasse - 5.1.3-1.sme - First import to SME Server - test with vala < 0.26 : vala-0.10.4-1.el6