Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add package: webinterface-upload-button v1.0.1 #771

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions package/webinterface-upload-button/package
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env bash
# Copyright (c) 2021 The Toltec Contributors
# SPDX-License-Identifier: MIT

_pkgname='webinterface-upload-button'
pkgnames=("$_pkgname")
pkgdesc="A simple upload button for the web interface"
url="https://github.com/rM-self-serve/$_pkgname"
pkgver=1.0.1-1
timestamp=2023-12-06T11:43:00Z
section="utils"
maintainer="rM-self-serve <[email protected]>"
license=MIT

source=(
"$url"/archive/1c69d4fcaa1cb8e2cf4b022a190429dc39946498.zip
)
sha256sums=(
a388d1db49a3c35782600efbd94ee449c59f46c223f14c254cb74d9509255d96
)

package() {
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir/$_pkgname"

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

configure() {
echo
echo "Applying webinterface-upload-button"
webinterface-upload-button apply -y > /dev/null
echo "Success"
echo
}

_restore() {
echo
echo "Reverting webinterface-upload-button"
webinterface-upload-button revert -y > /dev/null
echo "Success"
echo
}

preremove() {
_restore
}

preupgrade() {
_restore
}