Sfoglia il codice sorgente

Merge branch 'release-5.0.2-1'

Edvinas Valatka 10 anni fa
parent
commit
6fe5d7e778
5 ha cambiato i file con 123 aggiunte e 107 eliminazioni
  1. 9 7
      .SRCINFO
  2. 50 52
      PKGBUILD
  3. 10 0
      create-default-conf-dir.patch
  4. 4 2
      seafile-admin_virtualenv.patch
  5. 50 46
      seafile-server.install

+ 9 - 7
.SRCINFO

@@ -1,7 +1,7 @@
 pkgbase = seafile-server
 	pkgdesc = Next-generation open source cloud storage with advanced features on privacy protection and teamwork. (Server components, without seahub)
-	pkgver = 4.4.2
-	pkgrel = 3
+	pkgver = 5.0.2
+	pkgrel = 1
 	url = https://github.com/haiwen/seafile/
 	install = seafile-server.install
 	arch = i686
@@ -11,7 +11,7 @@ pkgbase = seafile-server
 	license = GPL3
 	makedepends = vala
 	makedepends = intltool
-	depends = seafile-shared>=4.4.2
+	depends = seafile-shared=5.0.2
 	depends = python2-mako
 	depends = python2-dateutil
 	depends = python2-webpy
@@ -25,17 +25,19 @@ pkgbase = seafile-server
 	conflicts = seafile
 	options = !libtool
 	options = !emptydirs
-	source = https://github.com/haiwen/seafile/archive/v4.4.2-server.tar.gz
+	source = https://github.com/haiwen/seafile/archive/v5.0.2-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 = 7e244f05b20a6bfd7282b8a00eb3e1cda8ecefd98fc2b92210665549aebebe22
-	sha256sums = 4127284c1d8a4d071925cbcc870ca460fd736e2d53e8ab5806ccf3dd03d5e537
-	sha256sums = abe1a55d528994e044f6bba71fac0d97313adecd9aa007fa338efdca244882db
+	sha256sums = ce34339bdad50afb9bacb3cbf854e3c33a311dfb868b2ec32a812ca78845b43f
+	sha256sums = 876e67526fabf83bfeb5ff50f05b2f4725f3d9bf784025707b67022a1a311f20
+	sha256sums = f15c842b06028c9e19168d3617bf2bc09545707175e1e1298d54f2a9ffdcf804
 	sha256sums = ae1ed38f94304d27e4ef1ca66e15d544f99681c1e743c510c54d4a112f050421
 	sha256sums = 2a1e079cbea3543f356e6e9571f3d7d2a4b0ab75131ee417115d738ea191c4fb
+	sha256sums = 6bd632f8741b039bad961af3d6850b651e25b7e7a3018d6e2789f350ff93bb78
 	sha256sums = b1748e826d8e7cccdd825b99864b74dfb5795312f8878d63e9a87105f4382e29
 
 pkgname = seafile-server

+ 50 - 52
PKGBUILD

@@ -2,78 +2,76 @@
 # Maintainer: Edvinas Valatka <edacval@gmail.com>
 
 pkgname=seafile-server
-pkgver=4.4.2
-pkgrel=3
+pkgver=5.0.2
+pkgrel=1
 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')
 url="https://github.com/haiwen/seafile/"
 license=('GPL3')
-depends=('seafile-shared>=4.4.2' 'python2-mako' 'python2-dateutil' 'python2-webpy' 'python2-pip' 'python2-virtualenv' 'python2-flup' 'python2-six' 'libevhtp-seafile=1.2.10')
+depends=('seafile-shared=5.0.2' 'python2-mako' 'python2-dateutil' 'python2-webpy' 'python2-pip' 'python2-virtualenv' 'python2-flup' 'python2-six' 'libevhtp-seafile=1.2.10')
 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"
-        "0001-Revert-server-put-pids-folder-out-of-seafile-data.patch")
+    "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")
 
-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
+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
 }
 
-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-server --disable-client --disable-python --prefix=/usr PYTHON=/usr/bin/python2
+    make -j1
 }
 
-package ()
-{
-	# Install library and header files
-	cd "${srcdir}/seafile-${pkgver}-server"
-	make DESTDIR="${pkgdir}" install
+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"
+    # 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"
+    # 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"
+    # 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 license
-	install -D -m644 "${srcdir}/seafile-${pkgver}-server/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
+    # Install systemd service
+    install -D -m644 "${srcdir}/seafile-server@.service" "${pkgdir}/usr/lib/systemd/system/seafile-server@.service"
 
-	# 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"
+    # Install seahub preupgrade script
+    install -D -m755 "${srcdir}/seahub-preupgrade" "${pkgdir}/usr/bin/seahub-preupgrade"
 }
-sha256sums=('7e244f05b20a6bfd7282b8a00eb3e1cda8ecefd98fc2b92210665549aebebe22'
-            '4127284c1d8a4d071925cbcc870ca460fd736e2d53e8ab5806ccf3dd03d5e537'
-            'abe1a55d528994e044f6bba71fac0d97313adecd9aa007fa338efdca244882db'
+
+sha256sums=('ce34339bdad50afb9bacb3cbf854e3c33a311dfb868b2ec32a812ca78845b43f'
+            '876e67526fabf83bfeb5ff50f05b2f4725f3d9bf784025707b67022a1a311f20'
+            'f15c842b06028c9e19168d3617bf2bc09545707175e1e1298d54f2a9ffdcf804'
             'ae1ed38f94304d27e4ef1ca66e15d544f99681c1e743c510c54d4a112f050421'
             '2a1e079cbea3543f356e6e9571f3d7d2a4b0ab75131ee417115d738ea191c4fb'
+            '6bd632f8741b039bad961af3d6850b651e25b7e7a3018d6e2789f350ff93bb78'
             'b1748e826d8e7cccdd825b99864b74dfb5795312f8878d63e9a87105f4382e29')

+ 10 - 0
create-default-conf-dir.patch

@@ -0,0 +1,10 @@
+--- a/scripts/upgrade/upgrade_4.4_5.0.sh
++++ a/scripts/upgrade/upgrade_4.4_5.0.sh
+@@ -206,6 +206,7 @@
+         $seafile_data_dir/seafile.conf
+         $seahub_settings_py
+     )
++    mkdir -p $default_conf_dir
+     for conffile in ${confs[*]}; do
+         if grep -q "This file has been moved" $conffile; then
+             continue

+ 4 - 2
seafile-admin_virtualenv.patch

@@ -15,6 +15,8 @@ index 102cf9f..ce77c35 100755
 -        'gunicorn_django',
 +        PYTHON,
 +        '/usr/lib/seafile/seafileenv/bin/gunicorn_django',
-         '-c', conf[CONF_SEAHUB_CONF],
-         '-b', '0.0.0.0:%s' % conf[CONF_SEAHUB_PORT],
+         '-c',
+         conf[CONF_SEAHUB_CONF],
+         '-b',
+         '0.0.0.0:%s' % conf[CONF_SEAHUB_PORT],
      ]

+ 50 - 46
seafile-server.install

@@ -1,30 +1,32 @@
 ## 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
+    virtualenv2 --system-site-packages /usr/lib/seafile/seafileenv
+    virtualenv2 --relocatable /usr/lib/seafile/seafileenv
+    source /usr/lib/seafile/seafileenv/bin/activate
 
-	pip install pip
+    pip install pip
 
-	# Dependencies as per
-	# http://manual.seafile.com/build_seafile/server.html
-	pip install "django==1.5.2"
-	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
-	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
+    # Dependencies as per
+    # http://manual.seafile.com/build_seafile/server.html
+    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
+    # Additional dependencies
+    pip install django-pipeline
 
-	deactivate
+    deactivate
 }
 
 #pacman complains if these functions don't exist, so we might as well
@@ -32,51 +34,53 @@ pre_install() {
 
 ## arg 1:  the new package version
 post_install() {
-  echo " " > /dev/null
+    echo " " > /dev/null
 }
 
 ## 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
+    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
+    pip install --upgrade pip
 
-	# Dependencies as per
-	# http://manual.seafile.com/build_seafile/server.html
-	pip install --upgrade "django==1.5.2"
-	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
-	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
+    # Dependencies as per
+    # http://manual.seafile.com/build_seafile/server.html
+    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
+    # Additional dependencies
+    pip install --upgrade django-pipeline
 
-	deactivate
+    deactivate
 }
 
 ## arg 1:  the new package version
 ## arg 2:  the old package version
 post_upgrade() {
-  echo " " > /dev/null
+    echo " " > /dev/null
 }
 
 ## arg 1:  the old package version
 pre_remove() {
-  echo " " > /dev/null
+    echo " " > /dev/null
 }
 
 ## arg 1:  the old package version
 post_remove() {
-	rm -rf /usr/lib/seafile/seafileenv
+    rm -rf /usr/lib/seafile/seafileenv
 }