mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 16:44:39 +00:00
Fixes spurious overwrite of a standard config, but also doesn't
update the standards anymore in a running installation. Install
media is unaffected from this change. Users that have had their
standard config overwritten need to rewrite the file accordingly:
/usr/local/etc/config.xml
It also enables users to use their own sample configs on a running
installation from now on. Might add a knob in the GUI to do e.g.
`use this config as the factory reset configuration'. :)
While there, move the pkg-related Makefile glue into its own
file in the subdirectory for clarity.
59 lines
1.8 KiB
Makefile
59 lines
1.8 KiB
Makefile
all:
|
|
|
|
mount:
|
|
@${.CURDIR}/scripts/version.sh > \
|
|
${.CURDIR}/src/opnsense/version/opnsense
|
|
/sbin/mount_unionfs ${.CURDIR}/src /usr/local
|
|
|
|
umount:
|
|
/sbin/umount -f "<above>:${.CURDIR}/src"
|
|
|
|
install:
|
|
# invoke pkg(8) bootstraping
|
|
@make -C ${.CURDIR}/pkg install
|
|
# move all sources to their destination
|
|
@mkdir -p ${DESTDIR}/usr/local
|
|
@cp -r ${.CURDIR}/src/* ${DESTDIR}/usr/local
|
|
# disable warnings for production systems
|
|
@sed -i '' -e 's/E_STRICT/E_STRICT | E_WARNING/g' \
|
|
${DESTDIR}/usr/local/etc/rc.php_ini_setup
|
|
# finally pretty-print a list of files present
|
|
@(cd ${.CURDIR}/src; find * -type f) | \
|
|
xargs -n1 printf "/usr/local/%s\n"
|
|
|
|
lint:
|
|
find ${.CURDIR}/src ! -name "*.xml" ! -name "*.eot" \
|
|
! -name "*.svg" ! -name "*.woff" ! -name "*.woff2" \
|
|
! -name "*.otf" ! -name "*.png" ! -name "*.js" \
|
|
! -name "*.scss" ! -name "*.py" ! -name "*.ttf" \
|
|
! -name "*.tgz" -type f -print0 | xargs -0 -n1 php -l
|
|
|
|
sweep:
|
|
find ${.CURDIR}/src ! -name "*.min.*" ! -name "*.svg" \
|
|
! -name "*.map" -type f -print0 | \
|
|
xargs -0 -n1 scripts/cleanfile
|
|
find ${.CURDIR}/pkg -type f -print0 | \
|
|
xargs -0 -n1 scripts/cleanfile
|
|
|
|
style:
|
|
@(phpcs --tab-width=4 --standard=PSR2 ${.CURDIR}/src/opnsense/mvc \
|
|
|| true) > ${.CURDIR}/.style.out
|
|
@echo -n "Total number of style warnings: "
|
|
@grep '| WARNING' ${.CURDIR}/.style.out | wc -l
|
|
@echo -n "Total number of style errors: "
|
|
@grep '| ERROR' ${.CURDIR}/.style.out | wc -l
|
|
@cat ${.CURDIR}/.style.out
|
|
@rm ${.CURDIR}/.style.out
|
|
|
|
setup:
|
|
${.CURDIR}/src/etc/rc.php_ini_setup
|
|
|
|
health:
|
|
# check test script output and advertise a failure...
|
|
[ "`${.CURDIR}/src/etc/rc.php_test_run`" == "FCGI-PASSED PASSED" ]
|
|
|
|
clean:
|
|
git reset --hard HEAD && git clean -xdqf .
|
|
|
|
.PHONY: mount umount install lint sweep style setup health clean
|