fix(packaging): manage custom instructions for debian packaging (#4398)

* fix(packaging): manage custom instructions for debian packaging

* fix(packaging): manage custom instructions for debian packaging

* fix(packaging): manage custom instructions for debian packaging

* fix(packaging): manage custom instructions for debian packaging

* fix(packaging): manage custom instructions for debian packaging

* fix(packaging): manage custom instructions for debian packaging

* breaks

* fix

* fix

* fix

* fix
This commit is contained in:
Kevin Duret 2023-05-11 07:01:13 +02:00 committed by GitHub
parent 8e41e054ae
commit 9b3b6d33e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View File

@ -1,7 +1,7 @@
Package: @NAME@
Architecture: all
Description: @SUMMARY@
Description: @SUMMARY@@CUSTOM_PKG_DATA@
Depends:
${shlibs:Depends},
${misc:Depends},

View File

@ -33,8 +33,14 @@ for PLUGIN in $PLUGINS; do
pkg_summary=$(echo "${pkg_values[0]}")
plugin_name=$(echo "${pkg_values[1]}")
deb_dependencies=$(cat "packaging/$PACKAGE_PATH/deb.json" | jq -r '.dependencies | join(",\\n ")')
deb_custom_pkg_data=$(cat "packaging/$PACKAGE_PATH/deb.json" | jq -r '("\\n" + .custom_pkg_data) // ""')
sed -e "s/@NAME@/$PLUGIN_NAME_LOWER/g" -e "s/@SUMMARY@/$pkg_summary/g" -e "s/@REQUIRES@/$deb_dependencies/g" < centreon-plugins/debian/control.body.template >> centreon-plugins/debian/control
sed -e "s/@NAME@/$PLUGIN_NAME_LOWER/g" \
-e "s/@SUMMARY@/$pkg_summary/g" \
-e "s/@REQUIRES@/$deb_dependencies/g" \
-e "s/@CUSTOM_PKG_DATA@/$deb_custom_pkg_data/g" \
< centreon-plugins/debian/control.body.template \
>> centreon-plugins/debian/control
# .install file
sed -e "s/@DIR@/$PLUGIN/g" -e "s/@NAME@/$plugin_name/g" < centreon-plugins/debian/plugin.install.template >> centreon-plugins/debian/$PLUGIN_NAME_LOWER.install

View File

@ -1,4 +1,5 @@
{
"dependencies": [
]
],
"custom_pkg_data": "Provides: centreon-plugin-Network-Cisco-Ssms-Restapi\\nReplaces: centreon-plugin-Network-Cisco-Ssms-Restapi\\nConflicts: centreon-plugin-Network-Cisco-Ssms-Restapi"
}