From d88bec13aba5df0d27c0eee5e089d58d658ce838 Mon Sep 17 00:00:00 2001 From: Brieuc Dubois Date: Sun, 14 Jan 2024 02:33:46 +0100 Subject: [PATCH] PKGBUILD for server --- README.md | 7 +++++-- backend/.gitignore | 1 + backend/LICENSE | 7 +++++++ backend/PKGBUILD | 39 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 backend/.gitignore create mode 100644 backend/LICENSE create mode 100644 backend/PKGBUILD diff --git a/README.md b/README.md index 9f26d1a..a370e6e 100644 --- a/README.md +++ b/README.md @@ -61,12 +61,15 @@ For other platforms, you can build the desktop app yourself using `npm run tauri PUBLIC_BACKEND_URL=http://localhost:3000 ./focus ``` -#### AUR +### AUR ```sh -yay -S focus-desktop-bin +yay -S focus-desktop-bin # Desktop app +yay -S focus-server-git # Server ``` +The server can then be started with `focus-server` or `systemctl start focus-server.service` and the client with `focus`. + ### Debug Mode To run Focus locally, follow these steps: diff --git a/backend/.gitignore b/backend/.gitignore new file mode 100644 index 0000000..974ca64 --- /dev/null +++ b/backend/.gitignore @@ -0,0 +1 @@ +focus-server-git diff --git a/backend/LICENSE b/backend/LICENSE new file mode 100644 index 0000000..0d9cc72 --- /dev/null +++ b/backend/LICENSE @@ -0,0 +1,7 @@ +Copyright © 2023 Brieuc Dubois + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/backend/PKGBUILD b/backend/PKGBUILD new file mode 100644 index 0000000..df28078 --- /dev/null +++ b/backend/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Brieuc Dubois +pkgname=focus-server-git +pkgver=r$(git rev-list --count HEAD).$(git rev-parse --short HEAD) +pkgrel=1 +pkgdesc="Focus is an open-source, Kanban-style project management tool, emphasizing simplicity and efficiency." +arch=('x86_64') +license=('MIT') +provides=("${pkgname%-git}=${pkgver}") +conflicts=("${pkgname%-git}") +url="https://git.bhasher.com/bhasher/focus" + +source=( + "$pkgname::git+https://git.bhasher.com/bhasher/focus.git" + "LICENSE::https://git.bhasher.com/Bhasher/focus/raw/branch/master/LICENSE.md" +) +md5sums=( + 'SKIP' + 'SKIP' +) + +depends=( + 'glibc' +) +makedepends=( + 'go' + 'git' +) + +build() { + cd "$srcdir/$pkgname/backend" + CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o focus-server . +} + +package() { + install -Dm755 "${srcdir}/${pkgname}/backend/focus-server" "${pkgdir}/usr/bin/focus-server" + install -Dm644 "${srcdir}/${pkgname}/backend/focus-server.service" "${pkgdir}/usr/lib/systemd/system/focus-server.service" + install -Dm644 "${srcdir}/${pkgname}/LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} +