PKGBUILDs/core/mkinitcpio-busybox/PKGBUILD
2017-06-16 12:17:35 +00:00

55 lines
1.5 KiB
Bash

# $Id$
# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Dave Reisner <dreisner@archlinux.org>
# Contributor: Thomas Bächler <thomas@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - removed -mtune, changed -march to v8/v7/v6/v5 compat
pkgname=mkinitcpio-busybox
pkgver=1.25.1
pkgrel=2
pkgdesc='Base initramfs tools'
arch=('i686' 'x86_64')
url="http://www.busybox.net/"
license=('GPL')
depends=('glibc')
options=('!buildflags')
source=("https://busybox.net/downloads/busybox-$pkgver.tar.bz2"
'config')
sha256sums=('27667e0f2328fdbd79cfd622e4453e5c57e58f781c5da97c9be337d93aa2a02e'
'fb5b6e2a0de4db5401322e5c2474ad8ce6a58615dad45b7109cfe045baf2c88d'
'd916c75c3c4627e1155c9dc40bab5fe7890fbf45d6a3bcda4936f1c5b80f7d7f')
prepare() {
cd "busybox-$pkgver"
if [ ${CARCH} = "aarch64" ]; then
ARMCARCH="armv8-a"
elif [ ${CARCH} = "armv7h" ]; then
ARMCARCH="armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16"
elif [ ${CARCH} = "armv6h" ]; then
ARMCARCH="armv6 -mfloat-abi=hard -mfpu=vfp"
else
ARMCARCH="armv5te"
fi
local safeflags="-march=${ARMCARCH} -Os -pipe -fno-strict-aliasing"
sed 's|^\(CONFIG_EXTRA_CFLAGS\)=.*|\1="'"$safeflags"'"|' "$srcdir/config" >.config
# workaround for FS#54240
if [[ $CARCH == 'i686' ]]; then
echo 'CONFIG_STATIC=y' >> .config
fi
}
build() {
make -C "busybox-$pkgver"
}
package() {
install -Dm755 "$srcdir/busybox-$pkgver/busybox" "$pkgdir/usr/lib/initcpio/busybox"
}
# vim:set ts=2 sw=2 et: