bottles-opener: new package
This commit is contained in:
1 parent
b7079ecff4
commit
54d9875d56
5 files changed
+114
No files matched your search
@@ -0,0 +1,28 @@
|
||||
pkgbase = bottles-opener
|
||||
pkgdesc = Double-click a file and it opens in its Windows program, inside its Bottles bottle
|
||||
pkgver = 0.1.0
|
||||
pkgrel = 1
|
||||
url = https://github.com/Felitendo/bottles-opener
|
||||
install = bottles-opener.install
|
||||
arch = any
|
||||
license = GPL-3.0-or-later
|
||||
makedepends = gettext
|
||||
makedepends = scdoc
|
||||
depends = bash
|
||||
depends = coreutils
|
||||
depends = gawk
|
||||
depends = grep
|
||||
depends = sed
|
||||
depends = gettext
|
||||
depends = shared-mime-info
|
||||
depends = systemd
|
||||
optdepends = bottles: Bottles itself (the Flatpak works too)
|
||||
optdepends = python-yaml: read bottles without starting the Bottles Flatpak
|
||||
optdepends = icoextract: extract file icons without starting the Bottles Flatpak
|
||||
optdepends = libnotify: report files that could not be opened
|
||||
optdepends = desktop-file-utils: refresh the desktop database after a change
|
||||
optdepends = flatpak: open files with the Bottles Flatpak
|
||||
source = bottles-opener-0.1.0.tar.gz::https://github.com/Felitendo/bottles-opener/archive/refs/tags/v0.1.0.tar.gz
|
||||
sha256sums = 4120340cacb141feb4cbbd16475a894873bfff3f4b9ba969614918b68ae5ab6c
|
||||
|
||||
pkgname = bottles-opener
|
||||
@@ -0,0 +1,32 @@
|
||||
# Maintainer: Felitendo
|
||||
# This PKGBUILD is updated automatically:
|
||||
# https://github.com/Felitendo/PKGBUILDS
|
||||
|
||||
pkgname=bottles-opener
|
||||
pkgver=0.1.0
|
||||
pkgrel=1
|
||||
pkgdesc="Double-click a file and it opens in its Windows program, inside its Bottles bottle"
|
||||
arch=('any')
|
||||
url="https://github.com/Felitendo/bottles-opener"
|
||||
license=('GPL-3.0-or-later')
|
||||
depends=('bash' 'coreutils' 'gawk' 'grep' 'sed' 'gettext' 'shared-mime-info' 'systemd')
|
||||
makedepends=('gettext' 'scdoc')
|
||||
optdepends=('bottles: Bottles itself (the Flatpak works too)'
|
||||
'python-yaml: read bottles without starting the Bottles Flatpak'
|
||||
'icoextract: extract file icons without starting the Bottles Flatpak'
|
||||
'libnotify: report files that could not be opened'
|
||||
'desktop-file-utils: refresh the desktop database after a change'
|
||||
'flatpak: open files with the Bottles Flatpak')
|
||||
install="${pkgname}.install"
|
||||
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
|
||||
sha256sums=('4120340cacb141feb4cbbd16475a894873bfff3f4b9ba969614918b68ae5ab6c')
|
||||
|
||||
build() {
|
||||
# pass the version being packaged so `bottles-opener --version` cannot drift
|
||||
# away from pkgver
|
||||
make -C "${pkgname}-${pkgver}" VERSION="$pkgver"
|
||||
}
|
||||
|
||||
package() {
|
||||
make -C "${pkgname}-${pkgver}" VERSION="$pkgver" DESTDIR="$pkgdir" install
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
post_install() {
|
||||
cat <<'MSG'
|
||||
|
||||
bottles-opener is installed but not active yet.
|
||||
|
||||
bottles-opener interactive menu
|
||||
bottles-opener enable set up file opening for your bottles
|
||||
|
||||
Run it as your own user, not with sudo: it only ever writes inside your own
|
||||
home directory.
|
||||
|
||||
MSG
|
||||
}
|
||||
|
||||
pre_remove() {
|
||||
# The changes live in each user's home and cannot be undone from a root-run
|
||||
# hook, so say so while the command that does it still exists.
|
||||
cat <<'MSG'
|
||||
|
||||
Before removing this package, run
|
||||
|
||||
bottles-opener disable
|
||||
|
||||
as each user that enabled it. That removes the file types, launchers and
|
||||
icons it added and puts back the previous default applications.
|
||||
|
||||
MSG
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
# bottles-opener - opens files in their Windows program inside Bottles
|
||||
# (https://github.com/Felitendo/bottles-opener).
|
||||
#
|
||||
# Shell and two small Python scripts, a gettext catalog and a scdoc man page:
|
||||
# the PKGBUILD runs the upstream Makefile against the release tarball.
|
||||
|
||||
UPSTREAM_REPO="Felitendo/bottles-opener"
|
||||
|
||||
# Installed in CI (pacman) before the makepkg test build.
|
||||
BUILD_DEPS=(gettext scdoc)
|
||||
|
||||
latest_version() {
|
||||
gh api "repos/$UPSTREAM_REPO/releases/latest" --jq '.tag_name' | sed 's/^v//'
|
||||
}
|
||||
|
||||
# refresh_checksums <version> <pkgbuild-path>
|
||||
refresh_checksums() {
|
||||
local ver="$1" pkgbuild="$2"
|
||||
local sha
|
||||
|
||||
sha="$(curl -sfL "https://github.com/$UPSTREAM_REPO/archive/refs/tags/v$ver.tar.gz" \
|
||||
| sha256sum | cut -d' ' -f1)"
|
||||
|
||||
sed -i "s|^sha256sums=.*|sha256sums=('$sha')|" "$pkgbuild"
|
||||
}
|
||||
Reference in new issue
Block a user