summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Engledow2020-08-04 11:58:51 +0100
committerSteve Engledow2020-08-04 11:59:02 +0100
commitc5d277de0fac238d178b189ca9ac19669d100998 (patch)
tree12c22ca3be71b69fb4ae4e37dbc67e754d612a45
parent959c6d667f7dc46ba16c23eb6f498ecfd54a40d8 (diff)
downloadaur-c5d277de0fac238d178b189ca9ac19669d100998.tar.gz
Use debian Packages file to check sha256sum and generate version number
from control file
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD23
2 files changed, 22 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 110c8302d72e..b18ed6597e72 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -12,7 +12,9 @@ pkgbase = amazon-workspaces-bin
depends = webkit2gtk
options = staticlibs
source = amazon-workspaces-bin-3.0.8.529.deb::https://d3nt0h4h6pmmc4.cloudfront.net/workspacesclient_amd64.deb
- sha256sums = 803da8f95949c141ec2b6bd942cd8684a306d55cfd535f8d5f18ee2655c0f258
+ source = amazon-workspaces-bin-3.0.8.529.info::https://d3nt0h4h6pmmc4.cloudfront.net/ubuntu/dists/bionic/main/binary-amd64/Packages
+ sha256sums = SKIP
+ sha256sums = SKIP
pkgname = amazon-workspaces-bin
diff --git a/PKGBUILD b/PKGBUILD
index 94cdf7499130..aa4236545b18 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,19 +15,34 @@ makedepends=(
'binutils'
'tar'
)
-source=("$pkgname-$pkgver.deb::https://d3nt0h4h6pmmc4.cloudfront.net/workspacesclient_amd64.deb")
-sha256sums=('803da8f95949c141ec2b6bd942cd8684a306d55cfd535f8d5f18ee2655c0f258')
+source=(
+ "$pkgname-$pkgver.deb::https://d3nt0h4h6pmmc4.cloudfront.net/workspacesclient_amd64.deb"
+ "$pkgname-$pkgver.info::https://d3nt0h4h6pmmc4.cloudfront.net/ubuntu/dists/bionic/main/binary-amd64/Packages"
+)
+
+sha256sums=(
+ "SKIP"
+ "SKIP"
+)
+
+prepare() {
+ # Verify the checksum
+ echo "$(grep SHA256 "$pkgname-$pkgver.info" | cut -d" " -f2) $pkgname-$pkgver.deb" >sum
+ sha256sum -c sum
-build() {
- cd "$srcdir"
ar x "$pkgname-$pkgver.deb"
tar axvf data.tar.xz
+ tar axvf control.tar.xz
# Fix the .desktop entry
sed -i -e 's/\/opt\/workspacesclient/\/usr\/share\/amazon-workspaces/' $srcdir/usr/share/applications/workspacesclient.desktop
mv $srcdir/usr/share/applications/workspacesclient.desktop $srcdir/usr/share/applications/amazon-workspaces.desktop
}
+pkgver() {
+ grep Version control | cut -d" " -f2
+}
+
package() {
mkdir -p $pkgdir/usr/share/amazon-workspaces
mkdir -p $pkgdir/usr/bin