diff options
author | FabioLolix | 2024-04-09 14:20:57 +0200 |
---|---|---|
committer | FabioLolix | 2024-04-09 14:20:57 +0200 |
commit | f2ea08394ac148a20f4aba8d27cc5d7e0b3d939b (patch) | |
tree | 14e2e310951966914e2bf55cc2e8703b5b50deed /PKGBUILD | |
parent | 6d870c9ddfe379a12466fb5f7b0fad0477722869 (diff) | |
download | aur-syncthing-git.tar.gz |
revision
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 93 |
1 files changed, 62 insertions, 31 deletions
@@ -6,57 +6,71 @@ # Contributor: Martin Wimpress <code@flexion.org> pkgbase=syncthing-git -pkgname=(syncthing-git syncthing-relaysrv-git) -pkgver=1.22.1.rc.2.r1.g816354e66 -pkgrel=1 +pkgname=(syncthing-git syncthing-discosrv-git syncthing-relaysrv-git) +pkgver=1.27.6.r0.g61b94b9ea +pkgrel=2 arch=(x86_64) url="https://syncthing.net/" -license=(MPL) -makedepends=(git go inetutils) +license=(MPL-2.0) +depends=(glibc) +makedepends=(git go) source=("git+https://github.com/syncthing/syncthing.git" + "https://raw.githubusercontent.com/archlinux/svntogit-community/packages/syncthing/trunk/syncthing-discosrv.sysusers" + "https://raw.githubusercontent.com/archlinux/svntogit-community/packages/syncthing/trunk/syncthing-discosrv.tmpfiles" + "https://raw.githubusercontent.com/archlinux/svntogit-community/packages/syncthing/trunk/syncthing-discosrv.service" "https://raw.githubusercontent.com/archlinux/svntogit-community/packages/syncthing/trunk/syncthing-relaysrv.sysusers" "https://raw.githubusercontent.com/archlinux/svntogit-community/packages/syncthing/trunk/syncthing-relaysrv.tmpfiles" "https://raw.githubusercontent.com/archlinux/svntogit-community/packages/syncthing/trunk/syncthing-relaysrv.service" "https://raw.githubusercontent.com/archlinux/svntogit-community/packages/syncthing/trunk/gcc-pie-segfaults-race.patch") sha256sums=('SKIP' + 'f6e704dd7b10127b1642c889a29e95468daa75d895493b235ce1ed5e97155b70' + 'a05a66efbbd13f20b5c3af56692fe219fadc967dba4eedb71494827795d2c140' + '4dc66a098cf2f6e5bd34a48898f5c98aff74d3c8c61115313b0eff6b8d8b18f6' '6ab96a5949e223d315d49663734ad27b70c72469c691a61ac198cb7794cb5eaa' 'f899998985f2d374af57f17ef6362c37a305467858195b74d1c1def71d97273f' '7c2fbc9608d81f8080f8a9102b867a52a050b61f426a0c182ccc1cb5815e4981' - 'b571fe7ccf516a49efb295ae58b51bb36ef3bfcaa5ed99f36d419cfa262c65f1') + '6a58227c09a18fc7049ec38351a0fd98195688d15821d67d5af4facda401cbba') options=(!lto) prepare() { - install -d "src/github.com/syncthing" - mv syncthing "src/github.com/syncthing/syncthing" + #patch -Np1 -i "${srcdir}/gcc-pie-segfaults-race.patch" + + #install -d "src/github.com/syncthing" + #mv syncthing "src/github.com/syncthing/syncthing" # go-pie with -race segfaults - cd "${srcdir}/src/github.com/syncthing/syncthing" - patch -Np1 -i "${srcdir}/gcc-pie-segfaults-race.patch" + #cd "${srcdir}/src/github.com/syncthing/syncthing" +true } pkgver() { - cd "src/github.com/syncthing/syncthing" + #cd "src/github.com/syncthing/syncthing" + cd "syncthing" git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } build() { export BUILD_HOST=archlinux export GOPATH="$SRCDEST/go-modules" GOROOT_FINAL="/usr/bin" - cd "${srcdir}/src/github.com/syncthing/syncthing" + #cd "${srcdir}/src/github.com/syncthing/syncthing" + cd "syncthing" export CGO_CPPFLAGS="${CPPFLAGS}" export CGO_CFLAGS="${CFLAGS}" export CGO_CXXFLAGS="${CXXFLAGS}" export CGO_LDFLAGS="${LDFLAGS}" - export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" + export GOFLAGS="-trimpath -mod=readonly -modcacherw" go run build.go -no-upgrade build go run build.go -no-upgrade build strelaysrv + go run build.go -no-upgrade build stdiscosrv } check() { - export GOPATH="$SRCDEST/go-modules" GOROOT_FINAL="/usr/bin" - cd "${srcdir}/src/github.com/syncthing/syncthing" - if [ "${CARCH}" == "x86_64" ] ; then - go run build.go -no-upgrade test - fi + #export GOPATH="$SRCDEST/go-modules" GOROOT_FINAL="/usr/bin" + #cd "${srcdir}/src/github.com/syncthing/syncthing" + #cd "syncthing" + #if [ "${CARCH}" == "x86_64" ] ; then + # go run build.go -no-upgrade test + #fi +true } package_syncthing-git() { @@ -64,7 +78,7 @@ package_syncthing-git() { conflicts=(syncthing) provides=(syncthing) - cd "${srcdir}/src/github.com/syncthing/syncthing" + cd "syncthing" install -Dm755 syncthing "${pkgdir}/usr/bin/syncthing" install -Dm644 README.md "${pkgdir}/usr/share/doc/syncthing/README.md" install -Dm644 "etc/linux-systemd/system/syncthing-resume.service" \ @@ -74,18 +88,16 @@ package_syncthing-git() { install -Dm644 "etc/linux-systemd/user/syncthing.service" \ "${pkgdir}/usr/lib/systemd/user/syncthing.service" - # license - install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/syncthing/LICENSE - # ufw preset install -Dm644 etc/firewall-ufw/syncthing \ - "$pkgdir/etc/ufw/applications.d/ufw-syncthing" + "${pkgdir}/etc/ufw/applications.d/ufw-syncthing" + + # sysctl conf + install -Dm644 etc/linux-sysctl/30-syncthing.conf \ + "${pkgdir}/usr/lib/sysctl.d/30-syncthing.conf" # man pages - cd "${srcdir}/src/github.com/syncthing/syncthing/man" -# for file in $(find . -name '*.1' -print); do -# install -Dm644 $file "${pkgdir}"/usr/share/man/man1/$file -# done + pushd man install -Dm644 syncthing.1 "${pkgdir}"/usr/share/man/man1/syncthing.1 for file in $(find . -name '*.5' -print); do install -Dm644 $file "${pkgdir}"/usr/share/man/man5/$file @@ -95,17 +107,36 @@ package_syncthing-git() { done } +package_syncthing-discosrv-git() { + pkgdesc="Discovery server for Syncthing" + conflicts=(syncthing-discosrv) + provides=(syncthing-discosrv) + + cd "syncthing" + install -Dm755 stdiscosrv "${pkgdir}"/usr/bin/syncthing-discosrv + + install -Dm644 man/stdiscosrv.1 \ + "${pkgdir}"/usr/share/man/man1/syncthing-discosrv.1 + + install -Dm644 "${srcdir}"/syncthing-discosrv.service \ + "${pkgdir}"/usr/lib/systemd/system/syncthing-discosrv.service + install -Dm644 "${srcdir}/syncthing-discosrv.tmpfiles" \ + "$pkgdir/usr/lib/tmpfiles.d/syncthing-discosrv.conf" + install -Dm644 "${srcdir}/syncthing-discosrv.sysusers" \ + "${pkgdir}/usr/lib/sysusers.d/syncthing-discosrv.conf" +} + package_syncthing-relaysrv-git() { - pkgdesc='Relay server for Syncthing' + pkgdesc="Relay server for Syncthing" conflicts=(syncthing-relaysrv) provides=(syncthing-relaysrv) - cd "${srcdir}/src/github.com/syncthing/syncthing" - install -Dm755 strelaysrv "${pkgdir}"/usr/bin/syncthing-relaysrv + cd "syncthing" + install -Dm755 strelaysrv "${pkgdir}"/usr/bin/strelaysrv install -Dm644 man/strelaysrv.1 \ "${pkgdir}"/usr/share/man/man1/syncthing-relaysrv.1 - + install -Dm644 "${srcdir}"/syncthing-relaysrv.service \ "${pkgdir}"/usr/lib/systemd/system/syncthing-relaysrv.service install -Dm644 "${srcdir}/syncthing-relaysrv.tmpfiles" \ |