From e448b9fdfb5c680325a2b1ac17f81e94bf622eba Mon Sep 17 00:00:00 2001 From: psykose Date: Wed, 28 Jun 2023 23:51:06 +0000 Subject: [PATCH] abr: add apkbuild-shellcheck closes #2 --- abr/APKBUILD | 10 +++- abr/APKBUILD_SHIM | 113 ++++++++++++++++++++++++++++++++++++++++ abr/apkbuild-shellcheck | 16 ++++++ 3 files changed, 137 insertions(+), 2 deletions(-) create mode 100644 abr/APKBUILD_SHIM create mode 100644 abr/apkbuild-shellcheck diff --git a/abr/APKBUILD b/abr/APKBUILD index c79a2dc..3406c46 100644 --- a/abr/APKBUILD +++ b/abr/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: psykose pkgname=abr -pkgver=15 +pkgver=16 pkgrel=0 pkgdesc="abr~!" url="https://git.ddd.rip/ptrcnull/aports" @@ -18,8 +18,10 @@ checkdepends=" shfmt " source=" + APKBUILD_SHIM abr apkbuild-anitya + apkbuild-shellcheck " builddir="$srcdir" options="!check" # manual @@ -37,11 +39,15 @@ check() { } package() { - install -Dm755 abr apkbuild-anitya \ + install -Dm755 abr apkbuild-anitya apkbuild-shellcheck \ -t "$pkgdir"/usr/bin/ + install -Dm644 APKBUILD_SHIM \ + -t "$pkgdir"/usr/share/abuild/ } sha512sums=" +c011f82c90acf0de2b16db3b264cda52b182de9640b9edae985fd646c235969f3f5d3f003ec0e5df1035959e567bb55f85018308c989db95e21d93d3cd93742b APKBUILD_SHIM a84ccfb1d57aedfd2c7e2770132ea7e6fc06bef9dc2f59b73157ad169bd060ee1fd4a99e4c0668ceabbfc00faa215fea9ad3a80d8895abd427b748ba1c2e8add abr 71d8cb1e5e57ff739915fa4de1f5699afa60ab36e2e5219c4c366af5ceab24dc6ee55e738d29ca2b63dd5e387de7661594fc86bf2183d787932e75b4c03c6a9f apkbuild-anitya +482835319d06aab0fc3548e3c217f6e117c3bf812034252539624b6de8d179f9662c3db91df1228fd5d85bea76b679d1e4c4e122223d87d4ea817ec74dac8dcf apkbuild-shellcheck " diff --git a/abr/APKBUILD_SHIM b/abr/APKBUILD_SHIM new file mode 100644 index 0000000..3514ef8 --- /dev/null +++ b/abr/APKBUILD_SHIM @@ -0,0 +1,113 @@ +#!/bin/sh + +set -e + +arch= +builddir= +checkdepends= +depends= +depends_dev= +depends_doc= +depends_libs= +depends_openrc= +depends_static= +install= +install_if= +langdir= +ldpath= +license= +makedepends= +makedepends_build= +makedepends_host= +md5sums= +options= +patch_args= +pkgbasedir= +pkgdesc= +pkgdir= +pkgname= +pkgrel= +pkgver= +pkggroups= +pkgusers= +provides= +provider_priority= +replaces= +sha256sums= +sha512sums= +somask= +sonameprefix= +source= +srcdir= +startdir= +subpackages= +subpkgdir= +subpkgname= +triggers= +url= + +# abuild.conf + +CFLAGS= +CXXFLAGS= +CPPFLAGS= +LDFLAGS= +JOBS= +MAKEFLAGS= +CMAKE_CROSSOPTS= + +. ./APKBUILD + +: "$arch" +: "$builddir" +: "$checkdepends" +: "$depends" +: "$depends_dev" +: "$depends_doc" +: "$depends_libs" +: "$depends_openrc" +: "$depends_static" +: "$install" +: "$install_if" +: "$langdir" +: "$ldpath" +: "$license" +: "$makedepends" +: "$makedepends_build" +: "$makedepends_host" +: "$md5sums" +: "$options" +: "$patch_args" +: "$pkgbasedir" +: "$pkgdesc" +: "$pkgdir" +: "$pkgname" +: "$pkgrel" +: "$pkgver" +: "$pkggroups" +: "$pkgusers" +: "$provides" +: "$provider_priority" +: "$replaces" +: "$sha256sums" +: "$sha512sums" +: "$somask" +: "$sonameprefix" +: "$source" +: "$srcdir" +: "$startdir" +: "$subpackages" +: "$subpkgdir" +: "$subpkgname" +: "$triggers" +: "$url" + +# abuild.conf + +: "$CFLAGS" +: "$CXXFLAGS" +: "$CPPFLAGS" +: "$LDFLAGS" +: "$JOBS" +: "$MAKEFLAGS" +: "$CMAKE_CROSSOPTS" diff --git a/abr/apkbuild-shellcheck b/abr/apkbuild-shellcheck new file mode 100644 index 0000000..e90722e --- /dev/null +++ b/abr/apkbuild-shellcheck @@ -0,0 +1,16 @@ +#!/bin/sh + +shellcheck -s ash \ + -e SC3043 \ + -e SC3057 \ + -e SC3060 \ + -e SC2016 \ + -e SC2086 \ + -e SC2169 \ + -e SC2155 \ + -e SC2100 \ + -e SC2209 \ + -e SC2030 \ + -e SC2031 \ + -e SC1090 \ + -xa /usr/share/abuild/APKBUILD_SHIM