diff --git a/APKBUILD b/APKBUILD index b0a0745..6e6fd54 100644 --- a/APKBUILD +++ b/APKBUILD @@ -5,16 +5,19 @@ pkgver="2.35" _pkgrel="0" pkgrel="1" pkgdesc="GNU C Library compatibility layer" +options="lib64" arch="x86_64" url="https://github.com/sgerrand/alpine-pkg-glibc" license="LGPL" source="https://github.com/sgerrand/docker-glibc-builder/releases/download/$pkgver-$_pkgrel/glibc-bin-$pkgver-$_pkgrel-x86_64.tar.gz ld.so.conf" -subpackages="$pkgname-bin $pkgname-dev $pkgname-i18n" +subpackages="$pkgname-bin $pkgname-utils $pkgname-dev $pkgname-i18n" triggers="$pkgname-bin.trigger=/lib:/usr/lib:/usr/glibc-compat/lib" package() { - mkdir -p "$pkgdir/lib" "$pkgdir/usr/glibc-compat/lib/locale" "$pkgdir"/usr/glibc-compat/lib64 "$pkgdir"/etc + provides="gnu-c-lib" + conflicts="libc6-compat" + mkdir -p "$pkgdir/lib" "$pkgdir/lib64" "$pkgdir/usr/glibc-compat/lib/locale" "$pkgdir"/usr/glibc-compat/lib64 "$pkgdir"/etc cp -a "$srcdir"/usr "$pkgdir" cp "$srcdir"/ld.so.conf "$pkgdir"/usr/glibc-compat/etc/ld.so.conf rm "$pkgdir"/usr/glibc-compat/etc/rpc @@ -26,17 +29,35 @@ package() { rm -rf "$pkgdir"/usr/glibc-compat/share rm -rf "$pkgdir"/usr/glibc-compat/var ln -s /usr/glibc-compat/lib/ld-linux-x86-64.so.2 ${pkgdir}/lib/ld-linux-x86-64.so.2 + ln -s /usr/glibc-compat/lib/ld-linux-x86-64.so.2 ${pkgdir}/lib64/ld-linux-x86-64.so.2 ln -s /usr/glibc-compat/lib/ld-linux-x86-64.so.2 ${pkgdir}/usr/glibc-compat/lib64/ld-linux-x86-64.so.2 ln -s /usr/glibc-compat/etc/ld.so.cache ${pkgdir}/etc/ld.so.cache } bin() { - depends="$pkgname bash libc6-compat libgcc" + pkgdesc="executable programs that come with glibc, installed to /usr/glibc-compat/" + depends="$pkgname libgcc" + depends="$depends bash" # shebang for ldd, sotrus, tzselect, xtrace + depends="$depends perl" # shebang for mtrace + depends="$depends !libc6-compat" # conflicts with this package mkdir -p "$subpkgdir"/usr/glibc-compat cp -a "$srcdir"/usr/glibc-compat/bin "$subpkgdir"/usr/glibc-compat cp -a "$srcdir"/usr/glibc-compat/sbin "$subpkgdir"/usr/glibc-compat } +utils() { + pkgdesc="a replacement for musl-utils that uses the glibc versions of those utilities" + depends="$pkgname-bin" + provides="musl-utils" + conflicts="musl-utils" + mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/sbin + ln -s /usr/glibc-compat/bin/getconf "$subpkgdir"/usr/bin + ln -s /usr/glibc-compat/bin/getent "$subpkgdir"/usr/bin + ln -s /usr/glibc-compat/bin/iconv "$subpkgdir"/usr/bin + ln -s /usr/glibc-compat/bin/ldd "$subpkgdir"/usr/bin + ln -s /usr/glibc-compat/sbin/ldconfig "$subpkgdir"/usr/sbin +} + i18n() { depends="$pkgname-bin" arch="noarch"