mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 12:57:14 +08:00
34 lines
879 B
Bash
34 lines
879 B
Bash
|
|
pkgname=mkinitcpio-busybox
|
|
pkgver=1.27.2
|
|
pkgrel=1
|
|
pkgdesc="base initramfs tools"
|
|
arch=('x86_64')
|
|
url="http://www.busybox.net/"
|
|
license=('GPL')
|
|
depends=('glibc')
|
|
options=('!buildflags')
|
|
source=("http://busybox.net/downloads/busybox-$pkgver.tar.bz2"
|
|
'config')
|
|
sha256sums=('9d4be516b61e6480f156b11eb42577a13529f75d3383850bb75c50c285de63df'
|
|
'c75ad568ff0d97b16250c3c1069c00d02ff7d72f7241b58021ad7a32b9ecb068')
|
|
|
|
prepare() {
|
|
cd "busybox-$pkgver"
|
|
|
|
local safeflags="-march=${CARCH/_/-} -mtune=generic -Os -pipe -fno-strict-aliasing"
|
|
|
|
sed 's|^\(CONFIG_EXTRA_CFLAGS\)=.*|\1="'"$safeflags"'"|' "$srcdir/config" >.config
|
|
}
|
|
|
|
build() {
|
|
make -C "busybox-$pkgver"
|
|
|
|
# save configuration for later reuse
|
|
cat busybox-$pkgver/.config > "${startdir}/config.last"
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 "$srcdir/busybox-$pkgver/busybox" "$pkgdir/usr/lib/initcpio/busybox"
|
|
}
|