aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Brooks2020-05-18 22:21:08 +0100
committerBen Brooks2020-05-18 22:21:08 +0100
commit7357106b0edb0c7c3895a05ebf57197ce839db93 (patch)
tree71a2b261166a9da7b9518d5515973b60697efd4b
downloadaur-7357106b0edb0c7c3895a05ebf57197ce839db93.tar.gz
Initial commit (2.7.3)
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore5
-rw-r--r--Makefile10
-rw-r--r--PKGBUILD32
-rw-r--r--README.md30
-rw-r--r--sync_gateway.service17
6 files changed, 110 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..7e85a1893ec8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = sync_gateway-community-bin
+ pkgdesc = Manages access and synchronization between Couchbase Lite and Couchbase Server - Community Edition (CE)
+ pkgver = 2.7.3
+ pkgrel = 1
+ url = https://github.com/couchbase/sync_gateway
+ arch = x86_64
+ license = custom:Couchbase Community Edition License
+ provides = sync_gateway
+ conflicts = sync_gateway-git
+ source = https://packages.couchbase.com/releases/couchbase-sync-gateway/2.7.3/couchbase-sync-gateway-community_2.7.3_x86_64.deb
+ source = sync_gateway.service
+ sha256sums = 4e0306d06840c8e5a6df6984cb47feb5706df5a11058e4253eaab9d9a9044d18
+ sha256sums = 4bc3c5843b2b6e31d954a53d43c9ecdce77faf3942b5da4ffdaba846f02dd381
+
+pkgname = sync_gateway-community-bin
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..bbb17ab25ebc
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+pkg/
+src/
+couchbase-sync-gateway-community_*_x86_64.deb
+*.tar.gz
+*.tar.xz
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000000..da86da486eaf
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,10 @@
+package:
+ makepkg
+
+srcinfo: .SRCINFO
+
+.SRCINFO: PKGBUILD
+ makepkg --printsrcinfo > .SRCINFO
+
+clean:
+ rm -rf pkg src *.tar.xz couchbase-sync-gateway-community_*_x86_64.deb
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..47c9c46ce939
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Ben Brooks <ben@bbrks.me>
+# PRs/Issues: https://github.com/bbrks/aur-sync_gateway-community-bin
+
+pkgname=sync_gateway-community-bin
+pkgver=2.7.3
+pkgrel=1
+pkgdesc="Manages access and synchronization between Couchbase Lite and Couchbase Server - Community Edition (CE)"
+url="https://github.com/couchbase/sync_gateway"
+arch=('x86_64')
+license=('custom:Couchbase Community Edition License')
+provides=('sync_gateway')
+conflicts=('sync_gateway-git')
+source=(
+ "https://packages.couchbase.com/releases/couchbase-sync-gateway/${pkgver}/couchbase-sync-gateway-community_${pkgver}_x86_64.deb"
+ 'sync_gateway.service'
+)
+sha256sums=(
+ '4e0306d06840c8e5a6df6984cb47feb5706df5a11058e4253eaab9d9a9044d18'
+ '4bc3c5843b2b6e31d954a53d43c9ecdce77faf3942b5da4ffdaba846f02dd381'
+)
+
+prepare () {
+ msg2 "Extracting the data.tar.gz file"
+ tar -xf "${srcdir}/data.tar.xz"
+}
+
+package() {
+ install -Dm755 "${srcdir}/opt/couchbase-sync-gateway/bin/sync_gateway" "${pkgdir}/usr/bin/sync_gateway"
+ install -Dm644 "${srcdir}/opt/couchbase-sync-gateway/examples/serviceconfig.json" "${pkgdir}/etc/sync_gateway.json"
+ install -Dm644 "${srcdir}/sync_gateway.service" "${pkgdir}/usr/lib/systemd/system/sync_gateway.service"
+ install -Dm644 "${srcdir}/opt/couchbase-sync-gateway/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..1c708c128726
--- /dev/null
+++ b/README.md
@@ -0,0 +1,30 @@
+# aur-sync_gateway-community-bin
+
+An [AUR package](https://aur.archlinux.org/packages/sync_gateway-git/) for a prebuilt Couchbase [Sync Gateway](https://github.com/couchbase/sync_gateway) Community Edition (CE).
+
+## Getting Started
+
+This package adheres to the Filesystem Hierarchy Standard, instead of the typical Couchbase Sync Gateway installation directories, so some things to note:
+
+### Binary Location
+
+The binary can be run standalone, and is at `/usr/bin/sync_gateway`.
+
+### Systemd Service
+
+Start/Enable the systemd service:
+
+```
+# systemctl start sync_gateway
+# systemctl enable sync_gateway
+```
+
+### Config File
+
+The configuration file is at `/etc/sync_gateway.json`.
+
+You must restart Sync Gateway for any configuration changes to take effect.
+
+### Log Files
+
+Log files are written to `/var/log/sync_gateway`, in addition to journalctl.
diff --git a/sync_gateway.service b/sync_gateway.service
new file mode 100644
index 000000000000..58687013adab
--- /dev/null
+++ b/sync_gateway.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Couchbase Sync Gateway server
+After=syslog.target
+After=network.target
+
+[Service]
+LimitNOFILE=65535
+Type=simple
+ExecStartPre=/bin/mkdir -p /var/log/sync_gateway
+ExecStart=/usr/bin/sync_gateway --defaultLogFilePath /var/log/sync_gateway /etc/sync_gateway.json
+Restart=on-failure
+
+# Give a reasonable amount of time for the server to start up/shut down
+TimeoutSec=60
+
+[Install]
+WantedBy=multi-user.target