The following changes were made:

* Moved to new version scheme
  * Moved make/make install out of variables
  * Corrected patch loop
  * Added dependencies
This commit is contained in:
2017-06-11 14:32:18 -05:00
parent 1353547ea9
commit 0da9c2ec92
2 changed files with 9 additions and 17 deletions

View File

@@ -8,21 +8,17 @@
# 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,libgcc,libstdc++
ARCH = x86_64 ARCH = x86_64
URL = https://www.gnu.org/software/gperf/ URL = https://www.gnu.org/software/gperf/
DESC = GNU gperf is a perfect hash function generator. DESC = GNU gperf is a perfect hash function generator.
SNAPVER = sr0 SNAPVER = 1
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
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
@@ -42,9 +38,10 @@ $(SRCDIR)/configure: $(ARCHIVE)
@touch $(SRCDIR)/configure @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 -Np1 -i $$patch; \
done
@cd $(SRCDIR); \ @cd $(SRCDIR); \
./configure \ ./configure \
--prefix=/usr \ --prefix=/usr \
@@ -54,8 +51,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure
--target=x86_64-snap-linux-gnu --target=x86_64-snap-linux-gnu
$(SRCDIR)/src/gperf: $(SRCDIR)/config.log $(SRCDIR)/src/gperf: $(SRCDIR)/config.log
@cd $(SRCDIR); \ @cd $(SRCDIR) && make
$(MAKE)
$(ROOT): $(SRCDIR)/src/gperf $(ROOT): $(SRCDIR)/src/gperf
@if [ -d $(ROOT) ]; then \ @if [ -d $(ROOT) ]; then \
@@ -64,10 +60,7 @@ $(ROOT): $(SRCDIR)/src/gperf
mkdir -v $(ROOT); \ mkdir -v $(ROOT); \
fi fi
@cd $(SRCDIR); \ @cd $(SRCDIR) && make install DESTDIR=$(ROOT)
$(MAKEINST) DESTDIR=$(ROOT)
@$(SNAPHACKS)
test: $(ROOT) test: $(ROOT)
@cd $(SRCDIR); \ @cd $(SRCDIR); \

1
NOTES
View File

@@ -1 +0,0 @@
ADD TOUCH FOR CONFIGURE