summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAsamK2022-09-01 16:15:44 +0200
committerAsamK2022-09-01 16:17:12 +0200
commit2e3977775e51a0516f3e859501685b701af52688 (patch)
tree74976ae26e45671896fea7dfa25cfaf8ed1905e9
downloadaur-2e3977775e51a0516f3e859501685b701af52688.tar.gz
First commit
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD29
-rw-r--r--sequoia-octopus-librnp.hook10
-rw-r--r--sequoia-octopus-librnp.install9
4 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..34dba45440d7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = sequoia-octopus-librnp
+ pkgdesc = A Sequoia-based OpenPGP Backend for Thunderbird
+ pkgver = 1.4.1
+ pkgrel = 1
+ url = https://gitlab.com/sequoia-pgp/sequoia-octopus-librnp
+ install = sequoia-octopus-librnp.install
+ arch = i686
+ arch = x86_64
+ arch = arm
+ arch = armv7h
+ arch = armv6h
+ arch = aarch64
+ license = GPL2
+ makedepends = cargo
+ makedepends = clang
+ depends = thunderbird
+ source = sequoia-octopus-librnp-1.4.1.tar.gz::https://gitlab.com/sequoia-pgp/sequoia-octopus-librnp/-/archive/v1.4.1/sequoia-octopus-librnp-v1.4.1.tar.gz
+ source = sequoia-octopus-librnp.hook
+ sha256sums = bd88516cc6c257bb29ac79cfc1192c846666a3fee20cfa89de294090c69608ce
+ sha256sums = aa2bda370a1e9b4a880e275291caac486db65095c34d013561d6127777589709
+
+pkgname = sequoia-octopus-librnp
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c539436ce2b1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,29 @@
+# Maintainer: AsamK <asamk@gmx.de>
+pkgname=sequoia-octopus-librnp
+pkgver=1.4.1
+pkgrel=1
+pkgdesc='A Sequoia-based OpenPGP Backend for Thunderbird'
+url="https://gitlab.com/sequoia-pgp/${pkgname}"
+source=("$pkgname-$pkgver.tar.gz::https://gitlab.com/sequoia-pgp/${pkgname}/-/archive/v$pkgver/${pkgname}-v$pkgver.tar.gz"
+ "${pkgname}.hook")
+arch=('i686' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64')
+license=('GPL2')
+makedepends=('cargo' 'clang')
+install="${pkgname}.install"
+depends=('thunderbird')
+sha256sums=('bd88516cc6c257bb29ac79cfc1192c846666a3fee20cfa89de294090c69608ce'
+ 'aa2bda370a1e9b4a880e275291caac486db65095c34d013561d6127777589709')
+
+build () {
+ cd "$srcdir/$pkgname-v$pkgver"
+
+ cargo build --locked --release --target-dir target
+}
+
+# Improve when https://bugzilla.mozilla.org/show_bug.cgi?id=1698540 is done
+package() {
+ cd "$srcdir/$pkgname-v$pkgver"
+
+ install -Dm755 target/release/libsequoia_octopus_librnp.so "${pkgdir}/usr/lib/libsequoia_octopus_librnp.so"
+ install -Dm644 "${srcdir}/${pkgname}.hook" "${pkgdir}/usr/share/libalpm/hooks/${pkgname}.hook"
+}
diff --git a/sequoia-octopus-librnp.hook b/sequoia-octopus-librnp.hook
new file mode 100644
index 000000000000..08ffe1999fc9
--- /dev/null
+++ b/sequoia-octopus-librnp.hook
@@ -0,0 +1,10 @@
+[Trigger]
+Operation = Install
+Operation = Upgrade
+Type = Path
+Target = usr/lib/thunderbird/librnp.so
+
+[Action]
+Description = [sequoia-octopus-librnp] Replacing librnp.so…
+When = PostTransaction
+Exec = /bin/bash -c "if [ ! -L /usr/lib/thunderbird/librnp.so ]; then mv /usr/lib/thunderbird/{librnp.so,librnp.so.orig} ; ln -sf /usr/lib/libsequoia_octopus_librnp.so /usr/lib/thunderbird/librnp.so ; fi"
diff --git a/sequoia-octopus-librnp.install b/sequoia-octopus-librnp.install
new file mode 100644
index 000000000000..95db322abd68
--- /dev/null
+++ b/sequoia-octopus-librnp.install
@@ -0,0 +1,9 @@
+post_install() {
+ mv /usr/lib/thunderbird/{librnp.so,librnp.so.orig}
+ ln -s /usr/lib/libsequoia_octopus_librnp.so /usr/lib/thunderbird/librnp.so
+}
+
+pre_remove() {
+ rm /usr/lib/thunderbird/librnp.so
+ mv /usr/lib/thunderbird/{librnp.so.orig,librnp.so}
+}