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:
27
Makefile
27
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) \
|
||||
|
||||
Reference in New Issue
Block a user