PKGBUILDs/core/mkinitcpio-busybox/PKGBUILD

53 lines
1.4 KiB
Bash
Raw Normal View History

2016-12-29 14:12:28 +00:00
# $Id$
# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Dave Reisner <dreisner@archlinux.org>
# Contributor: Thomas Bächler <thomas@archlinux.org>
2011-01-15 17:41:34 +00:00
2012-03-15 16:24:37 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2015-07-09 04:51:31 +00:00
# - removed -mtune, changed -march to v8/v7/v6/v5 compat
2011-01-16 05:37:25 +00:00
2011-01-15 17:41:34 +00:00
pkgname=mkinitcpio-busybox
2017-10-21 19:50:30 +00:00
pkgver=1.27.2
2017-06-28 19:50:07 +00:00
pkgrel=1
2016-12-29 14:12:28 +00:00
pkgdesc='Base initramfs tools'
2017-06-28 19:50:07 +00:00
arch=(i686 x86_64)
2011-01-15 17:41:34 +00:00
url="http://www.busybox.net/"
2017-06-28 19:50:07 +00:00
license=(GPL)
depends_x86_64=(glibc)
options=(!buildflags)
source=(https://busybox.net/downloads/busybox-$pkgver.tar.bz2
config)
2017-10-21 19:50:30 +00:00
sha256sums=('9d4be516b61e6480f156b11eb42577a13529f75d3383850bb75c50c285de63df'
'c75ad568ff0d97b16250c3c1069c00d02ff7d72f7241b58021ad7a32b9ecb068')
2011-01-15 17:41:34 +00:00
2013-07-26 14:49:51 +00:00
prepare() {
cd "busybox-$pkgver"
2011-01-15 17:41:34 +00:00
2015-07-09 04:51:31 +00:00
if [ ${CARCH} = "aarch64" ]; then
ARMCARCH="armv8-a"
elif [ ${CARCH} = "armv7h" ]; then
2012-03-15 16:24:37 +00:00
ARMCARCH="armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16"
2012-09-27 12:45:23 +00:00
elif [ ${CARCH} = "armv6h" ]; then
ARMCARCH="armv6 -mfloat-abi=hard -mfpu=vfp"
2011-02-21 17:11:48 +00:00
else
2011-10-29 18:26:32 +00:00
ARMCARCH="armv5te"
2011-02-21 17:11:48 +00:00
fi
2011-10-29 18:26:32 +00:00
2013-07-26 14:49:51 +00:00
local safeflags="-march=${ARMCARCH} -Os -pipe -fno-strict-aliasing"
2011-10-29 18:26:32 +00:00
2013-07-26 14:49:51 +00:00
sed 's|^\(CONFIG_EXTRA_CFLAGS\)=.*|\1="'"$safeflags"'"|' "$srcdir/config" >.config
2011-10-29 18:26:32 +00:00
2017-06-16 12:17:35 +00:00
# workaround for FS#54240
if [[ $CARCH == 'i686' ]]; then
echo 'CONFIG_STATIC=y' >> .config
fi
2013-07-26 14:49:51 +00:00
}
2012-09-27 12:45:23 +00:00
2013-07-26 14:49:51 +00:00
build() {
make -C "busybox-$pkgver"
2011-01-15 17:41:34 +00:00
}
package() {
2012-03-15 16:24:37 +00:00
install -Dm755 "$srcdir/busybox-$pkgver/busybox" "$pkgdir/usr/lib/initcpio/busybox"
2011-01-15 17:41:34 +00:00
}