summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfilips2021-07-25 14:39:44 +0200
committerfilips2021-07-25 14:39:44 +0200
commitbeb0ea493ea72d6420faa62d2accf37d2ac31565 (patch)
tree41a1ec3044d562f86e6aeaac4852a5f4de60381e
parent75dfb8f5c6d223d358547211a8139a1304f357b8 (diff)
downloadaur-beb0ea493ea72d6420faa62d2accf37d2ac31565.tar.gz
Update to 0.5.0
-rw-r--r--.SRCINFO18
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD80
-rw-r--r--firefox-pwa.install11
-rw-r--r--package.install5
5 files changed, 69 insertions, 46 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d8a99c2c0d58..66026ff862f8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,19 @@
pkgbase = firefox-pwa
- pkgdesc = A tool to install, manage and use Progressive Web Apps (PWAs) in Mozilla Firefox. (native component)
- pkgver = 0.4.1
+ pkgdesc = A tool to install, manage and use Progressive Web Apps (PWAs) in Mozilla Firefox (native component)
+ pkgver = 0.5.0
pkgrel = 1
url = https://github.com/filips123/FirefoxPWA
- install = firefox-pwa.install
+ install = package.install
arch = x86_64
+ arch = i686
license = MPL2
makedepends = rust
makedepends = cargo
- depends = firefox
- provides = firefoxpwa
- conflicts = firefoxpwa
- source = firefox-pwa-0.4.1.tar.gz::https://github.com/filips123/FirefoxPWA/archive/refs/tags/v0.4.1.tar.gz
- sha256sums = 5d8b61c3d831063a0ba4b3ffc78e10f3513c3269af4833b51bc7ab1a818becd4
+ optdepends = firefox: Support for browser extension
+ provides = firefox-pwa-bin
+ conflicts = firefox-pwa-bin
+ source = firefox-pwa-0.5.0.tar.gz::https://github.com/filips123/FirefoxPWA/archive/refs/tags/v0.5.0.tar.gz
+ sha256sums = 40004c7a268436173813024672ea23599e387766973d36d0ee0b81793a20b169
+ b2sums = 56af4155bea6d6d533c3003fb65dda94b8bfa4fb3bdf62a075ce8c8d15a78ca4669a5416d4abcd114a8eb826ee30963eefa0b44c0f3dfeacf48d61c45c1609d8
pkgname = firefox-pwa
diff --git a/.gitignore b/.gitignore
index 3e44358aff5f..a5b1d8fc70b1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
*.tar.gz
*.tar.zst
+*.deb
pkg
src
diff --git a/PKGBUILD b/PKGBUILD
index 903b14709e78..6abb18d3589e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,43 +1,69 @@
+# Maintainer: filips <projects at filips dot si>
# Maintainer: Peter Cai <peter at typeblog dot net>
# Contributor: TheFool <rn6l05d28@relay.firefox.com>
-pkgname=firefox-pwa
_pkgname="FirefoxPWA"
-pkgdesc='A tool to install, manage and use Progressive Web Apps (PWAs) in Mozilla Firefox. (native component)'
-pkgver=0.4.1
+pkgname="firefox-pwa"
+pkgdesc="A tool to install, manage and use Progressive Web Apps (PWAs) in Mozilla Firefox (native component)"
+pkgver=0.5.0
pkgrel=1
-arch=('x86_64')
url="https://github.com/filips123/FirefoxPWA"
-license=('MPL2')
-provides=('firefoxpwa')
-conflicts=('firefoxpwa')
-depends=('firefox')
-makedepends=('rust' 'cargo')
-install=firefox-pwa.install
+arch=("x86_64" "i686")
+license=("MPL2")
+
+makedepends=("rust" "cargo")
+optdepends=("firefox: Support for browser extension")
+provides=("firefox-pwa-bin")
+conflicts=("firefox-pwa-bin")
+install=package.install
+
source=("$pkgname-$pkgver.tar.gz::https://github.com/filips123/FirefoxPWA/archive/refs/tags/v$pkgver.tar.gz")
-sha256sums=('5d8b61c3d831063a0ba4b3ffc78e10f3513c3269af4833b51bc7ab1a818becd4')
+sha256sums=('40004c7a268436173813024672ea23599e387766973d36d0ee0b81793a20b169')
+b2sums=('56af4155bea6d6d533c3003fb65dda94b8bfa4fb3bdf62a075ce8c8d15a78ca4669a5416d4abcd114a8eb826ee30963eefa0b44c0f3dfeacf48d61c45c1609d8')
prepare() {
- cd $srcdir/$_pkgname-$pkgver/native
- sed -i -e "s/^version = .*$/version = \"$pkgver\"/" Cargo.toml
- sed -i -e "s/static DISTRIBUTION_VERSION = .*;/static DISTRIBUTION_VERSION = '$pkgver';/" userchrome/profile/chrome/pwa/chrome.jsm
- # Patch to move runtime install directory inside ~/.local/share
- sed -i -e "s@let directory = .*\$@let directory = PathBuf::from(std::env::var(\"HOME\").unwrap()).join(\".local/share/firefoxpwa/runtime\");@" src/components/runtime.rs
- # We don't use libexec on Arch
- sed -i "s@/usr/libexec/firefoxpwa-connector@/usr/lib/firefoxpwa/firefoxpwa-connector@g" manifests/linux.json
+ cd $srcdir/$_pkgname-$pkgver/native/
+
+ # Set the correct version in source files
+ sed -i "s/version = \"0.0.0\"/version = \"$pkgver\"/g" Cargo.toml
+ sed -i "s/DISTRIBUTION_VERSION = '0.0.0'/DISTRIBUTION_VERSION = '$pkgver'/g" userchrome/profile/chrome/pwa/chrome.jsm
+
+ # We don't use libexec on Arch
+ sed -i "s@/usr/libexec/firefoxpwa-connector@/usr/lib/firefoxpwa/firefoxpwa-connector@g" manifests/linux.json
}
build() {
- cd $srcdir/$_pkgname-$pkgver/native
- RUSTUP_TOOLCHAIN=stable cargo build --release --target-dir=target
+ cd $srcdir/$_pkgname-$pkgver/native/
+ RUSTUP_TOOLCHAIN=stable cargo build --release
+}
+
+check() {
+ cd $srcdir/$_pkgname-$pkgver/native/
+ [ "$(./target/release/firefoxpwa --version)" == "firefoxpwa $pkgver" ]
}
package() {
- cd $srcdir/$_pkgname-$pkgver
- install -Dm755 native/target/release/firefoxpwa $pkgdir/usr/bin/firefoxpwa
- install -Dm755 native/target/release/firefoxpwa-connector $pkgdir/usr/lib/firefoxpwa/firefoxpwa-connector
- install -Dm644 native/manifests/linux.json $pkgdir/usr/lib/mozilla/native-messaging-hosts/firefoxpwa.json
- mkdir -p $pkgdir/usr/share/firefoxpwa
- cp -r native/userchrome $pkgdir/usr/share/firefoxpwa/
- chmod -R 755 $pkgdir/usr/share/firefoxpwa
+ cd $srcdir/$_pkgname-$pkgver/native/
+
+ # Executables
+ install -Dm755 target/release/firefoxpwa $pkgdir/usr/bin/firefoxpwa
+ install -Dm755 target/release/firefoxpwa-connector $pkgdir/usr/lib/firefoxpwa/firefoxpwa-connector
+
+ # Manifest
+ install -Dm644 manifests/linux.json $pkgdir/usr/lib/mozilla/native-messaging-hosts/firefoxpwa.json
+
+ # Completions
+ install -Dm755 target/release/completions/firefoxpwa.bash $pkgdir/usr/share/bash-completion/completions/firefoxpwa
+ install -Dm755 target/release/completions/firefoxpwa.fish $pkgdir/usr/share/fish/completions/firefoxpwa.fish
+ install -Dm755 target/release/completions/_firefoxpwa $pkgdir/usr/share/zsh/vendor-completions/_firefoxpwa
+
+ # Documentation
+ install -Dm644 ../README.md $pkgdir/usr/share/doc/firefoxpwa/README.md
+ install -Dm644 ../native/README.md $pkgdir/usr/share/doc/firefoxpwa/README-NATIVE.md
+ install -Dm644 ../extension/README.md $pkgdir/usr/share/doc/firefoxpwa/README-EXTENSION.md
+ install -Dm644 packages/debian/copyright $pkgdir/usr/share/doc/firefoxpwa/copyright
+
+ # UserChrome
+ mkdir -p $pkgdir/usr/share/firefoxpwa/userchrome/
+ cp -r userchrome/* $pkgdir/usr/share/firefoxpwa/userchrome/
}
diff --git a/firefox-pwa.install b/firefox-pwa.install
deleted file mode 100644
index 0aba2aaf83a1..000000000000
--- a/firefox-pwa.install
+++ /dev/null
@@ -1,11 +0,0 @@
-print_info() {
- echo "firefox-pwa is the native component of the Firefox extension FirefoxPWA. Please make sure to have the extension installed in your main Firefox profile."
-}
-
-post_install() {
- print_info
-}
-
-post_upgrade() {
- print_info
-}
diff --git a/package.install b/package.install
new file mode 100644
index 000000000000..0feb93de841c
--- /dev/null
+++ b/package.install
@@ -0,0 +1,5 @@
+post_install() {
+ echo "You have successfully installed the native part of the FirefoxPWA project"
+ echo "You should also install the Firefox extension if you haven't already"
+ echo "Download: https://addons.mozilla.org/firefox/addon/firefoxpwa/"
+}