Commit f36558ee authored by Olav Morken's avatar Olav Morken
Browse files

Restructure changelog generation

Move the code for generating the changelog file to a single location
and build it in two steps.
parent b63d38b2
......@@ -39,9 +39,6 @@ package="radsecproxy"
version="1.9.0"
revision="2${lsb_release_name}~uninett"
export TZ="Europe/Oslo"
now=$(date +"%a, %d %b %Y %T %z")
cat >> /etc/apt/sources.list << EOF
deb-src http://cdn-fastly.deb.debian.org/debian ${lsb_release_name} main
......@@ -67,16 +64,20 @@ tar xf "${package}"_*.debian.tar.xz -C "${package}"-"${version}/"
rm -r "${package}"-"${version}/debian/patches"
sed -i 's/\.1$/.8/' "${package}"-"${version}/debian/manpages"
cat > changelog << EOF
# Build our changelog file. We want to prepend our changelog entry to the
# existing file.
changelog_file="${package}-${version}/debian/changelog"
cat /dev/stdin "${changelog_file}" > "${changelog_file}.new" << EOF
radsecproxy (${version}-${revision}) unstable; urgency=medium
* New upstream release - ${version}
-- Kolbjørn Barmen <debian@kolla.no> ${now}
-- Kolbjørn Barmen <debian@kolla.no> $(TZ="Europe/Oslo" date +"%a, %d %b %Y %T %z")
EOF
cat "${package}-${version}/debian/changelog" >> changelog
cat changelog > "${package}-${version}/debian/changelog"
mv "${changelog_file}.new" "${changelog_file}"
cd "${package}-${version}/"
dpkg-buildpackage
......
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