summaryrefslogtreecommitdiff
path: root/prepare-release
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-08-10 16:19:00 +0200
committerJulian Andres Klode <jak@debian.org>2016-08-10 16:19:00 +0200
commite02c3a9ec2b2f7a8d4aecd70f2ecdae27c207aa9 (patch)
treeffa99f96949f3eab728a1b8caecdd014ea8d6f81 /prepare-release
parentb2cfacf1180e4b3fcbb2ae2ea52cf270ef74e971 (diff)
parent61fef4ddbec8f70bb9e213ac0491d4e6cfefab30 (diff)
Merge branch 'cmake'
Diffstat (limited to 'prepare-release')
-rwxr-xr-xprepare-release25
1 files changed, 18 insertions, 7 deletions
diff --git a/prepare-release b/prepare-release
index 18fd3af94..df1b0a2cf 100755
--- a/prepare-release
+++ b/prepare-release
@@ -11,7 +11,7 @@ VERSION=$(dpkg-parsechangelog | sed -n -e '/^Version:/s/^Version: //p')
DISTRIBUTION=$(dpkg-parsechangelog | sed -n -e '/^Distribution:/s/^Distribution: //p')
LIBAPTPKGVERSION="$(awk -v ORS='.' '/^\#define APT_PKG_M/ {print $3}' apt-pkg/contrib/macros.h | sed 's/\.$//')"
-LIBAPTINSTVERSION="$(grep '^MAJOR=' apt-inst/makefile |cut -d '=' -f 2)"
+LIBAPTINSTVERSION="$(sed -nr 's/set\(MAJOR ([^)]*)\)/\1/p' apt-inst/CMakeLists.txt)"
librarysymbolsfromfile() {
local MISSING="$(grep '^+#MISSING' "$1")"
@@ -53,7 +53,7 @@ if [ "$1" = 'pre-export' ]; then
VERSION="$VERSION~$(date +%Y%m%d)"
fi
- sed -i -e "s/^PACKAGE_VERSION=\".*\"$/PACKAGE_VERSION=\"${VERSION}\"/" configure.ac
+ sed -i -e "s/^set(PACKAGE_VERSION \".*\")$/set(PACKAGE_VERSION \"${VERSION}\")/" CMakeLists.txt
sed -i -e "s/^<!ENTITY apt-product-version \".*\">$/<!ENTITY apt-product-version \"${VERSION}\">/" doc/apt-verbatim.ent
# update the last-modification field of manpages based on git changes
@@ -68,15 +68,17 @@ Git-Dch: Ignore' "$file")" '+%Y-%m-%dT00:00:00Z')"
if [ "$(date +%Y-%m-%d)" != "$(grep --max-count=1 '^"POT-Creation-Date: .*\n"$' po/apt-all.pot | cut -d' ' -f 2)" -o \
"$(date +%Y-%m-%d)" != "$(grep --max-count=1 '^"POT-Creation-Date: .*\n"$' doc/po/apt-doc.pot | cut -d' ' -f 2)" ]; then
echo >&2 'POT files are not up-to-date. Execute »make update-po« for you…'
- make update-po
+ [ -e build ] || mkdir build
+ ( cd build && cmake .. )
+ cmake --build build --target update-po -- -j 4
fi
elif [ "$1" = 'pre-build' ]; then
if [ "$DISTRIBUTION" = "UNRELEASED" ]; then
echo 'BUILDING AN UNRELEASED VERSION'
else
- CONFVERSION="$(sed -ne "s/^PACKAGE_VERSION=\"\(.*\)\"$/\1/p" configure.ac)"
+ CONFVERSION="$(sed -ne "s/^set(PACKAGE_VERSION \"\(.*\)\")$/\1/p" CMakeLists.txt)"
if [ "$VERSION" != "$CONFVERSION" ]; then
- echo "changelog (${VERSION}) and configure (${CONFVERSION}) talk about different versions!"
+ echo "changelog (${VERSION}) and CMakeLists.txt (${CONFVERSION}) talk about different versions!"
echo "You probably want to run »./prepare-release pre-export« to fix this."
exit 1
fi
@@ -115,9 +117,11 @@ elif [ "$1" = 'post-build' ]; then
fi
done
# lets assume we will always have a german manpage translation
- if [ -e 'doc/de/' ]; then
+ if [ -e */doc/de/ -o -e doc/de ]; then
# … but check the translations only with one vendor for translation-specific errors
- if ! xmllint --nonet --valid --noout $(find doc/ -mindepth 2 -maxdepth 2 -name '*.xml'); then
+ if ! xmllint --path /vendor/$(./vendor/getinfo current)/ \
+ --path doc/ \
+ --nonet --valid --noout $(find doc/ */doc/ -mindepth 2 -maxdepth 2 -name '*.xml'); then
echo >&2 "WARNING: translated docbook manpages have errors!"
fi
else
@@ -127,7 +131,14 @@ elif [ "$1" = 'post-build' ]; then
elif [ "$1" = 'library' ]; then
librarysymbols() {
+ local libname=$(echo "${1}" | cut -c 4-)
local buildlib="build/bin/${1}.so.${2}"
+ for dir in $libname */$libname; do
+ local new_buildlib="$dir/${1}.so.${2}"
+ if [ -r "${new_buildlib}" ] && [ ! -e "$buildlib" -o "$new_buildlib" -nt "$buildlib" ]; then
+ local buildlib="${new_buildlib}"
+ fi
+ done
if [ ! -r "$buildlib" ]; then
echo "ERROR: The library ${1} has to be built before symbols can be checked!"
return