Commit 9c7b64b2 authored by Franco Fichtner's avatar Franco Fichtner

pkg: better auto-generation of manifest info

parent 122f1b41
...@@ -20,7 +20,7 @@ rm -f /etc/rc.bak ...@@ -20,7 +20,7 @@ rm -f /etc/rc.bak
echo "Writing OPNsense version" echo "Writing OPNsense version"
mkdir -p /usr/local/opnsense/version mkdir -p /usr/local/opnsense/version
echo "%%REPO_VERSION%%-%%REPO_COMMENT%%" > /usr/local/opnsense/version/opnsense echo "%%CORE_COMMIT%%" > /usr/local/opnsense/version/opnsense
if /usr/local/etc/rc.d/configd status > /dev/null; then if /usr/local/etc/rc.d/configd status > /dev/null; then
/usr/local/etc/rc.d/configd restart /usr/local/etc/rc.d/configd restart
......
...@@ -13,14 +13,37 @@ mount: force ...@@ -13,14 +13,37 @@ mount: force
umount: force umount: force
/sbin/umount -f "<above>:${.CURDIR}/src" /sbin/umount -f "<above>:${.CURDIR}/src"
scripts: force CORE_COMMIT!= ${.CURDIR}/scripts/version.sh
@make -C ${.CURDIR}/pkg scripts CORE_VERSION= ${CORE_COMMIT:C/-.*$//1}
CORE_HASH= ${CORE_COMMIT:C/^.*-//1}
name: force CORE_NAME?= opnsense
@make -C ${.CURDIR}/pkg name CORE_ORIGIN?= opnsense/${CORE_NAME}
CORE_COMMENT?= OPNsense release package
CORE_MAINTAINER?= franco@opnsense.org
CORE_WWW?= https://opnsense.org/
manifest: force manifest: force
@make -C ${.CURDIR}/pkg manifest @echo "name: \"${CORE_NAME}\""
@echo "version: \"${CORE_VERSION}\""
@echo "origin: \"${CORE_ORIGIN}\""
@echo "comment: \"${CORE_COMMENT}\""
@echo "desc: \"${CORE_HASH}\""
@echo "maintainer: \"${CORE_MAINTAINER}\""
@echo "www: \"${CORE_WWW}\""
@echo "prefix: /"
@echo "deps: {"
@echo "%%REPO_DEPENDS%%"
@echo "}"
name: force
@echo ${CORE_NAME}
scripts: force
@mkdir -p ${DESTDIR}
@cp -v -- +PRE_DEINSTALL +POST_INSTALL ${DESTDIR}
@sed -i '' -e "s/%%CORE_COMMIT%%/${CORE_COMMIT}/g" \
${DESTDIR}/+POST_INSTALL
install: force install: force
@make -C ${.CURDIR}/pkg install @make -C ${.CURDIR}/pkg install
......
all: all:
CORE_NAME= opnsense
name:
@echo ${CORE_NAME}
scripts:
@mkdir -p ${DESTDIR}
@cp -v ${.CURDIR}/+PRE_DEINSTALL ${DESTDIR}
@cp -v ${.CURDIR}/+POST_INSTALL ${DESTDIR}
manifest:
@echo "name: ${CORE_NAME}"
@echo "version: \"%%REPO_VERSION%%\""
@echo "origin: opnsense/${CORE_NAME}"
@echo "comment: \"OPNsense core release package\""
@echo "desc: XXX"
@echo "maintainer: franco@opnsense.org"
@echo "www: https://opnsense.org/"
@echo "prefix: /"
@echo "deps: {"
@echo "%%REPO_DEPENDS%%"
@echo "}"
install: install:
@mkdir -p ${DESTDIR}/usr/local/etc/pkg @mkdir -p ${DESTDIR}/usr/local/etc/pkg
@cp -vr ${.CURDIR}/repos ${DESTDIR}/usr/local/etc/pkg/ @cp -vr ${.CURDIR}/repos ${DESTDIR}/usr/local/etc/pkg/
...@@ -34,4 +11,4 @@ plist: ...@@ -34,4 +11,4 @@ plist:
@(cd ${.CURDIR}/fingerprints; find * -type f) | \ @(cd ${.CURDIR}/fingerprints; find * -type f) | \
xargs -n1 printf "/usr/local/etc/pkg/fingerprints/%s\n" xargs -n1 printf "/usr/local/etc/pkg/fingerprints/%s\n"
.PHONY: install plist scripts manifest .PHONY: install plist
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