summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Schieli2019-07-20 18:45:36 +0200
committerCédric Schieli2019-07-20 18:45:36 +0200
commitccf11fdbeb45d22bca0af838bfd82499a2c01aef (patch)
treed2b21f7b381a394694f370e7a2572c9ef41416af
downloadaur-ccf11fdbeb45d22bca0af838bfd82499a2c01aef.tar.gz
Initial commit
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD49
2 files changed, 66 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c8455ee01442
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = klibc
+ pkgdesc = A minimalistic libc subset for use with initramfs
+ pkgver = 2.0.6
+ pkgrel = 1
+ url = https://mirrors.kernel.org/pub/linux/libs/klibc/
+ arch = x86_64
+ license = GPL
+ makedepends = linux-api-headers
+ depends = perl
+ options = staticlibs
+ source = https://mirrors.kernel.org/pub/linux/libs/klibc/2.0/klibc-2.0.6.tar.xz
+ source = fix_missing_include_in_sys_mman_h.patch::https://git.kernel.org/pub/scm/libs/klibc/klibc.git/patch/?id=d4853d030639cf3542ae39129c18b654d8d4f020
+ md5sums = d01e2f8fa8a616c8523787ea4c634e8b
+ md5sums = 8d7744591b5ba254fe6d4ef324a5383e
+
+pkgname = klibc
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6481ec1b23df
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Cédric Schieli <cschieli at gmail dot com>
+pkgname=klibc
+pkgver=2.0.6
+pkgrel=1
+pkgdesc="A minimalistic libc subset for use with initramfs"
+arch=(x86_64)
+url="https://mirrors.kernel.org/pub/linux/libs/klibc/"
+license=('GPL')
+groups=()
+depends=(perl)
+makedepends=(linux-api-headers)
+provides=()
+conflicts=()
+replaces=()
+backup=()
+options=('staticlibs')
+install=
+source=(
+ "https://mirrors.kernel.org/pub/linux/libs/klibc/2.0/${pkgname}-${pkgver}.tar.xz"
+ "fix_missing_include_in_sys_mman_h.patch::https://git.kernel.org/pub/scm/libs/klibc/klibc.git/patch/?id=d4853d030639cf3542ae39129c18b654d8d4f020"
+)
+noextract=()
+md5sums=('d01e2f8fa8a616c8523787ea4c634e8b'
+ '8d7744591b5ba254fe6d4ef324a5383e')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+ patch -p1 -i "$srcdir/fix_missing_include_in_sys_mman_h.patch"
+ mkdir -p uapi/include
+ ln -sf /usr/include/{asm,asm-generic,linux} uapi/include/
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+ make KLIBCKERNELSRC=uapi
+}
+
+check() {
+ cd "$pkgname-$pkgver"
+ make -k KLIBCKERNELSRC=uapi test
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ mkdir -p "$pkgdir/usr/lib"
+ ln -s "$pkgdir/usr/lib" "$pkgdir/lib"
+ make KLIBCKERNELSRC=uapi INSTALLROOT="$pkgdir" mandir=/usr/share/man install
+ rm -f "$pkgdir/lib"
+}