Commit 01d50951 authored by Franco Fichtner's avatar Franco Fichtner

make: make use of WRKSRC and PKGDIR

(cherry picked from commit 571bc8c9)
(cherry picked from commit 75e4f8ee)
(cherry picked from commit 9a557bdf)
parent fdccb471
...@@ -142,8 +142,8 @@ CORE_DEPENDS?= apinger \ ...@@ -142,8 +142,8 @@ CORE_DEPENDS?= apinger \
wol wol
WRKDIR?=${.CURDIR}/work WRKDIR?=${.CURDIR}/work
WRKSRC= ${WRKDIR}/src WRKSRC?=${WRKDIR}/src
PKGDIR= ${WRKDIR}/pkg PKGDIR?=${WRKDIR}/pkg
mount: want-git mount: want-git
@if [ ! -f ${WRKDIR}/.mount_done ]; then \ @if [ ! -f ${WRKDIR}/.mount_done ]; then \
...@@ -254,19 +254,18 @@ package-check: force ...@@ -254,19 +254,18 @@ package-check: force
fi fi
package: package-check package: package-check
@rm -rf ${WRKSRC} ${PKGDIR} @rm -rf ${WRKSRC}
@${MAKE} DESTDIR=${WRKSRC} FLAVOUR=${FLAVOUR} metadata @${MAKE} DESTDIR=${WRKSRC} FLAVOUR=${FLAVOUR} metadata
@${MAKE} DESTDIR=${WRKSRC} FLAVOUR=${FLAVOUR} install @${MAKE} DESTDIR=${WRKSRC} FLAVOUR=${FLAVOUR} install
@${PKG} create -v -m ${WRKSRC} -r ${WRKSRC} \ @${PKG} create -v -m ${WRKSRC} -r ${WRKSRC} \
-p ${WRKSRC}/plist -o ${PKGDIR} -p ${WRKSRC}/plist -o ${PKGDIR}
@echo -n "Successfully built "
@cd ${PKGDIR}; find . -name "*.txz" | cut -c3-
upgrade-check: force upgrade-check: force
@if ! ${PKG} info ${CORE_NAME} > /dev/null; then \ @if ! ${PKG} info ${CORE_NAME} > /dev/null; then \
echo ">>> Cannot find package. Please run 'opnsense-update -t ${CORE_NAME}'" >&2; \ echo ">>> Cannot find package. Please run 'opnsense-update -t ${CORE_NAME}'" >&2; \
exit 1; \ exit 1; \
fi fi
@rm -rf ${PKGDIR}
upgrade: upgrade-check package upgrade: upgrade-check package
@${PKG} delete -fy ${CORE_NAME} @${PKG} delete -fy ${CORE_NAME}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment