summaryrefslogtreecommitdiff
path: root/core/mkinitcpio-busybox/PKGBUILD
blob: 436add0c537c0c77a3eecd855c12c888ddefbfcf (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
# $Id: PKGBUILD 153485 2012-03-14 23:26:22Z tomegun $
# Maintainer: Dave Reisner <dreisner@archlinux.org>
# Maintainer: Thomas Bächler <thomas@archlinux.org>

pkgname=mkinitcpio-busybox
pkgver=1.19.4
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"
        'config')
sha256sums=('9b853406da61ffb59eb488495fe99cbb7fb3dd29a31307fcfa9cf070543710ee'
            '28dc775e12c40718b48e1dd6a63544ca9d8aa128f786577b27e4df73e1e8766a')

build() {
  cd "$srcdir/busybox-$pkgver"

  local safeflags="${CARCH/_/-} -mtune=generic -Os -pipe -fno-strict-aliasing"

  sed 's|^\(CONFIG_EXTRA_CFLAGS\)=.*|\1="-march='"$safeflags"'"|' \
    "$srcdir/config" > .config

  make
}

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

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