Skip to content
Snippets Groups Projects
Verified Commit 23bcb376 authored by Max Rees's avatar Max Rees
Browse files

system/*: initial bashism removal

parent d3eb7058
No related branches found
No related tags found
No related merge requests found
......@@ -56,16 +56,16 @@ static() {
# lets sign the static binary so it can be vefified from distros
# that does not have apk-tools
local abuild_conf=${ABUILD_CONF:-"/etc/abuild.conf"}
local abuild_home=${ABUILD_USERDIR:-"$HOME/.abuild"}
local abuild_userconf=${ABUILD_USERCONF:-"$abuild_home/abuild.conf"}
local abuild_conf="${ABUILD_CONF:-"/etc/abuild.conf"}"
local abuild_home="${ABUILD_USERDIR:-"$HOME/.abuild"}"
local abuild_userconf="${ABUILD_USERCONF:-"$abuild_home/abuild.conf"}"
[ -f "$abuild_userconf" ] && . "$abuild_userconf"
local privkey="$PACKAGER_PRIVKEY"
local pubkey=${PACKAGER_PUBKEY:-"${privkey}.pub"}
local keyname=${pubkey##*/}
local pubkey="${PACKAGER_PUBKEY:-"${privkey}.pub"}"
local keyname="${pubkey##*/}"
${CROSS_COMPILE}strip "$subpkgdir"/sbin/apk.static
openssl dgst -sha1 -sign "$privkey" \
-out "$subpkgdir"/sbin/apk.static.SIGN.RSA.$keyname \
-out "$subpkgdir/sbin/apk.static.SIGN.RSA.$keyname" \
"$subpkgdir"/sbin/apk.static
}
......
......@@ -5,7 +5,7 @@ pkgname=bash
pkgver=4.4.23
_patchlevel=${pkgver##*.}
_myver=${pkgver%.*}
_patchbase=${_myver/./}
_patchbase=$(printf '%s' "$_myver" | tr -d .)
pkgrel=1
pkgdesc="The GNU Bourne Again shell"
url="https://www.gnu.org/software/bash/bash.html"
......
......@@ -10,8 +10,7 @@ license="BSD-2-Clause"
depends=""
makedepends=""
subpackages="$pkgname-doc"
source="https://github.com/gavinhoward/bc/releases/download/${pkgver/_/-}/bc-${pkgver/_/-}.tar.xz"
builddir="$srcdir"/$pkgname-${pkgver/_/-}
source="https://github.com/gavinhoward/bc/releases/download/$pkgver/bc-$pkgver.tar.xz"
build() {
PREFIX="/usr" DESTDIR="$pkgdir" ./configure.sh -g -G -O3
......
......@@ -9,10 +9,10 @@ url="https://www.gnu.org/software/coreutils/"
arch="all"
license="GPL-3.0+"
makedepends="bash acl-dev attr-dev"
[ ${CBUILD} == ${CHOST} ] && makedepends="$makedepends perl gettext-tiny
[ "${CBUILD}" = "${CHOST}" ] && makedepends="$makedepends perl gettext-tiny
gettext-tiny-dev utmps-dev"
subpackages="$pkgname-doc"
[ ${CBUILD} == ${CHOST} ] && subpackages="$subpackages $pkgname-lang"
[ "${CBUILD}" = "${CHOST}" ] && subpackages="$subpackages $pkgname-lang"
install="$pkgname.post-deinstall"
source="https://ftp.gnu.org/gnu/coreutils/$pkgname-$pkgver.tar.xz
date-debug.patch
......@@ -22,7 +22,7 @@ source="https://ftp.gnu.org/gnu/coreutils/$pkgname-$pkgver.tar.xz
gnulib-test-fixes.patch
localename-test-fix.patch
"
[ ${CBUILD} != ${CHOST} ] && source="$source
[ "${CBUILD}" != "${CHOST}" ] && source="$source
051_all_coreutils-mangen.patch
"
......@@ -43,9 +43,10 @@ build() {
--with-packager="Adélie" \
--with-packager-bug-reports="https://bts.adelielinux.org/"
if [ ${CBUILD} != ${CHOST} ]; then
set -- man/*.x
touch ${@/%x/1}
if [ "${CBUILD}" != "${CHOST}" ]; then
for i in man/*.x; do
touch "${i%x}1"
done
fi
make
}
......@@ -70,7 +71,7 @@ bd8b5cecba59eba30458c8afa895877d39a987b989bc06b70cd6836e0ef684677aaadcb4949b58a7
fd97fccd661befc558b3afb3e32c82dd2cef511a05e6129d49540599297c1b59ab1f109e63a12f585a2348c26c28fb98330c348829d1fe61cf8149d0dd1c989c gnulib-tests-dont-require-gpg-passphrase.patch
a1d014a683fb3b2e08e7392f7589fd92a565e2a4d0cac1cf960968dd3d990e020fdd3bb6aea2bbeaca3ba8f2522b4da3d75b93f414ebf83d8b26b5ccbb38a64d gnulib-test-fixes.patch
aac3a89b27a7854fbf483e155df9133c3d33a0f36bd55d5606559a7781f9d27d5c17779ea427142311749252767097bf92ec22d4cf86b510568c186da84ff16c date-debug.patch"
[ ${CBUILD} != ${CHOST} ] && sha512sums="
[ "${CBUILD}" != "${CHOST}" ] && sha512sums="
bae804f057252c25452ac178c545dc2c4b4775cbfbdcfd4775edd1a4ed6507882bfac39e2b11ad01b74230ca48d761bf62f11bde5bcbc35a6e5a61cbe4a46e36 051_all_coreutils-mangen.patch
"
return 0
......@@ -343,7 +343,7 @@ package() {
rm -f "$pkgdir"/usr/lib/libffi* "$pkgdir"/usr/share/man/man3/ffi*
find "$pkgdir" -name 'ffi*.h' | xargs rm -f
local gdblib=${_target:+$CTARGET/}lib
local gdblib="${_target:+$CTARGET/}lib"
for i in $(find "$pkgdir"/usr/$gdblib/ -type f -maxdepth 1 -name "*-gdb.py" ); do
mkdir -p "$pkgdir"/usr/share/gdb/python/auto-load/usr/$gdblib
mv "$i" "$pkgdir"/usr/share/gdb/python/auto-load/usr/$gdblib/
......@@ -368,7 +368,7 @@ package() {
# linker finds the libs from relocated sysroot
for so in "$pkgdir"/usr/$CTARGET/lib/*.so; do
if [ -h "$so" ]; then
local _real=$(basename $(readlink "$so"))
local _real="$(basename $(readlink "$so"))"
rm -f "$so"
echo "GROUP ($_real)" > "$so"
fi
......
......@@ -4,7 +4,7 @@ pkgname=icu
pkgver=63.1
# convert x.y.z to x_y_z
_ver=${pkgver//./_}
_ver=$(printf '%s' "$pkgver" | tr . _)
pkgrel=1
pkgdesc="International Components for Unicode library"
......@@ -15,7 +15,7 @@ subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs"
depends=""
checkdepends="diffutils"
makedepends=""
source="https://download.icu-project.org/files/icu4c/${pkgver}/${pkgname}4c-$_ver-src.tgz
source="https://ssl.icu-project.org/files/icu4c/${pkgver}/${pkgname}4c-$_ver-src.tgz
icu-60.2-always-use-utf8.patch
checkimpl.patch
icu-63.1-test-failure.patch
......
......@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=libedit
pkgver=20190324.3.1
_realver=${pkgver/.3.1/-3.1}
_realver="${pkgver%%.*}-${pkgver#*.}"
pkgrel=0
pkgdesc="Library providing line editing, history, and tokenisation functions"
url="https://thrysoee.dk/editline/"
......
......@@ -8,7 +8,7 @@ url="https://invisible-island.net/mawk/mawk.html"
arch="all"
license="BSD-3-Clause"
subpackages="$pkgname-doc"
_dlver="${pkgver/.201/-201}"
_dlver="${pkgver%.*}-${pkgver##*.}"
source="https://invisible-mirror.net/archives/$pkgname/$pkgname-$_dlver.tgz"
builddir="$srcdir/$pkgname-$_dlver"
......
......@@ -82,7 +82,7 @@ package() {
make DESTDIR="$pkgdir" install
# make LDSO the be the real file, and libc the symlink
local LDSO=$(make -f Makefile --eval "$(echo -e 'print-ldso:\n\t@echo $$(basename $(LDSO_PATHNAME))')" print-ldso)
local LDSO="$(make -f Makefile --eval "$(echo -e 'print-ldso:\n\t@echo $$(basename $(LDSO_PATHNAME))')" print-ldso)"
mv -f "$pkgdir"/usr/lib/libc.so "$pkgdir"/lib/"$LDSO"
ln -sf "$LDSO" "$pkgdir"/lib/libc.musl-${CARCH}.so.1
ln -sf ../../lib/"$LDSO" "$pkgdir"/usr/lib/libc.so
......
......@@ -49,8 +49,8 @@ package() {
# Install basic terms in /etc/terminfo
for i in ansi console dumb linux rxvt screen sun vt52 vt100 vt102 \
vt200 vt220 xterm xterm-color xterm-xfree86; do
local termfile=$(find "$pkgdir"/usr/share/terminfo/ -name "$i" 2>/dev/null) || true
local basedir=$(basename $(dirname "$termfile"))
local termfile="$(find "$pkgdir"/usr/share/terminfo/ -name "$i" 2>/dev/null)"
local basedir="$(basename $(dirname "$termfile"))"
[ -z "$termfile" ] && continue
......
......@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=nss
pkgver=3.44.1
_ver=${pkgver//./_}
_ver=$(printf '%s' "$pkgver" | tr . _)
pkgrel=0
pkgdesc="Mozilla Network Security Services"
url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS"
......@@ -13,7 +13,7 @@ depends=""
depends_dev="nspr-dev"
makedepends="nspr-dev sqlite-dev zlib-dev perl bsd-compat-headers"
subpackages="$pkgname-static $pkgname-dev $pkgname-tools"
source="https://ftp.mozilla.org/pub/security/$pkgname/releases/NSS_${pkgver//./_}_RTM/src/$pkgname-$pkgver.tar.gz
source="https://ftp.mozilla.org/pub/security/$pkgname/releases/NSS_${_ver}_RTM/src/$pkgname-$pkgver.tar.gz
nss.pc.in
nss-util.pc.in
nss-softokn.pc.in
......@@ -85,7 +85,7 @@ package() {
-e "s,@MOD_PATCH_VERSION@,${NSS_VPATCH},g" \
> "$pkgdir"/usr/bin/nss-config
chmod 755 "$pkgdir"/usr/bin/nss-config
local minor=${pkgver#*.}
local minor="${pkgver#*.}"
minor=${minor%.*}
for file in $(find dist/*.OBJ/lib -name "*.so"); do
install -m755 $file \
......
# Maintainer:
pkgname=openrc
pkgver=0.24.1
_ver=${pkgver/_git*/}
pkgrel=7
pkgdesc="OpenRC manages the services, startup and shutdown of a host"
url="https://github.com/OpenRC/openrc"
......@@ -33,7 +32,6 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/OpenRC/openrc/archive/$pkgve
sysfsconf.initd
"
builddir="$srcdir/$pkgname-$_ver"
prepare() {
default_prepare
sed -i -e '/^sed/d' "$builddir"/pkgconfig/Makefile
......
......@@ -73,7 +73,7 @@ replaces="ruby-etc ruby-gems"
_gemdir="/usr/lib/ruby/gems/$_abiver"
_rubydir="/usr/lib/ruby/$_abiver"
_chost="${CHOST/-foxkit-/-}"
_chost="$(printf '%s' "$CHOST" | sed 's/-foxkit-/-/')"
case "$CARCH" in
x86 | pmmx) _arch="i386";;
......@@ -136,7 +136,7 @@ package() {
rm -R "$pkgdir"$_gemdir/cache/*
if [ -d "$pkgdir"/usr/local ]; then
local f=$(cd "$pkgdir" ; find usr/local -type f)
local f="$(cd "$pkgdir" ; find usr/local -type f)"
if [ -n "$f" ]; then
error "Found files in /usr/local:"
echo "$f"
......
......@@ -3,7 +3,7 @@
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=unzip
pkgver=6.0
_pkgver=${pkgver//./}
_pkgver=$(printf '%s' "$pkgver" | tr -d .)
pkgrel=3
pkgdesc="Extract PKZIP-compatible .zip files"
url="http://www.info-zip.org/UnZip.html"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment