Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b60d2554e2 | ||
|
|
286bc10432 | ||
|
|
27c487e386 | ||
|
|
17845fb7b6 |
29
Makefile
29
Makefile
@@ -8,20 +8,26 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
DEPENDS = tzdata
|
export SRCPKG = glibc
|
||||||
ARCH = x86_64
|
export DEPENDS = bash,dash,tzdata
|
||||||
URL = https://www.gnu.org/software/libc/
|
export ARCH = x86_64
|
||||||
|
export URL = https://www.gnu.org/software/libc/
|
||||||
|
REPO = core
|
||||||
BRIEF = The GNU C Library
|
BRIEF = The GNU C Library
|
||||||
DESC = The GNU C Library is used as the C library in the GNU system and in \
|
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.
|
GNU/Linux systems, as well as many other systems that use Linux as the kernel.
|
||||||
SNAPVER = 7
|
SNAPVER = 10
|
||||||
|
|
||||||
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
|
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
|
||||||
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
|
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
|
||||||
SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//')
|
SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//')
|
||||||
PATCHDIR := $(PWD)/SRC/patches
|
PATCHDIR := $(PWD)/SRC/patches
|
||||||
BUILDDIR := $(PWD)/BUILD
|
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
|
include /usr/share/snap/Makefile.snaplinux
|
||||||
|
|
||||||
@@ -75,13 +81,24 @@ $(ROOT): $(BUILDDIR)/elf/ldd
|
|||||||
$(ROOT)/usr/share/glibc/ld.so.conf && \
|
$(ROOT)/usr/share/glibc/ld.so.conf && \
|
||||||
install -m 644 $(PWD)/SNAP/nsswitch.conf \
|
install -m 644 $(PWD)/SNAP/nsswitch.conf \
|
||||||
$(ROOT)/usr/share/glibc/nsswitch.conf && \
|
$(ROOT)/usr/share/glibc/nsswitch.conf && \
|
||||||
rm -v $(ROOT)/usr/share/info/dir
|
rm -v $(ROOT)/usr/share/info/dir && \
|
||||||
|
mv -v $(ROOT)/etc/ld.so.cache $(ROOT)/usr/share/glibc
|
||||||
|
|
||||||
|
@install -d -v $(DEV)/SNAP && \
|
||||||
|
for file in `find $(ROOT)|egrep 'info\/|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)
|
test: $(ROOT)
|
||||||
@cd $(BUILDDIR) && make check
|
@cd $(BUILDDIR) && make check
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rvf $(ROOT) \
|
@rm -rvf $(ROOT) \
|
||||||
|
$(DEV) \
|
||||||
$(SNAPINFO) \
|
$(SNAPINFO) \
|
||||||
$(MANIFEST) \
|
$(MANIFEST) \
|
||||||
$(FILES) \
|
$(FILES) \
|
||||||
|
|||||||
16
Makefile.glibc-dev
Normal file
16
Makefile.glibc-dev
Normal 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
|
||||||
14
SNAP/usher
14
SNAP/usher
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -7,12 +7,16 @@ case $1 in
|
|||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
postinst)
|
postinst)
|
||||||
if [ ! -f ${TARGET}/etc/ld.so.conf ]; then
|
if [ ! -f /etc/ld.so.cache ]; then
|
||||||
cp ${TARGET}/usr/share/glibc/ld.so.conf ${TARGET}/etc/ld.so.conf
|
cp /usr/share/glibc/ld.so.cache /etc/ld.so.cache
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f ${TARGET}/etc/nsswitch.conf ]; then
|
if [ ! -f /etc/ld.so.conf ]; then
|
||||||
cp ${TARGET}/usr/share/glibc/nsswitch.conf ${TARGET}/etc/nsswitch.conf
|
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
|
fi
|
||||||
;;
|
;;
|
||||||
prerm)
|
prerm)
|
||||||
|
|||||||
Reference in New Issue
Block a user