summaryrefslogtreecommitdiff
path: root/core/mkinitcpio-busybox/PKGBUILD
blob: e17c3f9cf155fe6e4f42a1a1c7e2ac4688bd388e (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: PKGBUILD 141112 2011-10-24 09:59:21Z 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' 'mips64el')
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"

  case $CARCH in
  mips64el)
    local safeflags='loongson2f -O2 -mabi=n32 -mplt -Wa,-mfix-loongson2f-nop -Os -pipe -fno-strict-aliasing' ;;
  *)
    local safeflags="${CARCH/_/-} -mtune=generic -Os -pipe -fno-strict-aliasing" ;;
  esac

  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: