summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD40
2 files changed, 29 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 11ba69548bc..ef44b33df99 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = seafile-server
pkgdesc = Seafile server core
- pkgver = 8.0.6
+ pkgver = 9.0.2
pkgrel = 1
url = https://github.com/haiwen/seafile-server
arch = i686
@@ -10,6 +10,7 @@ pkgbase = seafile-server
arch = aarch64
license = AGPL3
makedepends = vala
+ makedepends = go
depends = fuse2
depends = mariadb-libs
depends = python
@@ -19,12 +20,12 @@ pkgbase = seafile-server
depends = libarchive
depends = libldap
conflicts = seafile
- source = seafile-server-8.0.6.tar.gz::https://github.com/haiwen/seafile-server/archive/v8.0.6-server.tar.gz
+ source = seafile-server-9.0.2.tar.gz::https://github.com/haiwen/seafile-server/archive/v9.0.2-server.tar.gz
source = fix_seafile-controller_paths.diff
source = seafile-server@.service
source = seafile-sysusers.conf
source = seafile-tmpfiles.conf
- sha256sums = 14849fc7c45f29bf874516d5bdda2a2681f2cf4f3130703dee8fcb51bbc2a6ad
+ sha256sums = 292257b584dcb775504fb22595e5b0903005abfee1990078527c7f9726548c8c
sha256sums = c4bd2b24fa2e5919b1ada61fff0dda7486460a8814764dc37db79178378d4930
sha256sums = b09ab24829df0692e78b777802298b8cac23bdcdc31306e12ed3543833a7088e
sha256sums = 2faf52556d901ae18cfaa33b1cc55ee14abab4f78869eb6a2889ceeac4e3076a
diff --git a/PKGBUILD b/PKGBUILD
index ec905e463da..6f661c2ccdf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
# Contributor: Aaron Lindsay <aaron@aclindsay.com>
pkgname=seafile-server
-pkgver=8.0.6
+pkgver=9.0.2
pkgrel=1
pkgdesc='Seafile server core'
arch=('i686' 'x86_64' 'armv7h' 'armv6h' 'aarch64')
@@ -20,7 +20,7 @@ depends=(
'libarchive'
'libldap'
)
-makedepends=('vala')
+makedepends=('vala' 'go')
conflicts=('seafile')
source=(
"$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver-server.tar.gz"
@@ -30,7 +30,7 @@ source=(
'seafile-tmpfiles.conf'
)
sha256sums=(
- '14849fc7c45f29bf874516d5bdda2a2681f2cf4f3130703dee8fcb51bbc2a6ad'
+ '292257b584dcb775504fb22595e5b0903005abfee1990078527c7f9726548c8c'
'c4bd2b24fa2e5919b1ada61fff0dda7486460a8814764dc37db79178378d4930'
'b09ab24829df0692e78b777802298b8cac23bdcdc31306e12ed3543833a7088e'
'2faf52556d901ae18cfaa33b1cc55ee14abab4f78869eb6a2889ceeac4e3076a'
@@ -39,17 +39,8 @@ sha256sums=(
prepare() {
cd "$srcdir/$pkgname-$pkgver-server"
- # Remove scripts for tests and others OS
- rm -rf "./scripts/"{build,upgrade/win32,*.bat,*.md} "./integration-tests"
-
- # Apply patchs
+ sed -i 's|(DESTDIR)@prefix@|@prefix@|' './lib/libseafile.pc.in'
patch -p1 -i "$srcdir/fix_seafile-controller_paths.diff"
- sed -i "s|(DESTDIR)@prefix@|@prefix@|" "./lib/libseafile.pc.in"
-
- # Fix paths to Gunicorn
- sed -e 's|gunicorn_exe=.*|gunicorn_exe=/usr/bin/gunicorn|g' \
- -e 's|thirdpart/bin/gunicorn|$gunicorn_exe|g' \
- -i ./scripts/seahub.sh
}
build() {
@@ -63,6 +54,24 @@ build() {
--enable-console \
--enable-ldap
make
+
+ # Goland file-server
+ export GOPATH="$srcdir"
+ export CGO_CPPFLAGS="$CPPFLAGS"
+ export CGO_CFLAGS="$CFLAGS"
+ export CGO_CXXFLAGS="$CXXFLAGS"
+ export CGO_LDFLAGS="$LDFLAGS"
+ export CGO_ENABLED=1
+
+ GOFLAGS='-buildmode=pie'
+ GOFLAGS+=' -trimpath'
+ GOFLAGS+=' -ldflags=-linkmode=external'
+ GOFLAGS+=' -mod=readonly'
+ GOFLAGS+=' -modcacherw'
+ export GOFLAGS
+
+ cd ./fileserver
+ go build .
}
package() {
@@ -70,13 +79,14 @@ package() {
make DESTDIR="$pkgdir" install
# Prepare directories layout for deploying
- # These makes setup-seafile*.sh happy, whether we use them or not
install -dm755 "$pkgdir/usr/share/$pkgname/"{runtime,seafile/docs}
cp -p ./doc/*.doc "$pkgdir/usr/share/$pkgname/seafile/docs"
+ cp -rp ./scripts/* "$pkgdir/usr/share/$pkgname"
# The scripts needs this bin directory.
ln -s /usr/bin/ "$pkgdir/usr/share/$pkgname/seafile/bin"
- cp -r -p "./scripts"/* "$pkgdir/usr/share/$pkgname/"
+
+ install -Dm755 ./fileserver/fileserver "$pkgdir/usr/bin/fileserver"
# Systemd
install -Dm644 \