# 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 %{seafile}-lib %define develname %{seafile}-devel %define release 3 %define seafile seafile Name: %{seafile}-server Version: 6.2.5 Release: %{release}%{?dist} Summary: Open source cloud storage system with features on privacy protection and teamwork License: GPLv3+ Group: Networking/File transfer URL: https://github.com/haiwen/seafile Source0: https://github.com/haiwen/seafile/archive/v%{version}/%{name}-%{version}.tar.gz #Source0: https://github.com/haiwen/seafile-server/archive/v%{version}-server.tar.gz Patch0: seafile-5.1.1-evhtp.patch Patch1: seafile-5.1.3.libarchive.patch #seafile-server-6.1.1-server.libarchive.patch BuildRequires: intltool BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(jansson) #BuildRequires: pkgconfig(sqlite3) BuildRequires: sqlite-devel >= 3.7.17 BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(libevent) BuildRequires: pkgconfig(uuid) >= 2.0 BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(libsearpc) #BuildRequires: pkgconfig(libccnet) BuildRequires: ccnet-devel >= %{version} ##BuildRequires: pkgconfig(python) #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 BuildRequires: pkgconfig(zdb) BuildRequires: pkgconfig(evhtp) BuildRequires: pkgconfig(libarchive) #add jpp epel BuildRequires: libedit BuildRequires: libtool BuildRequires: fuse-devel fuse Requires: fuse Requires: sqlite >= 3.7.17 BuildArch: x86_64 #fin add jpp Requires: ccnet-server >= %{version} Requires: pythonegg(2)(seafile) = %{version}-%{release} %description Seafile is an open source cloud storage system with features on privacy protection and teamwork. Collections of files are called libraries, and each library can be synced separately. A library can also be encrypted with a user chosen password. Seafile also allows users to create groups and easily sharing files into groups. #---------------------------------------------------- %package server Summary: Seafile server Group: Networking/File transfer Requires: ccnet-server #>= %{version} #Requires: ccnet >= %{version} Requires: pythonegg(2)(seaserv) = %{version}-%{release} %description server Seafile is an open source cloud storage system with features on privacy protection and teamwork. Collections of files are called libraries, and each library can be synced separately. A library can also be encrypted with a user chosen password. Seafile also allows users to create groups and easily sharing files into groups. This package contains the server part for %{name}. #---------------------------------------------------- %package -n %{libname} Summary: Library for %{name} Group: System/Libraries %description -n %{libname} Seafile is an open source cloud storage system with features on privacy protection and teamwork. Collections of files are called libraries, and each library can be synced separately. A library can also be encrypted with a user chosen password. Seafile also allows users to create groups and easily sharing files into groups. 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 %{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 protection and teamwork. Collections of files are called libraries, and each library can be synced separately. A library can also be encrypted with a user chosen password. Seafile also allows users to create groups and easily sharing files into groups. This package contains the python 2 bindings for %{name}. #---------------------------------------------------- %prep %setup -q %patch0 -p1 # %patch1 -p1 sed -i -e /\(DESTDIR\)/d lib/libseafile.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 \ --enable-server \ --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 %doc LICENSE.txt %{_bindir}/seaf-cli %{_bindir}/seaf-daemon %{_mandir}/man1/*.1.* %files server %doc README.markdown %doc LICENSE.txt %{_bindir}/seaf-fsck %{_bindir}/seaf-fuse %{_bindir}/seaf-migrate %{_bindir}/seaf-server %{_bindir}/seaf-server-init %{_bindir}/seafserv-gc %{_bindir}/%{name}-admin %{_bindir}/%{name}-controller %files -n %{libname} %{_libdir}/lib%{name}.so.%{major} %{_libdir}/lib%{name}.so.%{major}.* %files -n %{develname} %doc README.markdown %{_includedir}/* %{_libdir}/lib%{name}.so %{_libdir}/pkgconfig/lib%{name}.pc %files -n python-%{name} %doc README.markdown %{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 * Mon Mar 26 2018 Jean-Philipe Pialasse Version: 5.1.3-3.sme - TODO: rebuild with ccnet for python27 - TODO: fix pids folder path - TODO: fix seahub.db creation path