From 16cf30f229c8fd9338a48a7704d486fab237a3fc Mon Sep 17 00:00:00 2001 From: Jay Larson Date: Wed, 29 Mar 2017 13:01:27 -0500 Subject: [PATCH] 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 --- Makefile | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 9ddf820..28a0358 100644 --- a/Makefile +++ b/Makefile @@ -11,18 +11,15 @@ DEPENDS = bzip2,zlib ARCH = x86_64 URL = https://www.perl.org/ +BRIEF = Perl 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) TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n') SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//') PATCHDIR := $(PWD)/SRC/patches -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 = +VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')-$(SNAPVER) include /usr/share/snap/Makefile.snaplinux @@ -49,16 +46,16 @@ $(SRCDIR)/config.log: $(SRCDIR)/Configure BUILD_ZLIB=False BUILD_BZIP2=0 ./Configure \ -des \ -Dprefix=/usr \ + -Dsiteprefix=/usr/local \ -Dvendorprefix=/usr \ -Dman1dir=/usr/share/man/man1 \ -Dman3dir=/usr/share/man/man3 \ -Dpager="/usr/bin/less -isR" \ -Duseshrplib \ - -Darchname=x86_64-snap-linux-gnu + -Darchname=$(ARCH) $(SRCDIR)/perl: $(SRCDIR)/config.log - @cd $(SRCDIR); \ - $(MAKE) + @cd $(SRCDIR) && BUILD_ZLIB=False BUILD_BZIP2=0 make $(ROOT): $(SRCDIR)/perl @if [ -d $(ROOT) ]; then \ @@ -67,14 +64,14 @@ $(ROOT): $(SRCDIR)/perl mkdir -v $(ROOT); \ fi - @cd $(SRCDIR); \ - $(MAKEINST) DESTDIR=$(ROOT) - - @$(SNAPHACKS) + @cd $(SRCDIR) && BUILD_ZLIB=False BUILD_BZIP2=0 \ + make install DESTDIR=$(ROOT) && \ + rm -v $(ROOT)/usr/share/man/man1/{perlthanks,pstruct}.1 && \ + ln -sv c2ph.1 $(ROOT)/usr/share/man/man1/pstruct.1 && \ + ln -sv perlbug.1 $(ROOT)/usr/share/man/man1/perlthanks.1 test: $(ROOT) - @cd $(SRCDIR); \ - make -k test + @cd $(SRCDIR) && make -k test clean: @rm -rvf $(ROOT) \