diff --git a/Makefile b/Makefile index 7f89d1c..72f49ee 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ URL = https://www.gnu.org/software/libc/ BRIEF = The GNU C Library DESC = The GNU C Library is used as the C library in the GNU system and in \ GNU/Linux systems, as well as many other systems that use Linux as the kernel. -SNAPVER = 5 +SNAPVER = 6 ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1) TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n') @@ -70,8 +70,11 @@ $(ROOT): $(BUILDDIR)/elf/ldd @cd $(BUILDDIR) && make install DESTDIR=$(ROOT) && \ install -d -m 755 $(ROOT)/etc/ld.so.conf.d && \ install -d -m 755 $(ROOT)/var/cache/nscd && \ - install -m 644 $(PWD)/SNAP/ld.so.conf $(ROOT)/etc/ld.so.conf && \ - install -m 644 $(PWD)/SNAP/nsswitch.conf $(ROOT)/etc/nsswitch.conf && \ + install -d -m 755 $(ROOT)/usr/share/glibc && \ + install -m 644 $(PWD)/SNAP/ld.so.conf \ + $(ROOT)/usr/share/glibc/ld.so.conf && \ + install -m 644 $(PWD)/SNAP/nsswitch.conf \ + $(ROOT)/usr/share/glibc/nsswitch.conf && \ rm -v $(ROOT)/usr/share/info/dir test: $(ROOT) diff --git a/SNAP/usher b/SNAP/usher new file mode 100755 index 0000000..bde2c21 --- /dev/null +++ b/SNAP/usher @@ -0,0 +1,24 @@ +#!/bin/bash + +set -e + +case $1 in + preinst) + exit 0 + ;; + postinst) + if [ ! -f ${TARGET}/etc/ld.so.conf ]; then + cp ${TARGET}/usr/share/glibc/ld.so.conf /etc/ld.so.conf + fi + + if [ ! -f ${TARGET}/etc/nsswitch.conf ]; then + cp ${TARGET}/usr/share/glibc/nsswitch.conf /etc/nsswitch.conf + fi + ;; + prerm) + exit 0 + ;; + postrm) + exit 0 + ;; +esac