summaryrefslogtreecommitdiff
path: root/testing/mkinitcpio-busybox/PKGBUILD
blob: 4861c2f33b4446d2c82d463a33cdf98520be070d (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 141095 2011-10-23 18:50:38Z dreisner $
# Maintainer: Dave Reisner <dreisner@archlinux.org>
# Maintainer: Thomas Bächler <thomas@archlinux.org>

pkgname=mkinitcpio-busybox
pkgver=1.19.2
pkgrel=1
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=('ea7ec9b6df70b8c528f4a2b6300e9913431c7223308fb08dfafa7508d75a0cb9'
            '21ae2cd21e33ba1ef9500a9b14273579fc554bf995cfd7907fb3fe94fc162cf8')

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/lib/initcpio/busybox"
}

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