summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5c36b18454e4f2c63bd561af816878acfddb0dbc (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
40
41
42
43
44
45
46
47
48
49
50
51
# Maintainer: aksr <aksr at t-com dot me>
pkgname=neatlibc-git
pkgver=r162.34d290a
pkgrel=1
epoch=
pkgdesc="A small ARM/x86(_64) libc."
arch=('i686' 'x86_64')
url="http://repo.or.cz/w/neatlibc.git"
license=('custom:BSD')
groups=()
depends=()
makedepends=('git' 'neatcc-git' 'fasm' 'neatas-git')
optdepends=('neatcc-git: A simple ARM/x86(_64) C compiler' 
            'neatld-git: A simple ARM/x86(_64) static linker'
            'neatas-git: A simple ARM assembler')
checkdepends=()
provides=()
conflicts=('glibc')
replaces=()
backup=()
options=()
changelog=
install=
source=("$pkgname::git+git://repo.or.cz/neatlibc.git")
noextract=()
md5sums=('SKIP')

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

build() {
  cd "$srcdir/$pkgname"
  make CC="$(which neatcc)"
}

package() {
  cd "$srcdir/$pkgname"
  mkdir -p $pkgdir/usr/include/{arpa,linux,sys}
  install -Dm644 libc.a $pkgdir/usr/lib/libc.a
  install -m644 ctype.h dirent.h elf.h errno.h fcntl.h      \
                inttypes.h poll.h regex.h setjmp.h signal.h \
                stdarg.h stddef.h stdint.h stdio.h stdlib.h \
                string.h termios.h time.h unistd.h utime.h $pkgdir/usr/include
  install -m644 arpa/inet.h $pkgdir/usr/include/arpa
  install -m644 sys/ioctl.h sys/mman.h sys/stat.h \
                sys/time.h sys/types.h sys/wait.h $pkgdir/usr/include/sys
  install -Dm644 README $pkgdir/usr/share/doc/${pkgname%-*}/README
}