Commit 33f0e91b authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

obs/_generic: support | in variables

Use § for sed separator instead of | so that we can have | in variables.

We need | in PACKAGE_BUILD_DEPENDENCIES of fluent-bit
parent a0b4bdb1
......@@ -63,12 +63,12 @@ BUILDOUT_ENTRY_POINT=$(realpath -m "$BUILDOUT_ENTRY_POINT")
OBS_DIR="$INITIAL_DIR/$OBS_PROJECT/$OBS_PACKAGE"
## Regular expressions for templates
NAME_REGEX="s|%SOFTWARE_NAME%|$SOFTWARE_NAME|g;s|%SOFTWARE_AND_VERSION%|$SOFTWARE_AND_VERSION|g"
VERSION_REGEX="s|%SOFTWARE_VERSION%|$SOFTWARE_VERSION|g;s|%DEBIAN_REVISION%|$DEBIAN_REVISION|g;s|%COMPOUND_VERSION%|$COMPOUND_VERSION|g"
BUILDOUT_REGEX="s|%SETUPTOOLS_VERSION%|$SETUPTOOLS_VERSION|g;s|%ZC_BUILDOUT_VERSION%|$ZC_BUILDOUT_VERSION|g;s|%ZC_RECIPE_EGG_VERSION%|$ZC_RECIPE_EGG_VERSION|g"
DIR_REGEX="s|%TARGET_DIR%|$TARGET_DIR|g;s|%BUILD_DIR%|$BUILD_DIR|g;s|%RUN_BUILDOUT_DIR%|$RUN_BUILDOUT_DIR|g"
PATH_REGEX="s|%BUILDOUT_ENTRY_POINT%|$BUILDOUT_ENTRY_POINT|g"
DISTRIB_REGEX="s|%MAINTAINER_NAME%|$MAINTAINER_NAME|g;s|%MAINTAINER_EMAIL%|$MAINTAINER_EMAIL|g;s|%CURRENT_DATE%|$CURRENT_DATE|g;s|%PACKAGE_SECTION%|$PACKAGE_SECTION|g;s|%PACKAGE_PRIORITY%|$PACKAGE_PRIORITY|g;s|%PACKAGE_BUILD_DEPENDENCIES%|$PACKAGE_BUILD_DEPENDENCIES|g;s|%PACKAGE_ARCHITECTURE%|$PACKAGE_ARCHITECTURE|g;s|%PACKAGE_DEPENDENCIES%|$PACKAGE_DEPENDENCIES|g;s|%PACKAGE_CONFLICTS%|$PACKAGE_CONFLICTS|g;s|%PACKAGE_SHORT_DESCRIPTION%|$PACKAGE_SHORT_DESCRIPTION|g;s|%PACKAGE_DISTRIBUTION_VALUE%|$PACKAGE_DISTRIBUTION_VALUE|g;s|%PACKAGE_URGENCY%|$PACKAGE_URGENCY|g;s|%PACKAGE_CHANGE_DETAILS%|$PACKAGE_CHANGE_DETAILS|g;s|%PACKAGE_DIRECTORIES%|$PACKAGE_DIRECTORIES|g"
NAME_REGEX="s§%SOFTWARE_NAME%§$SOFTWARE_NAME§g;s§%SOFTWARE_AND_VERSION%§$SOFTWARE_AND_VERSION§g"
VERSION_REGEX="s§%SOFTWARE_VERSION%§$SOFTWARE_VERSION§g;s§%DEBIAN_REVISION%§$DEBIAN_REVISION§g;s§%COMPOUND_VERSION%§$COMPOUND_VERSION§g"
BUILDOUT_REGEX="s§%SETUPTOOLS_VERSION%§$SETUPTOOLS_VERSION§g;s§%ZC_BUILDOUT_VERSION%§$ZC_BUILDOUT_VERSION§g;s§%ZC_RECIPE_EGG_VERSION%§$ZC_RECIPE_EGG_VERSION§g"
DIR_REGEX="s§%TARGET_DIR%§$TARGET_DIR§g;s§%BUILD_DIR%§$BUILD_DIR§g;s§%RUN_BUILDOUT_DIR%§$RUN_BUILDOUT_DIR§g"
PATH_REGEX="s§%BUILDOUT_ENTRY_POINT%§$BUILDOUT_ENTRY_POINT§g"
DISTRIB_REGEX="s§%MAINTAINER_NAME%§$MAINTAINER_NAME§g;s§%MAINTAINER_EMAIL%§$MAINTAINER_EMAIL§g;s§%CURRENT_DATE%§$CURRENT_DATE§g;s§%PACKAGE_SECTION%§$PACKAGE_SECTION§g;s§%PACKAGE_PRIORITY%§$PACKAGE_PRIORITY§g;s§%PACKAGE_BUILD_DEPENDENCIES%§$PACKAGE_BUILD_DEPENDENCIES§g;s§%PACKAGE_ARCHITECTURE%§$PACKAGE_ARCHITECTURE§g;s§%PACKAGE_DEPENDENCIES%§$PACKAGE_DEPENDENCIES§g;s§%PACKAGE_CONFLICTS%§$PACKAGE_CONFLICTS§g;s§%PACKAGE_SHORT_DESCRIPTION%§$PACKAGE_SHORT_DESCRIPTION§g;s§%PACKAGE_DISTRIBUTION_VALUE%§$PACKAGE_DISTRIBUTION_VALUE§g;s§%PACKAGE_URGENCY%§$PACKAGE_URGENCY§g;s§%PACKAGE_CHANGE_DETAILS%§$PACKAGE_CHANGE_DETAILS§g;s§%PACKAGE_DIRECTORIES%§$PACKAGE_DIRECTORIES§g"
ALL_REGEX=$NAME_REGEX";"$VERSION_REGEX";"$BUILDOUT_REGEX";"$DIR_REGEX";"$PATH_REGEX";"$DISTRIB_REGEX
copy_and_solve_templates () {
......
......@@ -3,6 +3,6 @@
export SOFTWARE_NAME=fluent-bit
export MAINTAINER_NAME="Ophélie Gagnard"
export MAINTAINER_EMAIL=ophelie.gagnard@nexedi.com
export PACKAGE_BUILD_DEPENDENCIES="debhelper (>= 4.1.16), chrpath, wget, python (>= 2.7), python3 (>= 3.7), python3-dev (>= 3.7), cmake (>= 3.18)"
export PACKAGE_BUILD_DEPENDENCIES="debhelper, chrpath, python3 (>=3.7) | python"
export SETUPTOOLS_VERSION=44.1.1
export ZC_BUILDOUT_VERSION=2.7.1+slapos016
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