chrony/make_release
Miroslav Lichvar 2563dd9d29 examples: drop chrony.spec
The example spec file was too limited to be recommended for use in any
rpm-based distribution, e.g. it didn't configure chronyd to drop the
root privileges.

Users that want to build a package from the latest source code should
start with the official package of their distribution.
2018-09-12 11:38:10 +02:00

51 lines
887 B
Bash
Executable file

#!/bin/sh
LANG=C.UTF-8
export LANG
if [ $# -ne 1 ]; then
echo "Usage : $0 <version>"
exit 2
fi
version=$1
tag=$version
subdir=chrony-${version}
umask 022
if [ ! -d .git ]; then
echo "No .git subdirectory?"
exit 3
fi
[ -d RELEASES ] || mkdir RELEASES
rm -rf RELEASES/$subdir
if [ $version != test ]; then
git tag -s $tag || exit 1
else
tag=HEAD
fi
git archive --format=tar --prefix=RELEASES/${subdir}/ $tag | \
tar xf - || exit 1
cd RELEASES/$subdir || exit 1
echo $version > version.txt
./configure && make -C doc man txt || exit 1
iconv -f utf-8 -t ascii//TRANSLIT < doc/installation.txt > INSTALL
iconv -f utf-8 -t ascii//TRANSLIT < doc/faq.txt > FAQ
make distclean
rm -f make_release .gitignore
cd ..
tar cv --owner root --group root $subdir | gzip -9 > ${subdir}.tar.gz
[ $version != test ] && \
gpg -b -a -o ${subdir}-tar-gz-asc.txt ${subdir}.tar.gz