ctucx.git: alpine-pkgs

My personal alpine-packages [deprecated in favor of nixos]

commit 3aca38cbfa35f7ea014cb5066c8bc0c6dd118324
parent c60c769429425cbc1c0d622e88136ee9eac506a4
Author: Leah (ctucx) <leah@ctu.cx>
Date: Wed, 20 Jan 2021 20:43:51 +0100

nim(ble): cleanup
2 files changed, 31 insertions(+), 37 deletions(-)
M
nim/APKBUILD
|
56
+++++++++++++++++++++++++-------------------------------
M
nimble/APKBUILD
|
12
++++++------
diff --git a/nim/APKBUILD b/nim/APKBUILD
@@ -1,7 +1,5 @@
 # Contributor: Jakub Jirutka <jakub@jirutka.cz>
-# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
-#
-# WARNING: There may be breakages!
+# Maintainer: Leah (ctucx) <leah@ctu.cx>
 pkgname=nim
 pkgver=1.4.2
 pkgrel=1

@@ -10,12 +8,12 @@ url="https://nim-lang.org/"
 arch="all !s390x"
 license="MIT"
 checkdepends="nodejs"
-subpackages="$pkgname-doc nimsuggest niminst"
+subpackages="${pkgname}-doc nimsuggest niminst"
 depends=""
 makedepends="gc-dev"
-source="$pkgname-$pkgver.tar.gz::https://github.com/nim-lang/Nim/archive/v$pkgver.tar.gz
-        $pkgname-csources-0.20.0.tar.gz::https://github.com/nim-lang/csources/archive/v0.20.0.tar.gz"
-builddir="$srcdir/Nim-$pkgver"
+source="${pkgname}-${pkgver}.tar.gz::https://github.com/nim-lang/Nim/archive/v${pkgver}.tar.gz
+        ${pkgname}-csources-0.20.0.tar.gz::https://github.com/nim-lang/csources/archive/v0.20.0.tar.gz"
+builddir="${srcdir}/Nim-${pkgver}"
 
 # Don't run tests on armhf, it'd take eternity...
 # Can't run tests on mips, no nodejs...

@@ -25,12 +23,12 @@ case "$CARCH" in
 esac
 
 prepare() {
-	mv "$srcdir"/csources-0.20.0 "$builddir"/csources
+	mv "${srcdir}"/csources-0.20.0 "${builddir}"/csources
 	default_prepare
 }
 
 build() {
-	cd "$builddir"/csources
+	cd ${builddir}/csources
 
 	msg2 "Building nim csources..."
 	./build.sh

@@ -60,50 +58,46 @@ build() {
 
 
 check() {
-	cd "$builddir"
+	cd ${builddir}
 	# XXX: Some tests fail!
 	./koch tests --pedantic --targets="c js" all || true
 }
 
 package() {
-	export PATH="$builddir/bin:${PATH}"
+	export PATH="{$builddir}/bin:${PATH}"
 
-	./koch install "$pkgdir"
+	./koch install ${pkgdir}
 
-	install -d "$pkgdir/usr/lib"
+	install -d ${pkgdir}/usr/lib
 
-	cp -a lib "$pkgdir/usr/lib/nim"
-	cp -a compiler "$pkgdir/usr/lib/nim"
+	cp -a lib ${pkgdir}/usr/lib/nim
+	cp -a compiler ${pkgdir}/usr/lib/nim
 
-	install -Dm 644 compiler.nimble "$pkgdir/usr/lib/nim/compiler"
-	install -m 755 lib/libnimrtl.so "$pkgdir/usr/lib/libnimrtl.so"
+	install -Dm 644 compiler.nimble "${pkgdir}/usr/lib/nim/compiler"
+	install -m 755 lib/libnimrtl.so "${pkgdir}/usr/lib/libnimrtl.so"
 
-	ln -s /usr/share/nim/doc "$pkgdir/usr/lib/nim/doc"
+	ln -s /usr/share/nim/doc "${pkgdir}/usr/lib/nim/doc"
 
-	install -Dm 644 config/* -t "$pkgdir/etc/nim"
-	install -Dm 755 bin/* -t "$pkgdir/usr/bin"
+	install -Dm 644 config/* -t "${pkgdir}/etc/nim"
+	install -Dm 755 bin/* -t "${pkgdir}/usr/bin"
 
-	mkdir -p "$pkgdir/usr/include"
-	cp -a "$pkgdir/usr/lib/nim/"*.h "$pkgdir/usr/include"
+	mkdir -p "${pkgdir}/usr/include"
+	cp -a ${pkgdir}/usr/lib/nim/*.h "${pkgdir}/usr/include"
 
-	install -d "$pkgdir/usr/share/nim/doc"
-	cp -a examples doc/* "$pkgdir/usr/share/nim/doc"
+	install -d ${pkgdir}/usr/share/nim/doc
+	cp -a examples doc/* ${pkgdir}/usr/share/nim/doc
 
-	install -Dm 644 copying.txt -t "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+	install -Dm 644 copying.txt -t ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
 }
 
 nimsuggest() {
 	pkgdesc="idetools for the nim language"
-
-	install -D -m 755 "$builddir"/nimsuggest/nimsuggest \
-		"$subpkgdir"/usr/bin/nimsuggest
+	install -D -m 755 ${builddir}/nimsuggest/nimsuggest ${subpkgdir}/usr/bin/nimsuggest
 }
 
 niminst() {
 	pkgdesc="A tool to generate an installer for a Nim program"
-
-	install -D -m 755 "$builddir"/tools/niminst/niminst \
-		"$subpkgdir"/usr/bin/niminst
+	install -D -m 755 ${builddir}/tools/niminst/niminst ${subpkgdir}/usr/bin/niminst
 }
 
 sha512sums="eef8f7a8c1cdc80971f5bf3ad388923543c038f14a42cb705c3c3e317ef90c5b626d671c7711eb34ffa1ef7a35fef36151682a2a7f26c83f53836a9fe69d6a39  nim-1.4.2.tar.gz
diff --git a/nimble/APKBUILD b/nimble/APKBUILD
@@ -1,5 +1,5 @@
 # Contributor: Jakub Jirutka <jakub@jirutka.cz>
-# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Leah (ctucx) <leah@ctu.cx>
 pkgname=nimble
 pkgver=0.12.0
 pkgrel=0

@@ -8,17 +8,17 @@ url="https://github.com/nim-lang/nimble"
 arch="all !s390x"
 license="BSD-3-Clause"
 depends="nim"
-source="$pkgname-$pkgver.tar.gz::https://github.com/nim-lang/$pkgname/archive/v$pkgver.tar.gz"
-builddir="$srcdir/$pkgname-$pkgver"
+source="${pkgname}-${pkgver}.tar.gz::https://github.com/nim-lang/${pkgname}/archive/v${pkgver}.tar.gz"
+builddir="${srcdir}/${pkgname}-${pkgver}"
 
 build() {
-	cd "$builddir"
+	cd "${builddir}"
 	nim compile -d:release src/nimble
 }
 
 package() {
-	cd "$builddir"
-	install -D -m 755 src/nimble "$pkgdir"/usr/bin/nimble
+	cd "${builddir}"
+	install -D -m 755 src/nimble ${pkgdir}/usr/bin/nimble
 
 	mkdir -p ${pkgdir}/usr/share/nimble
 	cp -a src/nimblepkg "${pkgdir}/usr/share/${pkgname}"