Moved licenses in dedicated folder, using bsdtar instead of unzip

This commit is contained in:
AlphaJack 2024-02-20 11:49:39 +01:00
parent d3762850a7
commit 2bed061ca5
No known key found for this signature in database
2 changed files with 11 additions and 8 deletions

View file

@ -1,11 +1,12 @@
pkgbase = cyberchef-web
pkgdesc = The Cyber Swiss Army Knife - a web app for encryption, encoding, compression and data analysis
pkgver = 10.8.1
pkgrel = 1
pkgrel = 2
url = https://gchq.github.io/CyberChef/
arch = any
license = Apache-2.0
makedepends = unzip
makedepends = findutils
makedepends = libarchive
conflicts = cyberchef-html
replaces = cyberchef-html
noextract = cyberchef-web-10.8.1.zip

View file

@ -3,21 +3,23 @@
pkgname="cyberchef-web"
pkgver=10.8.1
pkgrel=1
pkgrel=2
pkgdesc="The Cyber Swiss Army Knife - a web app for encryption, encoding, compression and data analysis"
url="https://gchq.github.io/CyberChef/"
license=("Apache-2.0")
arch=("any")
conflicts=("cyberchef-html")
replaces=("cyberchef-html")
makedepends=("unzip")
source=("$pkgname-$pkgver.zip::https://github.com/gchq/CyberChef/releases/download/v$pkgver/CyberChef_v10.8.0.zip")
makedepends=("findutils" "libarchive")
source=("$pkgname-$pkgver.zip::https://github.com/gchq/CyberChef/releases/download/v$pkgver/CyberChef_v${_releaseBug:-10.8.0}.zip")
noextract=("$pkgname-$pkgver.zip")
b2sums=('5095a22c1c5b4fe320878f89d7b29d8ad908905fad78093f1e3ab2ccade97f4a36a5a3685485681966432923b6ceaf377793b68e91400eacd39c60b57b240e7b')
options=("!strip")
package(){
install -d "$pkgdir/usr/share/webapps"
unzip -q -o "$pkgname-$pkgver.zip" -d "$pkgdir/usr/share/webapps/cyberchef"
mv "$pkgdir/usr/share/webapps/cyberchef/CyberChef_v$pkgver.html" "$pkgdir/usr/share/webapps/cyberchef/index.html"
install -d "$pkgdir/usr/share/webapps/cyberchef"
install -d "$pkgdir/usr/share/licenses/cyberchef"
bsdtar --extract --file "$pkgname-$pkgver.zip" --directory "$pkgdir/usr/share/webapps/cyberchef"
mv "$pkgdir/usr/share/webapps/cyberchef/CyberChef"*.html "$pkgdir/usr/share/webapps/cyberchef/index.html"
find "$pkgdir/usr/share/webapps/cyberchef/" -type f -name "*LICENSE*" -exec mv {} "$pkgdir/usr/share/licenses/cyberchef" \;
}