mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
47 lines
1.3 KiB
Bash
47 lines
1.3 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.28.3
|
|
pkgrel=1
|
|
pkgdesc='Base initramfs tools'
|
|
arch=(x86_64)
|
|
url="http://www.busybox.net/"
|
|
license=(GPL)
|
|
depends=(glibc)
|
|
options=(!buildflags)
|
|
source=(https://busybox.net/downloads/busybox-$pkgver.tar.bz2
|
|
config)
|
|
sha256sums=('ad0d22033f23e696f9a71a4c2f9210194dda39b024a79151f4ac278995332a6e'
|
|
'cb97bf879450457c97cb2a2b6c0e4821ce6fc8962cca36e4039b3d7e8498bf38')
|
|
|
|
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
|
|
}
|
|
|
|
build() {
|
|
make -C "busybox-$pkgver"
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 "$srcdir/busybox-$pkgver/busybox" "$pkgdir/usr/lib/initcpio/busybox"
|
|
}
|