Added dependencies, removed usr/share/info/dir, and cleaned up Makefile

This commit is contained in:
2016-10-28 15:46:19 -05:00
parent 2d19de2c4c
commit a833d13a5d

View File

@@ -8,13 +8,13 @@
# 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 = glibc,gmp,mpfr,readline
ARCH = x86_64 ARCH = x86_64
URL = https://www.gnu.org/software/gawk/ URL = https://www.gnu.org/software/gawk/
DESC = The awk utility interprets a special-purpose programming language that \ DESC = The awk utility interprets a special-purpose programming language that \
makes it possible to handle simple data-reformatting jobs with just a few \ makes it possible to handle simple data-reformatting jobs with just a few \
lines of code. lines of code.
SNAPVER = sr0 SNAPVER = sr1
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,10 +22,6 @@ SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//')
PATCHDIR := $(PWD)/SRC/patches PATCHDIR := $(PWD)/SRC/patches
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 =
include /usr/share/snap/Makefile.snaplinux include /usr/share/snap/Makefile.snaplinux
$(SRCDIR)/configure: $(ARCHIVE) $(SRCDIR)/configure: $(ARCHIVE)
@@ -41,11 +37,13 @@ $(SRCDIR)/configure: $(ARCHIVE)
echo 'Unable to determine archive type'; \ echo 'Unable to determine archive type'; \
exit 1; \ exit 1; \
fi fi
@touch $(SRCDIR)/configure
$(SRCDIR)/config.log: $(SRCDIR)/configure $(SRCDIR)/config.log: $(SRCDIR)/configure
@if [ -f $(PATCHDIR)/*.patch ]; then \ @cd $(SRCDIR) && \
cd $(SRCDIR) && cat $(PATCHDIR)/*.patch|patch --verbose -Np1; \ for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \
fi patch --verbose -Np0 -i $$patch; \
done
@cd $(SRCDIR); \ @cd $(SRCDIR); \
./configure \ ./configure \
--prefix=/usr \ --prefix=/usr \
@@ -54,8 +52,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure
--target=x86_64-snap-linux-gnu --target=x86_64-snap-linux-gnu
$(SRCDIR)/gawk: $(SRCDIR)/config.log $(SRCDIR)/gawk: $(SRCDIR)/config.log
@cd $(SRCDIR); \ @cd $(SRCDIR) && make
$(MAKE)
$(ROOT): $(SRCDIR)/gawk $(ROOT): $(SRCDIR)/gawk
@if [ -d $(ROOT) ]; then \ @if [ -d $(ROOT) ]; then \
@@ -64,10 +61,8 @@ $(ROOT): $(SRCDIR)/gawk
mkdir -v $(ROOT); \ mkdir -v $(ROOT); \
fi fi
@cd $(SRCDIR); \ @cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \
$(MAKEINST) DESTDIR=$(ROOT) rm -v $(ROOT)/usr/share/info/dir
@$(SNAPHACKS)
test: $(ROOT) test: $(ROOT)
@cd $(SRCDIR); \ @cd $(SRCDIR); \