5 Commits

Author SHA1 Message Date
Jay Larson
27c487e386 The following changes were made:
* Split off separate glibc-dev
  * Added bash and dash as dependencies (needed for some scripts apparently)
  * Removed ld.so.cache
  * Generate ld.so.cache in usher
  * usher now uses /bin/sh
  * Removed TARGET from usher
2018-03-29 15:05:45 -05:00
Jay Larson
17845fb7b6 Added $TARGET to file destinations in usher 2017-07-05 07:27:31 -05:00
Jay Larson
320820267e The following changes were made:
* Add usher to manage config files
  * nsswitch.conf and ld.so.conf are now managed with usher
2017-06-16 13:55:56 -05:00
Jay Larson
cdd4db20d5 Re-built with new Makefile.snaplinux - eliminated the lib64 links 2017-04-24 13:39:59 -05:00
Jay Larson
90cc50d135 Rebuilt with new Makefile.snaplinux which makes /lib64 and /usr/lib64 links 2017-04-19 10:52:56 -05:00
3 changed files with 70 additions and 8 deletions

View File

@@ -8,20 +8,26 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
DEPENDS = tzdata
ARCH = x86_64
URL = https://www.gnu.org/software/libc/
export SRCPKG = glibc
export DEPENDS = bash,dash,tzdata
export ARCH = x86_64
export URL = https://www.gnu.org/software/libc/
REPO = core
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 = 3
SNAPVER = 8
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//')
PATCHDIR := $(PWD)/SRC/patches
BUILDDIR := $(PWD)/BUILD
VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')-$(SNAPVER)
export VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'| \
sed 's/^-//')-$(SNAPVER)
DEV := $(PWD)/glibc-dev
DEVROOT := $(DEV)/ROOT
include /usr/share/snap/Makefile.snaplinux
@@ -70,15 +76,29 @@ $(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 && \
rm -v $(ROOT)/usr/share/info/dir
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 && \
rm -v $(ROOT)/etc/ld.so.cache
@install -d -v $(DEV)/SNAP && \
for file in `find $(ROOT)|egrep 'man3\/|\.a$$|\.c$$|\.h$$'`; do \
path=`dirname $$file|sed "s[$(ROOT)[$(DEVROOT)["`; \
mkdir -p $$path; \
mv $$file $$path; \
done && \
find $(ROOT) -type d -empty -delete && \
cd $(DEV) && make -f ../Makefile.glibc-dev && mv *.snap ../
test: $(ROOT)
@cd $(BUILDDIR) && make check
clean:
@rm -rvf $(ROOT) \
$(DEV) \
$(SNAPINFO) \
$(MANIFEST) \
$(FILES) \

16
Makefile.glibc-dev Normal file
View File

@@ -0,0 +1,16 @@
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation here:
# (http://www.gnu.org/licenses/gpl-2.0.html)
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
DEPENDS = glibc
REPO = dev
BRIEF = Development files for glibc
DESC = Development files for glibc
include /usr/share/snap/Makefile.snaplinux

26
SNAP/usher Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/sh
set -e
case $1 in
preinst)
exit 0
;;
postinst)
if [ ! -f /etc/ld.so.conf ]; then
cp /usr/share/glibc/ld.so.conf /etc/ld.so.conf
fi
if [ ! -f /etc/nsswitch.conf ]; then
cp /usr/share/glibc/nsswitch.conf /etc/nsswitch.conf
fi
ldconfig
;;
prerm)
exit 0
;;
postrm)
exit 0
;;
esac