mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
make: split install' and plist' targets
While there, make install provide output as well and mop up a few minor issues with the previous code.
This commit is contained in:
parent
21012660de
commit
da19c68bf5
14
Makefile
14
Makefile
@ -14,16 +14,16 @@ umount: force
|
||||
/sbin/umount -f "<above>:${.CURDIR}/src"
|
||||
|
||||
install: force
|
||||
# move all sources to their destination
|
||||
@mkdir -p ${DESTDIR}/usr/local
|
||||
@cp -r ${.CURDIR}/src/* ${DESTDIR}/usr/local
|
||||
# invoke pkg(8) bootstraping
|
||||
@make -C ${.CURDIR}/pkg install
|
||||
# invoke translation glue
|
||||
@make -C ${.CURDIR}/lang install
|
||||
# invoke third-party tools
|
||||
@make -C ${.CURDIR}/contrib install
|
||||
# finally pretty-print a list of files present
|
||||
@mkdir -p ${DESTDIR}/usr/local
|
||||
@cp -vr ${.CURDIR}/src/* ${DESTDIR}/usr/local
|
||||
|
||||
plist: force
|
||||
@make -C ${.CURDIR}/pkg plist
|
||||
@make -C ${.CURDIR}/lang plist
|
||||
@make -C ${.CURDIR}/contrib plist
|
||||
@(cd ${.CURDIR}/src; find * -type f) | while read FILE; do \
|
||||
if [ $${FILE%%.sample} != $${FILE} ]; then \
|
||||
echo "@sample /usr/local/$${FILE}"; \
|
||||
|
||||
@ -1,17 +1,16 @@
|
||||
all:
|
||||
|
||||
install:
|
||||
# bootstrap needed root directories
|
||||
@mkdir -p ${DESTDIR}/usr/local/share
|
||||
# openvpn client exporter files
|
||||
@cp -r ${.CURDIR}/openvpn ${DESTDIR}/usr/local/share/
|
||||
@cp -vr ${.CURDIR}/openvpn ${DESTDIR}/usr/local/share/
|
||||
@cp -vr ${.CURDIR}/mobile-broadband-provider-info \
|
||||
${DESTDIR}/usr/local/share/
|
||||
|
||||
plist:
|
||||
@(cd ${.CURDIR}/openvpn; find * -type f) | \
|
||||
xargs -n1 printf "/usr/local/share/openvpn/%s\n"
|
||||
# mobile broadband provider database
|
||||
@cp -r ${.CURDIR}/mobile-broadband-provider-info \
|
||||
${DESTDIR}/usr/local/share/
|
||||
@(cd ${.CURDIR}/mobile-broadband-provider-info; find * -type f) | \
|
||||
xargs -n1 printf \
|
||||
"/usr/local/share/mobile-broadband-provider-info/%s\n"
|
||||
|
||||
.PHONY: install
|
||||
.PHONY: install plist
|
||||
|
||||
@ -7,13 +7,20 @@ LOCALEDIR= /usr/local/share/locale/%%LANG%%/LC_MESSAGES
|
||||
|
||||
LANGUAGES= de_DE es_CO ja_JP zh_CN
|
||||
TEMPLATE= en_US
|
||||
INSTALL=
|
||||
PLIST=
|
||||
|
||||
.for LANG in ${LANGUAGES}
|
||||
${LANG}DIR= ${LOCALEDIR:S/%%LANG%%/${LANG}/g}
|
||||
${LANG}:
|
||||
install-${LANG}:
|
||||
@mkdir -p ${DESTDIR}${${LANG}DIR}
|
||||
@${MSGFMT} -o ${DESTDIR}${${LANG}DIR}/OPNsense.mo ${LANG}.po
|
||||
${MSGFMT} -o ${DESTDIR}${${LANG}DIR}/OPNsense.mo ${LANG}.po
|
||||
|
||||
plist-${LANG}:
|
||||
@echo ${${LANG}DIR}/OPNsense.mo
|
||||
|
||||
INSTALL+= install-${LANG}
|
||||
PLIST+= plist-${LANG}
|
||||
.endfor
|
||||
|
||||
${TEMPLATE}:
|
||||
@ -21,10 +28,11 @@ ${TEMPLATE}:
|
||||
cd ${.CURDIR}/.. && find src lang/dynamic/helpers | \
|
||||
xargs ${XGETTEXT} -j -o ${.CURDIR}/${TEMPLATE}.pot
|
||||
|
||||
install: ${LANGUAGES}
|
||||
template: ${TEMPLATE}
|
||||
install: ${INSTALL}
|
||||
plist: ${PLIST}
|
||||
|
||||
dynamic:
|
||||
@${.CURDIR}/dynamic/collect.py ${.CURDIR}/..
|
||||
|
||||
.PHONY: ${LANGUAGES} ${TEMPLATE} dynamic
|
||||
.PHONY: ${INSTALL} ${PLIST} ${TEMPLATE} dynamic
|
||||
|
||||
19
pkg/Makefile
19
pkg/Makefile
@ -1,19 +1,18 @@
|
||||
all:
|
||||
|
||||
install:
|
||||
# main pkg(8) glue
|
||||
@cp ${.CURDIR}/+PRE_DEINSTALL ${DESTDIR}
|
||||
@cp ${.CURDIR}/+POST_INSTALL ${DESTDIR}
|
||||
@cp ${.CURDIR}/+MANIFEST ${DESTDIR}
|
||||
# create needed root direction
|
||||
@mkdir -p ${DESTDIR}
|
||||
@cp -v ${.CURDIR}/+PRE_DEINSTALL ${DESTDIR}
|
||||
@cp -v ${.CURDIR}/+POST_INSTALL ${DESTDIR}
|
||||
@cp -v ${.CURDIR}/+MANIFEST ${DESTDIR}
|
||||
@mkdir -p ${DESTDIR}/usr/local/etc/pkg
|
||||
# available repository configurations
|
||||
@cp -r ${.CURDIR}/repos ${DESTDIR}/usr/local/etc/pkg/
|
||||
@cp -vr ${.CURDIR}/repos ${DESTDIR}/usr/local/etc/pkg/
|
||||
@cp -vr ${.CURDIR}/fingerprints ${DESTDIR}/usr/local/etc/pkg/
|
||||
|
||||
plist:
|
||||
@(cd ${.CURDIR}/repos; find * -type f) | \
|
||||
xargs -n1 printf "/usr/local/etc/pkg/repos/%s\n"
|
||||
# available vendor fingerprints
|
||||
@cp -r ${.CURDIR}/fingerprints ${DESTDIR}/usr/local/etc/pkg/
|
||||
@(cd ${.CURDIR}/fingerprints; find * -type f) | \
|
||||
xargs -n1 printf "/usr/local/etc/pkg/fingerprints/%s\n"
|
||||
|
||||
.PHONY: install
|
||||
.PHONY: install plist
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user