Added tzdata as a dependency and cleaned up Makefile

This commit is contained in:
2016-11-05 02:36:49 -05:00
parent 33c06f575c
commit 2b1e4d16cf

View File

@@ -8,12 +8,12 @@
# 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 = DEPENDS = tzdata
ARCH = x86_64 ARCH = x86_64
URL = https://www.gnu.org/software/libc/ URL = https://www.gnu.org/software/libc/
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 = sr0 SNAPVER = sr2
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')
@@ -22,13 +22,6 @@ PATCHDIR := $(PWD)/SRC/patches
BUILDDIR := $(PWD)/BUILD BUILDDIR := $(PWD)/BUILD
VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')$(SNAPVER) VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')$(SNAPVER)
MAKE = make
MAKEINST = make install
SNAPHACKS = install -d -m 755 $(ROOT)/etc/ld.so.conf.d && \
install -d -m 755 $(ROOT)/var/cache/nscd && \
install -m 644 SNAP/ld.so.conf $(ROOT)/etc/ld.so.conf && \
install -m 644 SNAP/nsswitch.conf $(ROOT)/etc/nsswitch.conf
include /usr/share/snap/Makefile.snaplinux include /usr/share/snap/Makefile.snaplinux
$(SRCDIR)/configure: $(ARCHIVE) $(SRCDIR)/configure: $(ARCHIVE)
@@ -47,12 +40,13 @@ $(SRCDIR)/configure: $(ARCHIVE)
@touch $(SRCDIR)/configure @touch $(SRCDIR)/configure
$(BUILDDIR)/config.log: $(SRCDIR)/configure $(BUILDDIR)/config.log: $(SRCDIR)/configure
@cd $(SRCDIR) && \
for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \
patch --verbose -Np0 -i $$patch; \
done
@if [ ! -d $(BUILDDIR) ]; then \ @if [ ! -d $(BUILDDIR) ]; then \
mkdir -v $(BUILDDIR); \ mkdir -v $(BUILDDIR); \
fi fi
@if [ -f $(PATCHDIR)/*.patch ]; then \
cd $(SRCDIR) && cat $(PATCHDIR)/*.patch|patch --verbose -Np1; \
fi
@cd $(BUILDDIR); \ @cd $(BUILDDIR); \
../$(SRCDIR)/configure \ ../$(SRCDIR)/configure \
--prefix=/usr \ --prefix=/usr \
@@ -63,8 +57,7 @@ $(BUILDDIR)/config.log: $(SRCDIR)/configure
--target=x86_64-snap-linux-gnu --target=x86_64-snap-linux-gnu
$(BUILDDIR)/elf/ldd: $(BUILDDIR)/config.log $(BUILDDIR)/elf/ldd: $(BUILDDIR)/config.log
@cd $(BUILDDIR); \ @cd $(BUILDDIR) && make
$(MAKE)
$(ROOT): $(BUILDDIR)/elf/ldd $(ROOT): $(BUILDDIR)/elf/ldd
@if [ -d $(ROOT) ]; then \ @if [ -d $(ROOT) ]; then \
@@ -73,14 +66,15 @@ $(ROOT): $(BUILDDIR)/elf/ldd
mkdir -v $(ROOT); \ mkdir -v $(ROOT); \
fi fi
@cd $(BUILDDIR); \ @cd $(BUILDDIR) && make install DESTDIR=$(ROOT) && \
$(MAKEINST) DESTDIR=$(ROOT) install -d -m 755 $(ROOT)/etc/ld.so.conf.d && \
install -d -m 755 $(ROOT)/var/cache/nscd && \
@$(SNAPHACKS) 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
test: $(ROOT) test: $(ROOT)
@cd $(SRCDIR); \ @cd $(BUILDDIR) && make check
make check
clean: clean:
@rm -rvf $(ROOT) \ @rm -rvf $(ROOT) \