summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGaël PORTAY2022-01-02 19:28:28 +0100
committerGaël PORTAY2022-06-22 16:52:52 +0200
commit4215019621533c761691b70a2eb312d9d0afc97d (patch)
tree755bdc576eaa6b1f1dc3c3381004cc6c226fa2a9
downloadaur-4215019621533c761691b70a2eb312d9d0afc97d.tar.gz
Initial commit
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD49
2 files changed, 65 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f968b2398861
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = i386-musl
+ pkgdesc = Lightweight implementation of C standard library (i386)
+ pkgver = 1.2.2
+ pkgrel = 1
+ url = https://www.musl-libc.org/
+ arch = x86_64
+ license = MIT
+ options = staticlibs
+ options = !buildflags
+ source = https://www.musl-libc.org/releases/musl-1.2.2.tar.gz
+ source = https://www.musl-libc.org/releases/musl-1.2.2.tar.gz.asc
+ validpgpkeys = 836489290BB6B70F99FFDA0556BCDB593020450F
+ sha256sums = 9b969322012d796dc23dda27a35866034fa67d8fb67e0e2c45c913c3d43219dd
+ sha256sums = SKIP
+
+pkgname = i386-musl
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..02941de8d345
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Gaël PORTAY <gael.portay@collabora.com>
+
+pkgname=i386-musl
+pkgver=1.2.2
+pkgrel=1
+pkgdesc='Lightweight implementation of C standard library (i386)'
+arch=('x86_64')
+url='https://www.musl-libc.org/'
+license=('MIT')
+options=('staticlibs' '!buildflags')
+validpgpkeys=('836489290BB6B70F99FFDA0556BCDB593020450F')
+source=(https://www.musl-libc.org/releases/musl-$pkgver.tar.gz{,.asc})
+sha256sums=('9b969322012d796dc23dda27a35866034fa67d8fb67e0e2c45c913c3d43219dd'
+ 'SKIP')
+
+_target=i386
+_sysroot=/usr/lib/$_target-musl
+
+build() {
+ cd musl-$pkgver
+ ./configure --prefix=$_sysroot \
+ --exec-prefix=/usr \
+ --target=$_target \
+ --build=$_target \
+ CFLAGS=-m32 \
+ --enable-wrapper=all
+ make
+}
+
+package() {
+ cd musl-$pkgver
+ make DESTDIR="$pkgdir" install
+
+ # configure syslibdir with /lib for PT_INTERP compat, but install to /usr/lib
+ mv "$pkgdir"/lib/ld-musl*.so* "$pkgdir"/usr/lib/
+ rmdir "$pkgdir"/lib
+
+ pushd "$pkgdir"/usr/bin
+ local _bin
+ for _bin in *; do
+ mv "$_bin" "$_target-$_bin"
+ done
+ popd
+
+ sed 's/"$@"/-m32 -Wl,-melf_i386 "$@"/' -i "$pkgdir"/usr/bin/$_target-musl-gcc
+
+ install -Dm0644 README "$pkgdir"/usr/share/doc/$pkgname/README
+ install -Dm0644 COPYRIGHT "$pkgdir"/usr/share/licenses/$pkgname/COPYRIGHT
+}