Commit 7f2a8720 authored by Franco Fichtner's avatar Franco Fichtner

pkg: better auto-generation of manifest info

parent e919d946
......@@ -20,7 +20,7 @@ rm -f /etc/rc.bak
echo "Writing 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
/usr/local/etc/rc.d/configd restart
......
......@@ -13,14 +13,37 @@ mount: force
umount: force
/sbin/umount -f "<above>:${.CURDIR}/src"
scripts: force
@make -C ${.CURDIR}/pkg scripts
CORE_COMMIT!= ${.CURDIR}/scripts/version.sh
CORE_VERSION= ${CORE_COMMIT:C/-.*$//1}
CORE_HASH= ${CORE_COMMIT:C/^.*-//1}
name: force
@make -C ${.CURDIR}/pkg name
CORE_NAME?= opnsense-devel
CORE_ORIGIN?= opnsense/${CORE_NAME}
CORE_COMMENT?= OPNsense development package
CORE_MAINTAINER?= franco@opnsense.org
CORE_WWW?= https://opnsense.org/
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
@make -C ${.CURDIR}/pkg install
......
all:
CORE_NAME= opnsense-devel
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 development package\""
@echo "desc: XXX"
@echo "maintainer: franco@opnsense.org"
@echo "www: https://opnsense.org/"
@echo "prefix: /"
@echo "deps: {"
@echo "%%REPO_DEPENDS%%"
@echo "}"
install:
@mkdir -p ${DESTDIR}/usr/local/etc/pkg
@cp -vr ${.CURDIR}/repos ${DESTDIR}/usr/local/etc/pkg/
......@@ -34,4 +11,4 @@ plist:
@(cd ${.CURDIR}/fingerprints; find * -type f) | \
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