mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
pkg: "make upgrade" can be difficult in dev situations
Auto-detect PHP if possible, change FLAVOUR behaviour while at it.
This commit is contained in:
parent
d24a546a78
commit
5db335e02e
10
Makefile
10
Makefile
@ -54,12 +54,12 @@ CORE_SYSLOGD?= # empty
|
||||
CORE_SYSLOGNG?= 3.25
|
||||
CORE_UPDATE?= # empty
|
||||
|
||||
.if "${FLAVOUR}" == OpenSSL || "${FLAVOUR}" == ""
|
||||
.if "${CORE_FLAVOUR}" == OpenSSL
|
||||
CORE_REPOSITORY?= ${CORE_ABI}/latest
|
||||
.elif "${FLAVOUR}" == LibreSSL
|
||||
.elif "${CORE_FLAVOUR}" == LibreSSL
|
||||
CORE_REPOSITORY?= ${CORE_ABI}/libressl
|
||||
.else
|
||||
CORE_REPOSITORY?= ${FLAVOUR}
|
||||
CORE_REPOSITORY?= unsupported/${CORE_FLAVOUR:tl}
|
||||
.endif
|
||||
|
||||
CORE_MESSAGE?= Carry on my wayward son
|
||||
@ -286,10 +286,10 @@ package: plist-check package-check clean-wrksrc
|
||||
@if ! ${PKG} info ${CORE_DEPEND} > /dev/null; then ${PKG} install -yfA ${CORE_DEPEND}; fi
|
||||
.endfor
|
||||
@echo -n ">>> Generating metadata for ${CORE_NAME}-${CORE_PKGVERSION}..."
|
||||
@${MAKE} DESTDIR=${WRKSRC} FLAVOUR=${FLAVOUR} metadata
|
||||
@${MAKE} DESTDIR=${WRKSRC} CORE_FLAVOUR=${CORE_FLAVOUR} metadata
|
||||
@echo " done"
|
||||
@echo -n ">>> Staging files for ${CORE_NAME}-${CORE_PKGVERSION}..."
|
||||
@${MAKE} DESTDIR=${WRKSRC} FLAVOUR=${FLAVOUR} install
|
||||
@${MAKE} DESTDIR=${WRKSRC} CORE_FLAVOUR=${CORE_FLAVOUR} install
|
||||
@echo " done"
|
||||
@echo ">>> Packaging files for ${CORE_NAME}-${CORE_PKGVERSION}:"
|
||||
@PORTSDIR=${.CURDIR} ${PKG} create -f ${PKG_FORMAT} -v -m ${WRKSRC} \
|
||||
|
||||
@ -28,8 +28,25 @@ PAGER?= less
|
||||
|
||||
OPENSSL?= ${LOCALBASE}/bin/openssl
|
||||
|
||||
_FLAVOUR!= if [ -f ${OPENSSL} ]; then ${OPENSSL} version; fi
|
||||
.if exists(${OPENSSL})
|
||||
_FLAVOUR!= ${OPENSSL} version
|
||||
FLAVOUR?= ${_FLAVOUR:[1]}
|
||||
.else
|
||||
FLAVOUR?= Base # not supported without OpenSSL port
|
||||
.endif
|
||||
|
||||
PHPBIN?= ${LOCALBASE}/bin/php
|
||||
|
||||
.if exists(${PHPBIN})
|
||||
_CORE_PHP!= ${PHPBIN} -v
|
||||
CORE_PHP?= ${_CORE_PHP:[2]:S/./ /g:[1..2]:tW:S/ //}
|
||||
.endif
|
||||
|
||||
VERSIONBIN?= ${LOCALBASE}/sbin/opnsense-version
|
||||
|
||||
.if exists(${VERSIONBIN})
|
||||
CORE_ABI!= ${VERSIONBIN} -a
|
||||
.endif
|
||||
|
||||
PKG!= which pkg || echo true
|
||||
GIT!= which git || echo true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user