1 Commits

Author SHA1 Message Date
root
d493cb5824 Added $TARGET to file paths in usher 2017-07-05 07:23:39 -05:00
3 changed files with 11 additions and 46 deletions

View File

@@ -8,26 +8,20 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
export SRCPKG = glibc
export DEPENDS = bash,dash,tzdata
export ARCH = x86_64
export URL = https://www.gnu.org/software/libc/
REPO = core
DEPENDS = tzdata
ARCH = x86_64
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 = 8
SNAPVER = 7
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
export VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'| \
sed 's/^-//')-$(SNAPVER)
DEV := $(PWD)/glibc-dev
DEVROOT := $(DEV)/ROOT
VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')-$(SNAPVER)
include /usr/share/snap/Makefile.snaplinux
@@ -81,24 +75,13 @@ $(ROOT): $(BUILDDIR)/elf/ldd
$(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 ../
rm -v $(ROOT)/usr/share/info/dir
test: $(ROOT)
@cd $(BUILDDIR) && make check
clean:
@rm -rvf $(ROOT) \
$(DEV) \
$(SNAPINFO) \
$(MANIFEST) \
$(FILES) \

View File

@@ -1,16 +0,0 @@
# 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

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -e
@@ -7,15 +7,13 @@ case $1 in
exit 0
;;
postinst)
if [ ! -f /etc/ld.so.conf ]; then
cp /usr/share/glibc/ld.so.conf /etc/ld.so.conf
if [ ! -f ${TARGET}/etc/ld.so.conf ]; then
cp ${TARGET}/usr/share/glibc/ld.so.conf ${TARGET}/etc/ld.so.conf
fi
if [ ! -f /etc/nsswitch.conf ]; then
cp /usr/share/glibc/nsswitch.conf /etc/nsswitch.conf
if [ ! -f ${TARGET}/etc/nsswitch.conf ]; then
cp ${TARGET}/usr/share/glibc/nsswitch.conf ${TARGET}/etc/nsswitch.conf
fi
ldconfig
;;
prerm)
exit 0