The following changes were made to Makefile:

* corrected dependencies (libacl/libattr)
  * added BRIEF
  * moved to new version scheme
  * moved make and make install out of variables
  * moved 'snaphacks' to $(ROOT) target
This commit is contained in:
2017-04-20 14:01:54 -05:00
parent 4acaba8465
commit 266dd59309

View File

@@ -8,25 +8,20 @@
# 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 = acl,attr,glibc,ncurses DEPENDS = glibc,libacl,libattr,ncurses
ARCH = x86_64 ARCH = x86_64
URL = http://www.vim.org/ URL = http://www.vim.org/
BRIEF = Clone of vi with extended features
DESC = Vim is an advanced text editor that seeks to provide the power of \ DESC = Vim is an advanced text editor that seeks to provide the power of \
the de-facto Unix editor 'Vi', with a more complete feature set. the de-facto Unix editor 'Vi', with a more complete feature set.
SNAPVER = sr3 SNAPVER = 4
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 $(ARCHIVE)|sed 's/\.tar.*//'| \ VERSION := $(shell echo $(ARCHIVE)|sed 's/\.tar.*//'| \
egrep -o '\-[0-9].*'|sed 's/^-//')$(SNAPVER) egrep -o '\-[0-9].*'|sed 's/^-//')-$(SNAPVER)
MAKE = make
MAKEINST = make install
SNAPHACKS = ln -sv vim $(ROOT)/usr/bin/vi && \
mkdir -v $(ROOT)/etc && \
echo "colorscheme slate" > $(ROOT)/etc/vimrc
include /usr/share/snap/Makefile.snaplinux include /usr/share/snap/Makefile.snaplinux
@@ -59,8 +54,7 @@ $(SRCDIR)/src/auto/config.log: $(SRCDIR)/configure
--target=x86_64-snap-linux-gnu --target=x86_64-snap-linux-gnu
$(SRCDIR)/src/vim: $(SRCDIR)/src/auto/config.log $(SRCDIR)/src/vim: $(SRCDIR)/src/auto/config.log
@cd $(SRCDIR); \ @cd $(SRCDIR) && make
$(MAKE)
$(ROOT): $(SRCDIR)/src/vim $(ROOT): $(SRCDIR)/src/vim
@if [ -d $(ROOT) ]; then \ @if [ -d $(ROOT) ]; then \
@@ -69,10 +63,10 @@ $(ROOT): $(SRCDIR)/src/vim
mkdir -v $(ROOT); \ mkdir -v $(ROOT); \
fi fi
@cd $(SRCDIR); \ @cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \
$(MAKEINST) DESTDIR=$(ROOT) ln -sv vim $(ROOT)/usr/bin/vi && \
mkdir -v $(ROOT)/etc && \
@$(SNAPHACKS) echo "colorscheme slate" > $(ROOT)/etc/vimrc
test: $(ROOT) test: $(ROOT)
@cd $(SRCDIR); \ @cd $(SRCDIR); \