The following changes were made to Makefile:

* added BRIEF
  * moved to new version scheme
  * moved make and make install out of variables
  * now setting archname with $(ARCH)
  * fixed issue with a couple of hard linked man pages
This commit is contained in:
2017-03-29 13:01:27 -05:00
parent 964be3208b
commit 16cf30f229

View File

@@ -11,18 +11,15 @@
DEPENDS = bzip2,zlib DEPENDS = bzip2,zlib
ARCH = x86_64 ARCH = x86_64
URL = https://www.perl.org/ URL = https://www.perl.org/
BRIEF = Perl programming language
DESC = Perl 5 is a highly capable, feature-rich programming language DESC = Perl 5 is a highly capable, feature-rich programming language
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 = BUILD_ZLIB=False BUILD_BZIP2=0 make
MAKEINST = BUILD_ZLIB=False BUILD_BZIP2=0 make install
SNAPHACKS =
include /usr/share/snap/Makefile.snaplinux include /usr/share/snap/Makefile.snaplinux
@@ -49,16 +46,16 @@ $(SRCDIR)/config.log: $(SRCDIR)/Configure
BUILD_ZLIB=False BUILD_BZIP2=0 ./Configure \ BUILD_ZLIB=False BUILD_BZIP2=0 ./Configure \
-des \ -des \
-Dprefix=/usr \ -Dprefix=/usr \
-Dsiteprefix=/usr/local \
-Dvendorprefix=/usr \ -Dvendorprefix=/usr \
-Dman1dir=/usr/share/man/man1 \ -Dman1dir=/usr/share/man/man1 \
-Dman3dir=/usr/share/man/man3 \ -Dman3dir=/usr/share/man/man3 \
-Dpager="/usr/bin/less -isR" \ -Dpager="/usr/bin/less -isR" \
-Duseshrplib \ -Duseshrplib \
-Darchname=x86_64-snap-linux-gnu -Darchname=$(ARCH)
$(SRCDIR)/perl: $(SRCDIR)/config.log $(SRCDIR)/perl: $(SRCDIR)/config.log
@cd $(SRCDIR); \ @cd $(SRCDIR) && BUILD_ZLIB=False BUILD_BZIP2=0 make
$(MAKE)
$(ROOT): $(SRCDIR)/perl $(ROOT): $(SRCDIR)/perl
@if [ -d $(ROOT) ]; then \ @if [ -d $(ROOT) ]; then \
@@ -67,14 +64,14 @@ $(ROOT): $(SRCDIR)/perl
mkdir -v $(ROOT); \ mkdir -v $(ROOT); \
fi fi
@cd $(SRCDIR); \ @cd $(SRCDIR) && BUILD_ZLIB=False BUILD_BZIP2=0 \
$(MAKEINST) DESTDIR=$(ROOT) make install DESTDIR=$(ROOT) && \
rm -v $(ROOT)/usr/share/man/man1/{perlthanks,pstruct}.1 && \
@$(SNAPHACKS) ln -sv c2ph.1 $(ROOT)/usr/share/man/man1/pstruct.1 && \
ln -sv perlbug.1 $(ROOT)/usr/share/man/man1/perlthanks.1
test: $(ROOT) test: $(ROOT)
@cd $(SRCDIR); \ @cd $(SRCDIR) && make -k test
make -k test
clean: clean:
@rm -rvf $(ROOT) \ @rm -rvf $(ROOT) \