The following changes were made to Makefile:

* added BRIEF
  * moved to new version scheme
  * corrected dependencies (glibc,ncurses)
  * moved make and make install out of variables
This commit is contained in:
2017-04-19 09:12:42 -05:00
parent e9f0e1a2ed
commit 6cbec66d26

View File

@@ -8,22 +8,19 @@
# 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,ncurses
ARCH = x86_64 ARCH = x86_64
URL = https://www.gnu.org/software/less/ URL = https://www.gnu.org/software/less/
BRIEF = The less pager
DESC = GNU less is a program similar to more, but which allows backward \ DESC = GNU less is a program similar to more, but which allows backward \
movement in the file as well as forward movement. movement in the file as well as forward movement.
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
@@ -55,8 +52,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure
--target=x86_64-snap-linux-gnu --target=x86_64-snap-linux-gnu
$(SRCDIR)/less: $(SRCDIR)/config.log $(SRCDIR)/less: $(SRCDIR)/config.log
@cd $(SRCDIR); \ @cd $(SRCDIR) && make
$(MAKE)
$(ROOT): $(SRCDIR)/less $(ROOT): $(SRCDIR)/less
@if [ -d $(ROOT) ]; then \ @if [ -d $(ROOT) ]; then \
@@ -65,10 +61,7 @@ $(ROOT): $(SRCDIR)/less
mkdir -v $(ROOT); \ mkdir -v $(ROOT); \
fi fi
@cd $(SRCDIR); \ @cd $(SRCDIR) && make install DESTDIR=$(ROOT)
$(MAKEINST) DESTDIR=$(ROOT)
@$(SNAPHACKS)
clean: clean:
@rm -rvf $(ROOT) \ @rm -rvf $(ROOT) \