Commit dc2bd361 authored by Franco Fichtner's avatar Franco Fichtner

Mk: split out some common stuff, add headers

parent 12a5ac98
......@@ -23,15 +23,11 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
PKG!= which pkg || echo true
GIT!= which git || echo true
PAGER?= less
.include "Mk/defaults.mk"
all:
@cat ${.CURDIR}/README.md | ${PAGER}
force:
WANTS= git pear-PHP_CodeSniffer phpunit
.for WANT in ${WANTS}
......@@ -47,7 +43,7 @@ CORE_HASH= ${CORE_COMMIT:C/^.*-//1}
CORE_ABI?= 16.7
_FLAVOUR!= /usr/local/bin/openssl version
_FLAVOUR!= ${LOCALBASE}/bin/openssl version
FLAVOUR?= ${_FLAVOUR:[1]}
.if "${FLAVOUR}" == OpenSSL || "${FLAVOUR}" == ""
......@@ -150,7 +146,7 @@ mount: want-git
echo -n "Enabling core.git live mount..."; \
echo "${CORE_COMMIT}" > \
${.CURDIR}/src/opnsense/version/opnsense; \
mount_unionfs ${.CURDIR}/src /usr/local; \
mount_unionfs ${.CURDIR}/src ${LOCALBASE}; \
touch ${WRKDIR}/.mount_done; \
echo "done"; \
service configd restart; \
......@@ -166,7 +162,6 @@ umount: force
service configd restart; \
fi
manifest: want-git
@echo "name: \"${CORE_NAME}\""
@echo "version: \"${CORE_VERSION}\""
......@@ -179,7 +174,7 @@ manifest: want-git
@echo "categories: [ \"sysutils\", \"www\" ]"
@echo "licenselogic: \"single\""
@echo "licenses: [ \"BSD2CLAUSE\" ]"
@echo "prefix: /usr/local"
@echo "prefix: ${LOCALBASE}"
@echo "vital: true"
@echo "deps: {"
@for CORE_DEPEND in ${CORE_DEPENDS}; do \
......@@ -258,7 +253,7 @@ upgrade-check: force
upgrade: upgrade-check package
@${PKG} delete -fy ${CORE_NAME}
@${PKG} add ${PKGDIR}/*.txz
@/usr/local/etc/rc.restart_webgui
@${LOCALBASE}/etc/rc.restart_webgui
lint: force
find ${.CURDIR}/src ${.CURDIR}/scripts \
......@@ -314,5 +309,3 @@ test: want-phpunit
clean: want-git
${GIT} reset --hard HEAD && ${GIT} clean -xdqf .
.PHONY: force
# Copyright (c) 2016 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
PKG!= which pkg || echo true
GIT!= which git || echo true
LOCALBASE?= /usr/local
PAGER?= less
all:
@echo "Nothing to do."
force:
.PHONY: force
all:
# Copyright (c) 2015-2016 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
.include "defaults.mk"
.for TARGET in ${TREES} ${EXTRAS}
......@@ -60,7 +85,3 @@ plist-${TARGET}: force
install: install-${TARGET}
plist: plist-${TARGET}
.endfor
force:
.PHONY: force
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