diff --git a/README.md b/README.md index ebfce1f..13b8059 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,24 @@ Desktop build: go build ./... ``` +## Arch Linux Package + +An AUR-style package definition for the Linux desktop client lives under: + +- `packaging/archlinux/keepassgo-git/` + +From that directory you can build and install it with: + +```bash +makepkg -si +``` + +The package installs: + +- `/usr/bin/keepassgo` +- a desktop entry at `/usr/share/applications/keepassgo.desktop` +- application icons under the hicolor theme + ## Android Packaging KeePassGO uses Gio, so Android packaging is done with `gogio`. diff --git a/packaging/archlinux/keepassgo-git/.SRCINFO b/packaging/archlinux/keepassgo-git/.SRCINFO new file mode 100644 index 0000000..2390798 --- /dev/null +++ b/packaging/archlinux/keepassgo-git/.SRCINFO @@ -0,0 +1,26 @@ +pkgbase = keepassgo-git + pkgdesc = KeePass-compatible password manager written in Go + pkgver = r160.5fa79bd + pkgrel = 1 + url = https://git.julianfamily.org/joejulian/keepassgo + arch = x86_64 + arch = aarch64 + license = custom + makedepends = git + makedepends = go + makedepends = pkgconf + depends = glibc + depends = hicolor-icon-theme + depends = libx11 + depends = libxcursor + depends = libxfixes + depends = libxkbcommon + depends = libxkbcommon-x11 + depends = mesa + depends = wayland + provides = keepassgo + conflicts = keepassgo + source = git+https://git.julianfamily.org/joejulian/keepassgo.git + sha256sums = SKIP + +pkgname = keepassgo-git diff --git a/packaging/archlinux/keepassgo-git/PKGBUILD b/packaging/archlinux/keepassgo-git/PKGBUILD new file mode 100644 index 0000000..6abb8ed --- /dev/null +++ b/packaging/archlinux/keepassgo-git/PKGBUILD @@ -0,0 +1,63 @@ +pkgname=keepassgo-git +pkgver=r0.0000000 +pkgrel=1 +pkgdesc='KeePass-compatible password manager written in Go' +arch=('x86_64' 'aarch64') +url='https://git.julianfamily.org/joejulian/keepassgo' +license=('custom') +depends=( + 'glibc' + 'hicolor-icon-theme' + 'libx11' + 'libxcursor' + 'libxfixes' + 'libxkbcommon' + 'libxkbcommon-x11' + 'mesa' + 'wayland' +) +makedepends=( + 'git' + 'go' + 'pkgconf' +) +provides=('keepassgo') +conflicts=('keepassgo') +source=('git+https://git.julianfamily.org/joejulian/keepassgo.git') +sha256sums=('SKIP') + +_repo_dir() { + if [[ -d "${srcdir}/keepassgo/.git" ]]; then + printf '%s\n' "${srcdir}/keepassgo" + return + fi + + cd "${startdir}/../../.." || exit 1 + pwd +} + +pkgver() { + cd "$(_repo_dir)" + printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "$(_repo_dir)" + export CGO_ENABLED=1 + export GOFLAGS="-trimpath" + go build -o keepassgo . +} + +package() { + cd "$(_repo_dir)" + + install -Dm755 keepassgo "${pkgdir}/usr/bin/keepassgo" + install -Dm644 assets/keepassgo-icon.png \ + "${pkgdir}/usr/share/icons/hicolor/512x512/apps/keepassgo.png" + install -Dm644 assets/keepassgo-icon.svg \ + "${pkgdir}/usr/share/icons/hicolor/scalable/apps/keepassgo.svg" + install -Dm644 packaging/archlinux/keepassgo-git/keepassgo.desktop \ + "${pkgdir}/usr/share/applications/keepassgo.desktop" + install -Dm644 README.md \ + "${pkgdir}/usr/share/licenses/${pkgname}/README.md" +} diff --git a/packaging/archlinux/keepassgo-git/keepassgo.desktop b/packaging/archlinux/keepassgo-git/keepassgo.desktop new file mode 100644 index 0000000..fcb5626 --- /dev/null +++ b/packaging/archlinux/keepassgo-git/keepassgo.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Name=KeePassGO +Comment=KeePass-compatible password manager +Exec=keepassgo +Icon=keepassgo +Terminal=false +Categories=Utility;Security; +Keywords=keepass;password;vault;kdbx; +StartupNotify=true