rebuild with --enable-server and other options
organize %{datadir}/seafile and add requirements to make server basically work [release 3.1.4-3mamba;Sat Aug 09 2014]
This commit is contained in:
parent
c9bbba2a11
commit
6b2afa2e1b
17
seafile-client.service
Normal file
17
seafile-client.service
Normal file
@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Seafile client
|
||||
# Uncomment the next line you are running seafile client on the same computer as server
|
||||
# After=seafile.service
|
||||
# Or the next one in other case
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/seaf-cli start
|
||||
ExecStop=/usr/bin/seaf-cli stop
|
||||
RemainAfterExit=yes
|
||||
User=seafile
|
||||
Group=seafile
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
15
seafile-seafile.service
Normal file
15
seafile-seafile.service
Normal file
@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Seafile
|
||||
# add mysql.service or postgresql.service depending on your database to the line below
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/share/seafile/seafile-server/seafile.sh start
|
||||
ExecStop=/usr/share/seafile/seafile-server/seafile.sh stop
|
||||
RemainAfterExit=yes
|
||||
User=seafile
|
||||
Group=seafile
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
15
seafile-seahub.service
Normal file
15
seafile-seahub.service
Normal file
@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Seafile hub
|
||||
After=network.target seafile.service
|
||||
|
||||
[Service]
|
||||
# change start to start-fastcgi if you want to run fastcgi
|
||||
ExecStart=/usr/share/seafile/seafile-server/seahub.sh start
|
||||
ExecStop=/usr/share/seafile/seafile-server/seahub.sh stop
|
||||
User=seafile
|
||||
Group=seafile
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
123
seafile.spec
123
seafile.spec
@ -1,6 +1,8 @@
|
||||
%define seafile_groupid 65435
|
||||
%define seafile_userid 65435
|
||||
Name: seafile
|
||||
Version: 3.1.4
|
||||
Release: 1mamba
|
||||
Release: 3mamba
|
||||
Summary: A next-generation open source cloud storage system with advanced support for file syncing
|
||||
Group: Applications/Web
|
||||
Vendor: openmamba
|
||||
@ -9,6 +11,9 @@ Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
URL: http://seafile.com/
|
||||
## GITSOURCE https://github.com/haiwen/seafile.git v3.1.4
|
||||
Source: https://github.com/haiwen/seafile.git/v%{version}/seafile-%{version}.tar.bz2
|
||||
Source1: seafile-seafile.service
|
||||
Source2: seafile-seahub.service
|
||||
Source3: seafile-client.service
|
||||
License: GPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
@ -25,6 +30,8 @@ BuildRequires: libsqlite-devel
|
||||
BuildRequires: libuuid-devel
|
||||
BuildRequires: libz-devel
|
||||
## AUTOBUILDREQ-END
|
||||
BuildRequires: libzdb-devel
|
||||
BuildRequires: libevhtp-devel
|
||||
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
|
||||
@ -33,6 +40,20 @@ Seafile is a next-generation open source cloud storage system with advanced supp
|
||||
Collections of files are called libraries, and each library can be synced separately. A library can be encrypted with a user chosen password. This password is not stored on the server, so even the server admin cannot view a file's contents.
|
||||
Seafile allows users to create groups with file syncing, wiki, and discussion to enable easy collaboration around documents within a team.
|
||||
|
||||
%package server
|
||||
Group: System/Servers
|
||||
Summary: Server package for %{name}
|
||||
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
Requires: python-%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
Requires: ccnet
|
||||
Requires: seahub
|
||||
|
||||
%description server
|
||||
Seafile is a next-generation open source cloud storage system with advanced support for file syncing, privacy protection and teamwork.
|
||||
Collections of files are called libraries, and each library can be synced separately. A library can be encrypted with a user chosen password. This password is not stored on the server, so even the server admin cannot view a file's contents.
|
||||
Seafile allows users to create groups with file syncing, wiki, and discussion to enable easy collaboration around documents within a team.
|
||||
This is the server package.
|
||||
|
||||
%package -n lib%{name}
|
||||
Group: System/Libraries
|
||||
Summary: Shared libraries for %{name}
|
||||
@ -54,6 +75,10 @@ Group: System/Libraries
|
||||
Summary: Python bindings to %{name}
|
||||
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
Requires: python-ccnet
|
||||
Requires: python-setuptools
|
||||
Requires: python-simplejson
|
||||
Requires: python-Pillow
|
||||
Requires: python-MySQL
|
||||
|
||||
%description -n python-%{name}
|
||||
This package contains python bindings to %{name}.
|
||||
@ -62,32 +87,114 @@ This package contains python bindings to %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
#-D -T
|
||||
|
||||
%build
|
||||
#:<< ___EOF
|
||||
./autogen.sh
|
||||
%configure
|
||||
%configure \
|
||||
--enable-server \
|
||||
--enable-client \
|
||||
--enable-fuse \
|
||||
--enable-python \
|
||||
--enable-console
|
||||
|
||||
%make -j1
|
||||
|
||||
%install
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
%makeinstall
|
||||
|
||||
install -d -m0755 %{buildroot}%{_datadir}/seafile/seafile-server
|
||||
cp scripts/{check_init_admin.py,reset-admin.sh,seaf-fuse.sh,seaf-gc.sh,seafile.sh,\
|
||||
seahub.sh,setup-seafile-mysql.sh,setup-seafile-mysql.py,reset-admin.sh,seaf-fuse.sh,\
|
||||
setup-seafile.sh} \
|
||||
%{buildroot}%{_datadir}/seafile/seafile-server
|
||||
|
||||
install -d -m0755 %{buildroot}%{_datadir}/seafile/seafile-server/seafile/bin
|
||||
install -d -m0755 %{buildroot}%{_datadir}/seafile/seafile-server/seafile/%{_lib}
|
||||
for f in ccnet-init fileserver seaf-fuse seaf-server seafile-controller seafserv-tool \
|
||||
ccnet-server seaf-fsck seaf-migrate seaf-server-init seafserv-gc; do
|
||||
ln -s %{_bindir}/$f %{buildroot}%{_datadir}/seafile/seafile-server/seafile/bin/$f
|
||||
done
|
||||
|
||||
install -d -m0755 %{buildroot}%{_datadir}/seafile/seafile-server/runtime
|
||||
cp scripts/seahub.conf %{buildroot}%{_datadir}/seafile/seafile-server/runtime/
|
||||
|
||||
cp -a scripts/upgrade %{buildroot}%{_datadir}/seafile/seafile-server/
|
||||
rm -rf %{buildroot}%{_datadir}/seafile/seafile-server/upgrade/win32
|
||||
|
||||
install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/seafile.service
|
||||
install -D -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/seahub.service
|
||||
install -D -m0644 %{SOURCE3} %{buildroot}%{_unitdir}/seafile-client.service
|
||||
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
%pre
|
||||
if [ $1 -ge 1 ]; then
|
||||
/usr/sbin/groupadd seafile -g %{seafile_groupid} 2>/dev/null
|
||||
/usr/sbin/useradd -u %{seafile_userid} -c 'Seafile user' -d %{_datadir}/seafile/seafile-server -g seafile \
|
||||
-s /bin/false seafile 2>/dev/null
|
||||
fi
|
||||
:
|
||||
|
||||
%post
|
||||
if [ $1 -ge 1 ]; then
|
||||
systemctl -q daemon-reload
|
||||
fi
|
||||
:
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
systemctl -q daemon-reload
|
||||
/usr/sbin/userdel seafile 2>/dev/null
|
||||
/usr/sbin/groupdel seafile 2>/dev/null
|
||||
fi
|
||||
:
|
||||
|
||||
%post -n lib%{name} -p /sbin/ldconfig
|
||||
%postun -n lib%{name} -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/seaf-cli
|
||||
%{_bindir}/seaf-daemon
|
||||
%{_bindir}/seafile
|
||||
%{_unitdir}/seafile-client.service
|
||||
%{_mandir}/man1/ccnet.1*
|
||||
%{_mandir}/man1/seaf-cli.1*
|
||||
%{_mandir}/man1/seaf-daemon.1*
|
||||
%{_mandir}/man1/seafile-applet.1*
|
||||
|
||||
%files server
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/fileserver
|
||||
%{_bindir}/seaf-fsck
|
||||
%{_bindir}/seaf-fuse
|
||||
%{_bindir}/seaf-migrate
|
||||
%{_bindir}/seaf-server
|
||||
%{_bindir}/seaf-server-init
|
||||
%{_bindir}/seafile-admin
|
||||
%{_bindir}/seafile-controller
|
||||
%{_bindir}/seafserv-gc
|
||||
%{_bindir}/seafserv-tool
|
||||
%{_bindir}/seaf-daemon
|
||||
%attr(-,seafile,seafile) %dir %{_datadir}/seafile
|
||||
%dir %{_datadir}/seafile/seafile-server
|
||||
%{_datadir}/seafile/seafile-server/*.sh
|
||||
%{_datadir}/seafile/seafile-server/*.py
|
||||
%dir %{_datadir}/seafile/seafile-server/runtime
|
||||
%{_datadir}/seafile/seafile-server/runtime/seahub.conf
|
||||
%dir %{_datadir}/seafile/seafile-server/seafile
|
||||
%dir %{_datadir}/seafile/seafile-server/seafile/bin
|
||||
%{_datadir}/seafile/seafile-server/seafile/bin/*
|
||||
%dir %{_datadir}/seafile/seafile-server/seafile/%{_lib}
|
||||
#%{_datadir}/seafile/seafile-server/*
|
||||
%dir %{_datadir}/seafile/seafile-server/upgrade
|
||||
%{_datadir}/seafile/seafile-server/upgrade/*
|
||||
%{_unitdir}/seafile.service
|
||||
%{_unitdir}/seahub.service
|
||||
%{_mandir}/man1/seaf-daemon.1*
|
||||
|
||||
%files -n lib%{name}
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libseafile.so.*
|
||||
@ -110,5 +217,13 @@ This package contains python bindings to %{name}.
|
||||
%{python_sitearch}/seaserv/*.py*
|
||||
|
||||
%changelog
|
||||
* Sat Aug 09 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 3.1.4-3mamba
|
||||
- rebuild with --enable-server and other options
|
||||
- organize %{datadir}/seafile and add requirements to make server basically work
|
||||
|
||||
* Sat Aug 09 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 3.1.4-2mamba
|
||||
- added systemd service, install scripts and create seafile user and group
|
||||
- added seafile-server package
|
||||
|
||||
* Tue Aug 05 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 3.1.4-1mamba
|
||||
- package created using the webbuild interface
|
||||
|
Loading…
Reference in New Issue
Block a user