Skip to content

Commit

Permalink
Add package: signature-rm v1.0.2 (#772)
Browse files Browse the repository at this point in the history
* Add package: signature-rM v1.0.2

* auto apply/revert; reinstall on reenable

* conflicts=(ddvk-hacks)

* remove error suppression

* #770 and #772 conflict

---------

Co-authored-by: Nathaniel van Diepen <[email protected]>
  • Loading branch information
rM-self-serve and Eeems authored Dec 8, 2023
1 parent 2672d22 commit 051ca4c
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 1 deletion.
61 changes: 61 additions & 0 deletions package/signature-rm/package
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/usr/bin/env bash
# Copyright (c) 2021 The Toltec Contributors
# SPDX-License-Identifier: MIT

_pkgname='signature-rm'
pkgnames=("$_pkgname")
pkgdesc="Remove the signature from the bottom of emails"
url="https://github.com/rM-self-serve/signature-rM"
pkgver=1.0.2-1
timestamp=2023-12-06T11:43:00Z
section="utils"
maintainer="rM-self-serve <[email protected]>"
license=MIT
image=rust:v3.1
conflicts=(ddvk-hacks webinterface-onboot)

source=(
"$url"/archive/b5561af4eb6a0f5aa6e98e1a1279066f0c4bd9b7.zip
)
sha256sums=(
1a7cc8bf7a3f5a7cc9a10ca968bbb5a0082a065760f4cb7038fdb6b9aed4bb00
)

build() {
cargo build --release
}

package() {
install -D -m 755 -t "$pkgdir"/opt/bin \
"$srcdir/target/armv7-unknown-linux-gnueabihf/release/$_pkgname"

touch "$srcdir"/emptyfile
install -D -m 666 -t "$pkgdir"/usr/share/toltec/reenable.d/"$_pkgname" "$srcdir"/emptyfile
}

configure() {
echo
echo "Applying signature-rM"
signature-rm apply -y > /dev/null
echo "Success"
echo
}

_restore() {
echo "Reverting /usr/bin/xochitl"
if signature-rm has-backup > /dev/null; then
signature-rm revert --backup -y > /dev/null
else
signature-rm revert --reverse -y > /dev/null
fi
echo "Success"
echo
}

preremove() {
_restore
}

preupgrade() {
_restore
}
2 changes: 1 addition & 1 deletion package/webinterface-onboot/package
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ timestamp=2023-12-03T11:43:00Z
section="utils"
maintainer="rM-self-serve <[email protected]>"
license=MIT
conflicts=(ddvk-hacks)
conflicts=(ddvk-hacks signature-rm)

source=(
"$url"/archive/cdfe457435974f7ca309b1ac50f1b2ef67000813.zip
Expand Down

0 comments on commit 051ca4c

Please sign in to comment.