summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlphaJack2022-01-29 00:51:19 +0100
committerAlphaJack2022-01-29 00:51:19 +0100
commit64869c0dd5c63d8f80ee4eacb4879ffef9b61650 (patch)
treec716e45b57bee01c2c8af0f5d1b79e90c0695b5e
parentca7353b64de481edade5a164e4ebd96440582a84 (diff)
downloadaur-64869c0dd5c63d8f80ee4eacb4879ffef9b61650.tar.gz
Added checksum file
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD17
-rw-r--r--corecrypto.zip.sha2561
3 files changed, 16 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9aabe482beae..e8c1308cf417 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = libcorecrypto
pkgdesc = Library implementing Apple low-level cryptographic primitives
pkgver = 2020
- pkgrel = 1
+ pkgrel = 2
url = https://developer.apple.com/security/
arch = x86_64
arch = armv7h
@@ -12,6 +12,8 @@ pkgbase = libcorecrypto
makedepends = curl
makedepends = unzip
source = LICENSE
- sha256sums = SKIP
+ source = corecrypto.zip.sha256
+ sha256sums = ffaf28b090b70d896fad024204eb0a84d0fb4d2f32c9861b9ba7f78bc50120e7
+ sha256sums = 217dfea4bda798c67c7b293d03493d3dfd0c6ccd258b00b379d2dbcdd6fb8d3e
pkgname = libcorecrypto
diff --git a/PKGBUILD b/PKGBUILD
index ce0f78e186d9..e4a583608ac5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,20 +2,24 @@
pkgname="libcorecrypto"
pkgver=2020
-pkgrel=1
+pkgrel=2
pkgdesc="Library implementing Apple low-level cryptographic primitives"
url="https://developer.apple.com/security/"
license=("custom")
arch=("x86_64" "armv7h" "aarch64")
makedepends=("clang" "cmake" "curl" "unzip")
-source=("LICENSE")
-sha256sums=('SKIP')
+source=("LICENSE"
+ "corecrypto.zip.sha256")
+sha256sums=('ffaf28b090b70d896fad024204eb0a84d0fb4d2f32c9861b9ba7f78bc50120e7'
+ '217dfea4bda798c67c7b293d03493d3dfd0c6ccd258b00b379d2dbcdd6fb8d3e')
build(){
# get corecrypto.zip from apple website
# since apple doesn't allow redistribution of the archive, and that a canonical download link would have been too mainstream, i had to use firefox > copy as curl
# also the server doesn't seem to support byte ranges, so to skip the download we cannot rely on curl
- if [ ! -f "corecrypto.zip" ]; then
+ if [ -f "corecrypto.zip" ] && sha256sum --check --quiet "corecrypto.zip.sha256"; then
+ echo "[OK] Skipping download, corecrypto.zip already exists"
+ else
echo "[W8] Downloading corecrypto.zip from Apple (~40MB)"
curl -s 'https://developer.apple.com/file/?file=security&agree=Yes' \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0' \
@@ -35,9 +39,10 @@ build(){
-H 'Cache-Control: no-cache' \
-o "corecrypto.zip"
echo "[OK] Download complete"
- else
- echo "[OK] Skipping download, corecrypto.zip already exists"
fi
+ echo "[W8] Checking hash"
+ sha256sum --check --quiet "corecrypto.zip.sha256" || return 1
+ echo "[OK] Hash matches"
unzip -q -o "corecrypto.zip"
cd "corecrypto"
# https://wiki.archlinux.org/title/CMake_package_guidelines
diff --git a/corecrypto.zip.sha256 b/corecrypto.zip.sha256
new file mode 100644
index 000000000000..6eb2b2c5889a
--- /dev/null
+++ b/corecrypto.zip.sha256
@@ -0,0 +1 @@
+207e7692417089413001bb1c70bd6c7cfd0b6c64a340be33c1ff17291282240c corecrypto.zip