PKGBUILDs/core/mkinitcpio-busybox/PKGBUILD

53 lines
1.4 KiB
Bash
Raw Normal View History

2011-10-29 18:26:32 +00:00
# $Id: PKGBUILD 141111 2011-10-24 09:59:20Z dreisner $
# Maintainer: Dave Reisner <dreisner@archlinux.org>
2011-01-15 17:41:34 +00:00
# Maintainer: Thomas Bächler <thomas@archlinux.org>
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
2016-06-21 23:51:03 +00:00
pkgver=1.24.2
2016-03-20 17:52:27 +00:00
pkgrel=1
2011-01-15 17:41:34 +00:00
pkgdesc="base initramfs tools"
arch=('i686' 'x86_64')
url="http://www.busybox.net/"
license=('GPL')
depends=('glibc')
2011-10-29 18:26:32 +00:00
options=('!buildflags')
source=("http://busybox.net/downloads/busybox-$pkgver.tar.bz2"
2012-09-27 12:45:23 +00:00
'glibc-2.16.patch'
2011-10-29 18:26:32 +00:00
'config')
2016-06-21 23:51:03 +00:00
sha256sums=('e71ef53ec656f31c42633918d301405d40dea1d97eca12f272217ae4a971c855'
2012-09-27 12:45:23 +00:00
'fb5b6e2a0de4db5401322e5c2474ad8ce6a58615dad45b7109cfe045baf2c88d'
2016-03-20 17:52:27 +00:00
'fd4e5571d9bdde368e01d601a9e05df05001827bffb2f574187b4f47db4cec55')
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
2016-03-20 17:52:27 +00:00
patch -Np1 <"$srcdir/glibc-2.16.patch"
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
}
2011-10-29 18:26:32 +00:00
2011-01-15 17:41:34 +00:00
# vim:set ts=2 sw=2 et: