summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank LENORMAND <lenormf@gmail.com>2016-03-31 11:58:40 +0300
committerFrank LENORMAND <lenormf@gmail.com>2016-03-31 11:58:40 +0300
commitfda54a0102da0698fd78b33b1ee0bbce13536334 (patch)
treebe2eaa8a291abba86acb2f1868f0496b4eee4379
parentd1732673ce4bbbad1540800058d3057b39f1bfeb (diff)
Tweak and update the debian package script
-rwxr-xr-xcontrib/make_deb.bash23
1 files changed, 23 insertions, 0 deletions
diff --git a/contrib/make_deb.bash b/contrib/make_deb.bash
index c4802c19..9d880afd 100755
--- a/contrib/make_deb.bash
+++ b/contrib/make_deb.bash
@@ -41,6 +41,17 @@ function replace_field {
|| echo "${field_name}: ${field_value}" >> "${path_file}"
}
+## Append a value to a field
+function append_field {
+ local field_name="$1"
+ local path_file="$2"
+ local field_value="$3"
+
+ grep -q "^${field_name}: " "${path_file}" \
+ && sed -r -i "s#^(${field_name}:)\s*(.+)\$#\1 \2, ${field_value}#" "${path_file}" \
+ || echo "${field_name}: ${field_value}" >> "${path_file}"
+}
+
function main {
readonly PATH_DIR_CURRENT="${PWD}"
local maintainer_email="${DEBEMAIL}"
@@ -152,6 +163,12 @@ function main {
echo "Assigning a section to the control file"
replace_field Section debian/control editors
+ echo "Adding asciidoc to the list of build dependencies"
+ append_field Build-Depends debian/control 'asciidoc'
+
+ echo "Adding package recommendations"
+ replace_field Suggests debian/control 'tmux, x11-utils, xdotool, clang, exuberant-ctags'
+
## TODO: generate a changelog
echo -e "kakoune (${VERSION_KAKOUNE}) stable; urgency=low\n\n * Initial release\n\n -- ${maintainer_fullname} <${maintainer_email}> $(date -R)" > debian/changelog
@@ -161,6 +178,12 @@ function main {
echo "Modifying the license in the copyright file"
replace_field License debian/copyright "${DEFAULT_PACKAGE_LICENSE}"
+ echo "Generating an NROFF man page"
+ a2x --no-xmllint -f manpage "${PATH_DIR_TMP}/doc/kak.1.txt"
+
+ echo "Copying the generated manpage into the build directory"
+ mv "${PATH_DIR_TMP}/doc/kak.1" debian/kak.1.ex
+
echo "Building the package"
debuild -eCXXFLAGS="" -i -us -uc -b