diff options
author | Siavash Askari Nasr | 2021-07-03 23:43:15 +0430 |
---|---|---|
committer | Siavash Askari Nasr | 2021-07-03 23:43:15 +0430 |
commit | 11b70c2175e1a1e0a829627e61af0352089895ae (patch) | |
tree | b6bcfecdd486038d635f87021c73ee2d56f35c76 | |
download | aur-11b70c2175e1a1e0a829627e61af0352089895ae.tar.gz |
Publish germanium-bin v1.2.0
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 21 | ||||
-rwxr-xr-x | prepare_pkg.raku | 34 |
4 files changed, 74 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..3edb1841164e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = germanium-bin + pkgdesc = Generate image from source code + pkgver = 1.2.0 + pkgrel = 1 + url = https://github.com/matsuyoshi30/germanium + arch = x86_64 + arch = i686 + arch = aarch64 + license = MIT + provides = germanium + source_x86_64 = germanium-bin-1.2.0.tar.gz::https://github.com/matsuyoshi30/germanium/releases/download/v1.2.0/germanium_1.2.0_linux_x86_64.tar.gz + sha256sums_x86_64 = 08c9fd242960997b82a3d5d13685e4794aed4cf723216f3e31296e0cc1fc43c7 + source_i686 = germanium-bin-1.2.0.tar.gz::https://github.com/matsuyoshi30/germanium/releases/download/v1.2.0/germanium_1.2.0_linux_386.tar.gz + sha256sums_i686 = a2bdb2041cb81c0db21754f4098549fac147b664911ceab3a85d10ad22859736 + source_aarch64 = germanium-bin-1.2.0.tar.gz::https://github.com/matsuyoshi30/germanium/releases/download/v1.2.0/germanium_1.2.0_linux_arm64.tar.gz + sha256sums_aarch64 = 98f86954539239283392ca64417156b5c753507d69161a6452f8a3e8f0cbeee1 + +pkgname = germanium-bin diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..f59ec20aabf5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*
\ No newline at end of file diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..45f20f579ba2 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,21 @@ +# Maintainer: Siavash Askari Nasr <ciavash@protonmail.com> +pkgname=germanium-bin +pkgver=1.2.0 +pkgrel=1 +pkgdesc="Generate image from source code" +arch=('x86_64' 'i686' 'aarch64') +url='https://github.com/matsuyoshi30/germanium' +license=(MIT) +provides=("${pkgname%-bin}") +source_x86_64=("$pkgname-$pkgver.tar.gz::$url/releases/download/v$pkgver/${pkgname%-bin}_${pkgver}_linux_x86_64.tar.gz") +source_i686=("$pkgname-$pkgver.tar.gz::$url/releases/download/v$pkgver/${pkgname%-bin}_${pkgver}_linux_386.tar.gz") +source_aarch64=("$pkgname-$pkgver.tar.gz::$url/releases/download/v$pkgver/${pkgname%-bin}_${pkgver}_linux_arm64.tar.gz") +sha256sums_x86_64=('08c9fd242960997b82a3d5d13685e4794aed4cf723216f3e31296e0cc1fc43c7') +sha256sums_i686=('a2bdb2041cb81c0db21754f4098549fac147b664911ceab3a85d10ad22859736') +sha256sums_aarch64=('98f86954539239283392ca64417156b5c753507d69161a6452f8a3e8f0cbeee1') + +package() { + install -Dm755 "${pkgname%-bin}" -t "${pkgdir}/usr/bin" + install -Dm644 CREDITS -t "${pkgdir}/usr/share/doc/${pkgname%-bin}" + install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname%-bin}" +} diff --git a/prepare_pkg.raku b/prepare_pkg.raku new file mode 100755 index 000000000000..5234d77219ac --- /dev/null +++ b/prepare_pkg.raku @@ -0,0 +1,34 @@ +#!/usr/bin/env raku + +unit sub MAIN ($pkgver); + +put 'Downloading checksums file.'; + +my $p := run «wget -q -O - + "https://github.com/matsuyoshi30/germanium/releases/download/v$pkgver/germanium_{$pkgver}_checksums.txt"», + :out; + +my %checksums = $p.out.lines.grep(/linux/).split(/\s+/).hash.antipairs; + +my $PKGBUILD_file := 'PKGBUILD'.IO; + +my $PKGBUILD = $PKGBUILD_file.slurp; + +# Set package version +$PKGBUILD ~~ s/<?after ^^ 'pkgver='>\N+/$pkgver/; + +# Set package checksums +for %checksums.kv -> $linux, $checksum { + $PKGBUILD ~~ s/<?after ^^ 'sha256sums_x86_64='> \N+/('$checksum')/ if $linux ~~ /'x86_64'/; + $PKGBUILD ~~ s/<?after ^^ 'sha256sums_i686='> \N+/('$checksum')/ if $linux ~~ /'386'/; + $PKGBUILD ~~ s/<?after ^^ 'sha256sums_aarch64='> \N+/('$checksum')/ if $linux ~~ /'arm64'/; +} + +put 'Writing to PKGBUILD.'; +$PKGBUILD_file.spurt: $PKGBUILD; + +put 'Writing to .SRCINFO'; +run <makepkg --printsrcinfo>, :out('.SRCINFO'.IO.open: :w); + +put 'Running makepkg --install'; +run <makepkg --install>; |