PKGBUILD 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Contributor: Aaron Lindsay <aaron@aclindsay.com>
  2. # Maintainer: Edvinas Valatka <edacval@gmail.com>
  3. pkgname=seafile-server
  4. pkgver=4.4.2
  5. pkgrel=3
  6. pkgdesc="Next-generation open source cloud storage with advanced features on privacy protection and teamwork. (Server components, without seahub)"
  7. arch=('i686' 'x86_64' 'armv6h' 'armv7h')
  8. url="https://github.com/haiwen/seafile/"
  9. license=('GPL3')
  10. 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')
  11. makedepends=('vala' 'intltool')
  12. conflicts=('django' 'django-rest-framework', 'seafile')
  13. options=('!libtool' '!emptydirs')
  14. install=seafile-server.install
  15. source=("https://github.com/haiwen/seafile/archive/v${pkgver}-server.tar.gz"
  16. "seafile-admin_virtualenv.patch"
  17. "seafile-server.install"
  18. "seafile-server@.service"
  19. "seahub-preupgrade"
  20. "0001-Revert-server-put-pids-folder-out-of-seafile-data.patch")
  21. prepare ()
  22. {
  23. cd "${srcdir}/seafile-${pkgver}-server"
  24. patch -p1 -i ${srcdir}/seafile-admin_virtualenv.patch
  25. patch -p1 -i ${srcdir}/0001-Revert-server-put-pids-folder-out-of-seafile-data.patch
  26. }
  27. build ()
  28. {
  29. cd "${srcdir}/seafile-${pkgver}-server"
  30. ./autogen.sh
  31. ./configure --enable-server --disable-client --disable-python --prefix=/usr PYTHON=/usr/bin/python2
  32. make -j1
  33. }
  34. package ()
  35. {
  36. # Install library and header files
  37. cd "${srcdir}/seafile-${pkgver}-server"
  38. make DESTDIR="${pkgdir}" install
  39. # Remove files already installed by seafile-shared
  40. # to maintain compatibility
  41. rm -rf "${pkgdir}/usr/lib"
  42. rm -rf "${pkgdir}/usr/include"
  43. # Install all scripts
  44. mkdir -p "${pkgdir}/usr/share/$pkgname"
  45. cp -r -p "${srcdir}/seafile-${pkgver}-server/scripts" "${pkgdir}/usr/share/$pkgname/scripts"
  46. # Remove win32-specific scripts
  47. rm -rf "${pkgdir}/usr/share/$pkgname/scripts/upgrade/win32"
  48. # Fix all script's python 2 requirement
  49. egrep -s -l -r '#!/usr/bin/env python' "${pkgdir}" | xargs sed -i -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|g'
  50. # Fix upgrade script's invald use of $INSTALLPATH to find seafile binaries
  51. sed -i 's|${INSTALLPATH}/seafile/bin|/usr/bin|g' "${pkgdir}/usr/share/seafile-server/scripts/upgrade/upgrade_2.2_3.0.sh"
  52. # Workaround for strange behaviour in the Makefile, which
  53. # installs python bindings in the package root directory,
  54. # even though they were disabled
  55. rm -rf "${pkgdir}/seaserv"
  56. rm -rf "${pkgdir}/seafile"
  57. # Install license
  58. install -D -m644 "${srcdir}/seafile-${pkgver}-server/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
  59. # Install systemd service
  60. install -D -m644 "${srcdir}/seafile-server@.service" "${pkgdir}/usr/lib/systemd/system/seafile-server@.service"
  61. # Install seahub preupgrade script
  62. install -D -m755 "${srcdir}/seahub-preupgrade" "${pkgdir}/usr/bin/seahub-preupgrade"
  63. }
  64. sha256sums=('7e244f05b20a6bfd7282b8a00eb3e1cda8ecefd98fc2b92210665549aebebe22'
  65. '4127284c1d8a4d071925cbcc870ca460fd736e2d53e8ab5806ccf3dd03d5e537'
  66. 'abe1a55d528994e044f6bba71fac0d97313adecd9aa007fa338efdca244882db'
  67. 'ae1ed38f94304d27e4ef1ca66e15d544f99681c1e743c510c54d4a112f050421'
  68. '2a1e079cbea3543f356e6e9571f3d7d2a4b0ab75131ee417115d738ea191c4fb'
  69. 'b1748e826d8e7cccdd825b99864b74dfb5795312f8878d63e9a87105f4382e29')