Skip to content

Commit

Permalink
trigger ldconfig to regerenate ld.so.cache on lib dir changes
Browse files Browse the repository at this point in the history
related to #6
  • Loading branch information
Andy Shinn committed Feb 13, 2016
1 parent af0efb8 commit 722f51d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
13 changes: 8 additions & 5 deletions APKBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@
pkgname="glibc"
pkgver="2.22"
_pkgrel="5"
pkgrel="7"
pkgrel="8"
pkgdesc="GNU C Library compatibility layer"
arch="x86_64"
url="https://github.com/gliderlabs/alpine-glibc"
license="GPL"
source="https://github.com/andyshinn/docker-glibc-builder/releases/download/$pkgver-$_pkgrel/glibc-bin-$pkgver-$_pkgrel-x86_64.tar.gz
nsswitch.conf"
nsswitch.conf
ld.so.conf"
subpackages="$pkgname-bin $pkgname-i18n"
triggers="$pkgname-bin.trigger=/lib:/usr/lib:/usr/glibc-compat/lib"

package() {
mkdir -p "$pkgdir/lib64" "$pkgdir/usr/glibc-compat/lib/locale" "$pkgdir"/etc
cp -a "$srcdir"/usr "$pkgdir"
cp "$srcdir"/nsswitch.conf "$pkgdir"/etc/nsswitch.conf
touch "$pkgdir"/usr/glibc-compat/etc/ld.so.conf
cp "$srcdir"/ld.so.conf "$pkgdir"/usr/glibc-compat/etc/ld.so.conf
rm "$pkgdir"/usr/glibc-compat/etc/rpc
rm -rf "$pkgdir"/usr/glibc-compat/bin
rm -rf "$pkgdir"/usr/glibc-compat/sbin
Expand All @@ -31,7 +33,7 @@ package() {
}

bin() {
depends="$pkgname"
depends="$pkgname libgcc"
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
Expand All @@ -45,4 +47,5 @@ i18n() {
}

md5sums="4f2ea9f8cc1be716479f831597a14682 glibc-bin-2.22-5-x86_64.tar.gz
5be984273de4203318c9c3fb0d4e9d2b nsswitch.conf"
5be984273de4203318c9c3fb0d4e9d2b nsswitch.conf
b4a846d17bde75e47976d972c4e067a5 ld.so.conf"
2 changes: 2 additions & 0 deletions glibc-bin.trigger
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
/usr/glibc-compat/sbin/ldconfig
3 changes: 3 additions & 0 deletions ld.so.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/usr/glibc-compat/lib
/usr/lib
/lib

0 comments on commit 722f51d

Please sign in to comment.