summaryrefslogtreecommitdiffstats
path: root/abs/core/mkinitcpio-busybox/PKGBUILD
blob: 023f6303d99eb115750721210f216912753f3975 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# $Id$
# Maintainer: Dave Reisner <dreisner@archlinux.org>
# Maintainer: Thomas Bächler <thomas@archlinux.org>

pkgname=mkinitcpio-busybox
pkgver=1.21.1
pkgrel=2
pkgdesc="base initramfs tools"
arch=('i686' 'x86_64')
url="http://www.busybox.net/"
license=('GPL')
depends=('glibc')
options=('!buildflags')
source=("http://busybox.net/downloads/busybox-$pkgver.tar.bz2"
        'glibc-2.16.patch'
        'config')
sha256sums=('cd5be0912ec856110ae12c76c3ec9cd5cba1df45b5a9da2b095b8284d1481303'
            'fb5b6e2a0de4db5401322e5c2474ad8ce6a58615dad45b7109cfe045baf2c88d'
            '240c9ab805fbf5eb3347b2a42f62d840f160c4999d0f172b28ba50dadad09ada')

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

  patch -Np1 <"$srcdir/glibc-2.16.patch"
}

build() {
  make -C "busybox-$pkgver"
}

package() {
  install -Dm755 "$srcdir/busybox-$pkgver/busybox" "$pkgdir/usr/lib/initcpio/busybox"
}

# vim:set ts=2 sw=2 et: