summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 875be77a64bf6a4bdb36af6c83f457aa66b4b019 (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
pkgname=redox-binutils
pkgver=r89563.fca55db437
pkgrel=1
arch=(any)
license=(GPL)
source=(git+https://github.com/redox-os/binutils-gdb)
makedepends=('git')
md5sums=('SKIP')

prepare() {
  cd "$srcdir/binutils-gdb"
  sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
}

build() {
  cd "$srcdir/binutils-gdb"

  ./configure \
	  --target=$_target \
	  --prefix=/usr \
	  --with-sysroot=/usr/$_target \
	  --disable-gdb \
          --disable-nls \
	  --disable-werror

  make
}

package() {
  cd "$srcdir/binutils-gdb"
  make DESTDIR="$pkgdir" install
  rm -rf "$pkgdir"/usr/share/info
}

pkgver() {
  cd "$srcdir/binutils-gdb"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}