Przeglądaj źródła

Merge branch 'release-5.0.3-1'

Edvinas Valatka 10 lat temu
rodzic
commit
14fd9424f5
4 zmienionych plików z 172 dodań i 131 usunięć
  1. 38 28
      .SRCINFO
  2. 116 65
      PKGBUILD
  3. 8 0
      libseafile.in.patch
  4. 10 38
      seafile-server.install

+ 38 - 28
.SRCINFO

@@ -1,47 +1,57 @@
 # Generated by mksrcinfo v8
-# Fri Dec 18 04:14:14 UTC 2015
+# Sat Dec 19 18:03:23 UTC 2015
 pkgbase = seafile-server
-	pkgdesc = Next-generation open source cloud storage with advanced features on privacy protection and teamwork. (Server components, without seahub)
-	pkgver = 5.0.2
-	pkgrel = 4
+	pkgdesc = Seafile is an online file storage and collaboration tool
+	pkgver = 5.0.3
+	pkgrel = 1
 	url = https://github.com/haiwen/seafile/
-	install = seafile-server.install
-	arch = i686
-	arch = x86_64
-	arch = armv6h
-	arch = armv7h
+	arch = any
 	license = GPL3
 	makedepends = vala
 	makedepends = intltool
-	depends = seafile-shared=5.0.2
-	depends = python2-mako
-	depends = python2-dateutil
-	depends = python2-webpy
-	depends = python2-pip
-	depends = python2-virtualenv
-	depends = python2-flup
-	depends = python2-six
-	depends = libevhtp-seafile=1.2.9
-	depends = git
-	conflicts = django
-	conflicts = django-rest-framework,
-	conflicts = seafile
-	options = !libtool
-	options = !emptydirs
-	source = https://github.com/haiwen/seafile/archive/v5.0.2-server.tar.gz
+	makedepends = python2
+	makedepends = sqlite
+	makedepends = fuse
+	makedepends = ccnet=5.0.3
+	makedepends = libevhtp-seafile=1.2.9
+	source = seafile-server-5.0.3.tar.gz::https://github.com/haiwen/seafile/archive/v5.0.3-server.tar.gz
 	source = seafile-admin_virtualenv.patch
-	source = seafile-server.install
 	source = seafile-server@.service
 	source = seahub-preupgrade
 	source = create-default-conf-dir.patch
 	source = 0001-Revert-server-put-pids-folder-out-of-seafile-data.patch
-	sha256sums = ce34339bdad50afb9bacb3cbf854e3c33a311dfb868b2ec32a812ca78845b43f
+	source = libseafile.in.patch
+	sha256sums = 2fc448ee097c3be2eb38fb961f0768580607051fe230ae63ecd83f8fb6415f90
 	sha256sums = 876e67526fabf83bfeb5ff50f05b2f4725f3d9bf784025707b67022a1a311f20
-	sha256sums = 1f25ed346ce4fef23234f62db5d25a99cf5f72ac823ec7ca09260daaf8b2eff7
 	sha256sums = ae1ed38f94304d27e4ef1ca66e15d544f99681c1e743c510c54d4a112f050421
 	sha256sums = 2a1e079cbea3543f356e6e9571f3d7d2a4b0ab75131ee417115d738ea191c4fb
 	sha256sums = 6bd632f8741b039bad961af3d6850b651e25b7e7a3018d6e2789f350ff93bb78
 	sha256sums = b1748e826d8e7cccdd825b99864b74dfb5795312f8878d63e9a87105f4382e29
+	sha256sums = a2d7f7cf0c59aba97650af62b3cefd0ceb71a1007c34d9369a88e5769c7f6076
 
 pkgname = seafile-server
+	pkgdesc = Seafile server components, without seahub
+	install = seafile-server.install
+	depends = seafile-shared=5.0.3
+	depends = python2-mako
+	depends = python2-dateutil
+	depends = python2-webpy
+	depends = python2-pip
+	depends = python2-virtualenv
+	depends = python2-flup
+	depends = python2-six
+	depends = libevhtp-seafile=1.2.9
+	depends = git
+	options = !libtool
+	options = !emptydirs
+
+pkgname = seafile-client-cli
+	pkgdesc = Seafile cli client
+	depends = seafile-shared=5.0.3
+	depends = libevent
+
+pkgname = seafile-shared
+	pkgdesc = Shared components of Seafile (seafile-daemon, libseafile, python bindings, manuals)
+	depends = ccnet=5.0.3
+	depends = fuse
 

+ 116 - 65
PKGBUILD

@@ -1,77 +1,128 @@
-# Contributor: Aaron Lindsay <aaron@aclindsay.com>
 # Maintainer: Edvinas Valatka <edacval@gmail.com>
+# Contributor: Aaron Lindsay <aaron@aclindsay.com>
 
-pkgname=seafile-server
-pkgver=5.0.2
-pkgrel=4
-pkgdesc="Next-generation open source cloud storage with advanced features on privacy protection and teamwork. (Server components, without seahub)"
-arch=('i686' 'x86_64' 'armv6h' 'armv7h')
+pkgname=('seafile-server' 'seafile-client-cli' 'seafile-shared')
+pkgver=5.0.3
+pkgrel=1
+pkgdesc="Seafile is an online file storage and collaboration tool"
+arch=('any')
 url="https://github.com/haiwen/seafile/"
 license=('GPL3')
-depends=('seafile-shared=5.0.2' 'python2-mako' 'python2-dateutil' 'python2-webpy' 'python2-pip' 'python2-virtualenv' 'python2-flup' 'python2-six' 'libevhtp-seafile=1.2.9' 'git')
-makedepends=('vala' 'intltool')
-conflicts=('django' 'django-rest-framework', 'seafile')
-options=('!libtool' '!emptydirs')
-install=seafile-server.install
-source=("https://github.com/haiwen/seafile/archive/v${pkgver}-server.tar.gz"
-    "seafile-admin_virtualenv.patch"
-    "seafile-server.install"
-    "seafile-server@.service"
-    "seahub-preupgrade"
-    "create-default-conf-dir.patch"
-    "0001-Revert-server-put-pids-folder-out-of-seafile-data.patch")
+makedepends=("vala" "intltool"
+             "python2" "sqlite" "fuse"
+             "ccnet=${pkgver}" "libevhtp-seafile=1.2.9")
+source=("seafile-server-${pkgver}.tar.gz::https://github.com/haiwen/seafile/archive/v${pkgver}-server.tar.gz"
+        "seafile-admin_virtualenv.patch"
+        "seafile-server@.service"
+        "seahub-preupgrade"
+        "create-default-conf-dir.patch"
+        "0001-Revert-server-put-pids-folder-out-of-seafile-data.patch"
+        "libseafile.in.patch")
+sha256sums=('2fc448ee097c3be2eb38fb961f0768580607051fe230ae63ecd83f8fb6415f90'
+            '876e67526fabf83bfeb5ff50f05b2f4725f3d9bf784025707b67022a1a311f20'
+            'ae1ed38f94304d27e4ef1ca66e15d544f99681c1e743c510c54d4a112f050421'
+            '2a1e079cbea3543f356e6e9571f3d7d2a4b0ab75131ee417115d738ea191c4fb'
+            '6bd632f8741b039bad961af3d6850b651e25b7e7a3018d6e2789f350ff93bb78'
+            'b1748e826d8e7cccdd825b99864b74dfb5795312f8878d63e9a87105f4382e29'
+            'a2d7f7cf0c59aba97650af62b3cefd0ceb71a1007c34d9369a88e5769c7f6076')
 
 prepare () {
-    cd "${srcdir}/seafile-${pkgver}-server"
-    patch -p1 -i ${srcdir}/seafile-admin_virtualenv.patch
-    patch -p1 -i ${srcdir}/0001-Revert-server-put-pids-folder-out-of-seafile-data.patch
-    patch -p1 -i ${srcdir}/create-default-conf-dir.patch
+  cd "${srcdir}/seafile-${pkgver}-server"
+
+  patch -p1 -i "${srcdir}/seafile-admin_virtualenv.patch"
+  patch -p1 -i "${srcdir}/0001-Revert-server-put-pids-folder-out-of-seafile-data.patch"
+  patch -p1 -i "${srcdir}/create-default-conf-dir.patch"
+  patch -p1 -i "${srcdir}/libseafile.in.patch"
+
+  # Fix all script's python 2 requirement
+  grep -s -l -r '#!/usr/bin/env python' "${srcdir}/seafile-${pkgver}-server" \
+    | xargs sed -i -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|g'
 }
 
-build () {
-    cd "${srcdir}/seafile-${pkgver}-server"
-    ./autogen.sh
-    ./configure --enable-server --disable-client --disable-python --prefix=/usr PYTHON=/usr/bin/python2
-    make -j1
+build() {
+  cd "$srcdir/seafile-${pkgver}-server"
+
+  ./autogen.sh
+
+  ./configure \
+    --enable-client \
+    --enable-fuse \
+    --enable-python \
+    --enable-server \
+    --prefix=/usr \
+    PYTHON=/usr/bin/python2
+
+  make
 }
 
-package () {
-    # Install library and header files
-    cd "${srcdir}/seafile-${pkgver}-server"
-    make DESTDIR="${pkgdir}" install
-
-    # Remove files already installed by seafile-shared
-    # to maintain compatibility
-    rm -rf "${pkgdir}/usr/lib"
-    rm -rf "${pkgdir}/usr/include"
-
-    # Install all scripts
-    mkdir -p "${pkgdir}/usr/share/$pkgname"
-    cp -r -p "${srcdir}/seafile-${pkgver}-server/scripts" "${pkgdir}/usr/share/$pkgname/scripts"
-    # Remove win32-specific scripts
-    rm -rf "${pkgdir}/usr/share/$pkgname/scripts/upgrade/win32"
-    # Fix all script's  python 2 requirement 
-    egrep -s -l -r '#!/usr/bin/env python' "${pkgdir}" | xargs sed -i -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|g'
-    # Fix upgrade script's invald use of $INSTALLPATH to find seafile binaries
-    sed -i 's|${INSTALLPATH}/seafile/bin|/usr/bin|g' "${pkgdir}/usr/share/seafile-server/scripts/upgrade/upgrade_2.2_3.0.sh"
-
-    # Workaround for strange behaviour in the Makefile, which
-    # installs python bindings in the package root directory,
-    # even though they were disabled
-    rm -rf "${pkgdir}/seaserv"
-    rm -rf "${pkgdir}/seafile"
-
-    # Install systemd service
-    install -D -m644 "${srcdir}/seafile-server@.service" "${pkgdir}/usr/lib/systemd/system/seafile-server@.service"
-
-    # Install seahub preupgrade script
-    install -D -m755 "${srcdir}/seahub-preupgrade" "${pkgdir}/usr/bin/seahub-preupgrade"
+package_seafile-client-cli() {
+  depends=("seafile-shared=${pkgver}" 'libevent')
+  pkgdesc="Seafile cli client"
+
+  cd "${srcdir}/seafile-${pkgver}-server"
+
+  # Install cli client
+  install -D -m755 app/seaf-cli "${pkgdir}/usr/bin/seaf-cli"
 }
 
-sha256sums=('ce34339bdad50afb9bacb3cbf854e3c33a311dfb868b2ec32a812ca78845b43f'
-            '876e67526fabf83bfeb5ff50f05b2f4725f3d9bf784025707b67022a1a311f20'
-            '1f25ed346ce4fef23234f62db5d25a99cf5f72ac823ec7ca09260daaf8b2eff7'
-            'ae1ed38f94304d27e4ef1ca66e15d544f99681c1e743c510c54d4a112f050421'
-            '2a1e079cbea3543f356e6e9571f3d7d2a4b0ab75131ee417115d738ea191c4fb'
-            '6bd632f8741b039bad961af3d6850b651e25b7e7a3018d6e2789f350ff93bb78'
-            'b1748e826d8e7cccdd825b99864b74dfb5795312f8878d63e9a87105f4382e29')
+package_seafile-shared() {
+  depends=("ccnet=${pkgver}" "fuse")
+  pkgdesc="Shared components of Seafile (seafile-daemon, libseafile, python bindings, manuals)"
+
+  cd "${srcdir}/seafile-${pkgver}-server"
+
+  make DESTDIR="${pkgdir}" install
+
+  # Remove server components
+  rm -rf "${pkgdir}/usr/bin/seafserv-gc"
+  rm -rf "${pkgdir}/usr/bin/seafile-admin"
+  rm -rf "${pkgdir}/usr/bin/seaf-fuse"
+  rm -rf "${pkgdir}/usr/bin/seaf-server"
+  rm -rf "${pkgdir}/usr/bin/seaf-server-init"
+  rm -rf "${pkgdir}/usr/bin/seaf-migrate"
+  rm -rf "${pkgdir}/usr/bin/seaf-fsck"
+  # Remove cli client binary
+  rm -rf "${pkgdir}/usr/bin/seaf-cli"
+}
+
+package_seafile-server() {
+  depends=("seafile-shared=${pkgver}"
+           "python2-mako" "python2-dateutil" "python2-webpy" "python2-pip"
+           "python2-virtualenv" "python2-flup" "python2-six"
+           "libevhtp-seafile=1.2.9" "git")
+  options=('!libtool' '!emptydirs')
+  install=seafile-server.install
+  pkgdesc="Seafile server components, without seahub"
+
+  # Install library and header files
+  cd "${srcdir}/seafile-${pkgver}-server"
+  make DESTDIR="${pkgdir}" install
+
+  # Remove files already installed by seafile-shared
+  # to maintain compatibility
+  rm -rf "${pkgdir}/usr/lib"
+  rm -rf "${pkgdir}/usr/include"
+  rm -rf "${pkgdir}/usr/share/man"
+  rm -rf "${pkgdir}/usr/bin/seaf-daemon"
+  rm -rf "${pkgdir}/usr/bin/seafile-controller"
+
+  # Remove seafile-client-cli
+  rm -rf "${pkgdir}/usr/bin/seaf-cli"
+
+  # Install all scripts
+  mkdir -p "${pkgdir}/usr/share/${pkgname}"
+  cp -r -p "${srcdir}/seafile-${pkgver}-server/scripts" \
+    "${pkgdir}/usr/share/$pkgname/scripts"
+
+  # Remove win32 and other distributions specific scripts
+  rm -rf "${pkgdir}/usr/share/$pkgname/scripts/build"
+  rm -rf "${pkgdir}/usr/share/$pkgname/scripts/upgrade/win32"
+
+  # Install systemd service
+  install -D -m644 "${srcdir}/seafile-server@.service" \
+    "${pkgdir}/usr/lib/systemd/system/seafile-server@.service"
+
+  # Install seahub preupgrade script
+  install -D -m755 "${srcdir}/seahub-preupgrade" \
+    "${pkgdir}/usr/bin/seahub-preupgrade"
+}

+ 8 - 0
libseafile.in.patch

@@ -0,0 +1,8 @@
+--- seafile-4.3.1/lib/libseafile.pc.in	2015-08-11 05:40:35.000000000 +0300
++++ seafile-4.3.1/lib/libseafile.pc.in.good	2015-08-18 09:45:24.761932845 +0300
+@@ -1,4 +1,4 @@
+-prefix=(DESTDIR)@prefix@
++prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ libdir=@libdir@
+ includedir=@includedir@

+ 10 - 38
seafile-server.install

@@ -1,31 +1,22 @@
-## arg 1:  the new package version
 pre_install() {
     virtualenv2 --system-site-packages /usr/lib/seafile/seafileenv
     virtualenv2 --relocatable /usr/lib/seafile/seafileenv
     source /usr/lib/seafile/seafileenv/bin/activate
 
-    pip install pip
-
-    # Dependencies as per
-    # http://manual.seafile.com/build_seafile/server.html
+    pip install chardet
+    pip install simplejson
+    pip install six
+    pip install python-dateutil
+    pip install django-pipeline
     pip install "Django>=1.5.8,<1.6"
     pip install "Djblets==0.6.14" --no-deps --allow-external Djblets --allow-unverified Djblets
-    # sqlite3 module should be included in python distribution
-    pip install simplejson
-    # Pillow as replacement for PIL
     pip install "Pillow>=2.6.1,<3.0.0"
-    pip install chardet
     pip install "gunicorn==18"
     pip install "django-compressor==1.4"
     pip install "django-statici18n==1.1.2"
-    pip install six
-    pip install python-dateutil
     pip install "git+git://github.com/haiwen/django-constance.git@bde7f7cdfd0ed1631a6817fd4cd76f37bf54fe35#egg=django-constance[database]"
     pip install "openpyxl==2.3.0"
 
-    # Additional dependencies
-    pip install django-pipeline
-
     deactivate
 }
 
@@ -34,50 +25,31 @@ post_install() {
     systemctl daemon-reload
 }
 
-## arg 1:  the new package version
-## arg 2:  the old package version
 pre_upgrade() {
     virtualenv2 --system-site-packages /usr/lib/seafile/seafileenv
     virtualenv2 --relocatable /usr/lib/seafile/seafileenv
     source /usr/lib/seafile/seafileenv/bin/activate
 
-    pip install --upgrade pip
-
-    # Dependencies as per
-    # http://manual.seafile.com/build_seafile/server.html
+    pip install --upgrade chardet
+    pip install --upgrade simplejson
+    pip install --upgrade six
+    pip install --upgrade python-dateutil
+    pip install --upgrade django-pipeline
     pip install --upgrade "Django>=1.5.8,<1.6"
     pip install --upgrade "Djblets==0.6.14" --no-deps --allow-external Djblets --allow-unverified Djblets
-    # sqlite3 module should be included in python distribution
-    pip install --upgrade simplejson
-    # Pillow as replacement for PIL
     pip install --upgrade  "Pillow>=2.6.1,<3.0.0"
-    pip install --upgrade chardet
     pip install --upgrade "gunicorn==18"
     pip install "django-compressor==1.4"
     pip install "django-statici18n==1.1.2"
-    pip install --upgrade six
-    pip install --upgrade python-dateutil
     pip install --upgrade "git+git://github.com/haiwen/django-constance.git@bde7f7cdfd0ed1631a6817fd4cd76f37bf54fe35#egg=django-constance[database]"
     pip install --upgrade "openpyxl==2.3.0"
-
-    # Additional dependencies
-    pip install --upgrade django-pipeline
-
     deactivate
 }
 
-## arg 1:  the new package version
-## arg 2:  the old package version
 post_upgrade() {
     post_install
 }
 
-## arg 1:  the old package version
-pre_remove() {
-    echo " " > /dev/null
-}
-
-## arg 1:  the old package version
 post_remove() {
     rm -rf /usr/lib/seafile/seafileenv
     post_install