mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Update build script
This commit is contained in:
parent
a066b81380
commit
c82bd3e5b8
@ -2,7 +2,7 @@
|
||||
# This script builds a maintainance LyX distribution according to
|
||||
# the procedure outlined at:
|
||||
# http://wiki.lyx.org/Devel/ReleaseProcedure
|
||||
# It also includes several other tests, to make sure the package
|
||||
# It also includes several other tests, to make sure the packages
|
||||
# works as it should.
|
||||
|
||||
#DEBUG=echo;
|
||||
@ -14,14 +14,7 @@
|
||||
# Where we will do our work
|
||||
BASE="/cvs/lyx/lyx-release";
|
||||
# Where our git repository lives
|
||||
SRCDIR="/cvs/lyx/lyx-stable"; # stable
|
||||
DEVDIR="/cvs/lyx/lyx-devel"; # devel
|
||||
|
||||
BRANCH=$(git status | head -n1 | sed -e 's/On branch //');
|
||||
if [ $BRANCH == "master" ]; then
|
||||
SRCDIR="$DEVDIR";
|
||||
fi
|
||||
|
||||
SRCDIR="/cvs/lyx/lyx-stable";
|
||||
# editor
|
||||
if [ -z "$EDITOR" ]; then EDITOR=vi; fi
|
||||
|
||||
@ -30,7 +23,7 @@ if [ -z "$EDITOR" ]; then EDITOR=vi; fi
|
||||
# Option variables
|
||||
|
||||
# Options to make, when we compile
|
||||
MAKEOPTS="-j8";
|
||||
MAKEOPTS="-j12";
|
||||
# Compile?
|
||||
COMPILE="YES";
|
||||
# Make patch file?
|
||||
@ -56,8 +49,7 @@ shift $(($OPTIND - 1));
|
||||
|
||||
# Determine LyX version
|
||||
cd $SRCDIR/
|
||||
VERSION=$(head configure.ac | grep AC_INIT | \
|
||||
perl -e 'while (<>) {m/AC_INIT\(\[LyX\],\[([^,]+)\]/; print $1;}');
|
||||
VERSION=$(head configure.ac | grep AC_INIT | perl -e 'while (<>) {m/AC_INIT\(\[LyX\],\[([^,]+)\]/; print $1;}');
|
||||
|
||||
# Development release?
|
||||
DEVEL_RELEASE="";
|
||||
@ -69,7 +61,7 @@ if [ "$VERSION" != "$PKG_VERSION" ]; then
|
||||
CURHASH=$(git rev-parse HEAD);
|
||||
# Eight chars should be enough
|
||||
CURHASH=${CURHASH:0:8};
|
||||
# New version is e.g. 2.3.4dev-12649348
|
||||
# New version is e.g. 2.3.4-12649348
|
||||
PKG_VERSION="$VERSION-$CURHASH";
|
||||
PATCH="";
|
||||
fi
|
||||
@ -79,17 +71,17 @@ echo -n "Ready to build source packages...";
|
||||
read
|
||||
|
||||
echo "Exporting clean tree...";
|
||||
$DEBUG rm -Rf "$BASE/lyx-export/";
|
||||
$DEBUG git checkout-index -a -f --prefix="$BASE/lyx-export/";
|
||||
$DEBUG cd "$BASE/lyx-export/";
|
||||
$DEBUG rm -Rf $BASE/lyx-export/
|
||||
$DEBUG git checkout-index -a -f --prefix=$BASE/lyx-export/
|
||||
$DEBUG cd $BASE/lyx-export/
|
||||
$DEBUG ./autogen.sh
|
||||
$DEBUG rm -Rf "$BASE/lyx-build/";
|
||||
$DEBUG mkdir "$BASE/lyx-build/";
|
||||
$DEBUG cd "$BASE/lyx-build/";
|
||||
$DEBUG rm -Rf $BASE/lyx-build/
|
||||
$DEBUG mkdir $BASE/lyx-build/
|
||||
$DEBUG cd $BASE/lyx-build/
|
||||
|
||||
echo "Building distribution...";
|
||||
$DEBUG "$BASE/lyx-export/configure" --enable-build-type=rel
|
||||
if ! $DEBUG make dist; then
|
||||
$DEBUG $BASE/lyx-export/configure --enable-build-type=rel --enable-qt5
|
||||
if ! $DEBUG make lyxdist; then
|
||||
echo "Couldn't make distribution!";
|
||||
exit 1;
|
||||
fi
|
||||
@ -107,8 +99,8 @@ $DEBUG ln lyx-$PKG_VERSION.tar.{gz,xz} $BASE/ || exit 1;
|
||||
echo -n "Ready to build signatures...";
|
||||
read
|
||||
|
||||
$DEBUG gpg -b lyx-$PKG_VERSION.tar.gz
|
||||
$DEBUG gpg -b lyx-$PKG_VERSION.tar.xz
|
||||
$DEBUG gpg -b lyx-$VERSION.tar.gz
|
||||
$DEBUG gpg -b lyx-$VERSION.tar.xz
|
||||
|
||||
echo "Signatures created:"
|
||||
$DEBUG ln lyx-$VERSION.tar.*.sig $BASE;
|
||||
@ -117,10 +109,10 @@ if [ -n "$COMPILE" ]; then
|
||||
echo -n "Ready to test compilation...";
|
||||
read
|
||||
|
||||
$DEBUG rm -Rf "$BASE/lyx-test/";
|
||||
$DEBUG mkdir "$BASE/lyx-test/";
|
||||
$DEBUG cd "$BASE/lyx-test/";
|
||||
$DEBUG tar -zxvf "$BASE/lyx-build/lyx-$VERSION.tar.gz";
|
||||
$DEBUG rm -Rf $BASE/lyx-test/
|
||||
$DEBUG mkdir $BASE/lyx-test/
|
||||
$DEBUG cd $BASE/lyx-test/
|
||||
$DEBUG tar -zxvf $BASE/lyx-build/lyx-$VERSION.tar.gz
|
||||
if ! $DEBUG cd lyx-$PKG_VERSION; then
|
||||
echo "Unable to enter build directory!";
|
||||
exit 1;
|
||||
@ -154,7 +146,7 @@ if [ ! -d "$BASE/lyx-patch/" ]; then
|
||||
$DEBUG mkdir "$BASE/lyx-patch/" || exit 1;
|
||||
fi
|
||||
|
||||
if [ ! -d "$BASE/lyx-patch/lyx-$LAST" ]; then
|
||||
if [ ! -d $BASE/lyx-patch/lyx-$LAST ]; then
|
||||
echo "Can't find directory for last version $LAST.";
|
||||
echo "See if you can fix this in $BASE/lyx-patch/.";
|
||||
echo "Try that, if you like, and then we'll continue.";
|
||||
@ -164,7 +156,7 @@ if [ ! -d "$BASE/lyx-patch/lyx-$LAST" ]; then
|
||||
if [ -z "$DEBUG" ]; then
|
||||
if [ ! -d $BASE/lyx-patch/lyx-$LAST ]; then
|
||||
echo "Will try to download from LyX site....";
|
||||
pushd "$BASE/lyx-patch/";
|
||||
pushd $BASE/lyx-patch/;
|
||||
wget ftp://ftp.lyx.org/pub/lyx/stable/${FIRST}x/lyx-$LAST.tar.gz;
|
||||
wget ftp://ftp.lyx.org/pub/lyx/stable/${FIRST}x/lyx-$LAST.tar.gz.sig
|
||||
gpg -q --verify lyx-$LAST.tar.gz.sig
|
||||
@ -186,15 +178,15 @@ fi
|
||||
echo -n "Ready to make patch against $LAST...";
|
||||
read
|
||||
|
||||
$DEBUG cd "$BASE/lyx-patch/";
|
||||
$DEBUG cd $BASE/lyx-patch/;
|
||||
if [ -z "$DEBUG" ]; then
|
||||
tar -zxvf "$BASE/lyx-build/lyx-$VERSION.tar.gz" >/dev/null;
|
||||
tar -zxvf $BASE/lyx-build/lyx-$VERSION.tar.gz >/dev/null;
|
||||
diff -urN -x .svn -x version.cpp lyx-$LAST lyx-$PKG_VERSION > patch;
|
||||
echo -n "Please check the patch...";
|
||||
read;
|
||||
$EDITOR patch;
|
||||
else
|
||||
$DEBUG tar -zxvf "$BASE/lyx-build/lyx-$VERSION.tar.gz";
|
||||
$DEBUG tar -zxvf $BASE/lyx-build/lyx-$VERSION.tar.gz;
|
||||
$DEBUG diff -urN -x .svn -x version.cpp lyx-$LAST lyx-$PKG_VERSION;
|
||||
fi
|
||||
|
||||
@ -207,13 +199,13 @@ elif [ "$LASTNUM" = "2" ]; then
|
||||
fi
|
||||
NUM="$LASTNUM$NUMFIX";
|
||||
if [ -z "$DEBUG" ]; then
|
||||
cat "$BASE/lyx-export/development/tools/patch-preamble" | \
|
||||
cat $BASE/lyx-export/development/tools/patch-preamble | \
|
||||
sed -e "s/VERSION/$PKG_VERSION/; s/ORIGINAL/$ORIGINAL/; s/LAST/$LAST/; s/NUM/$NUM/;" >patch-preamble;
|
||||
echo -n "Please verify the patch preamble...";
|
||||
read
|
||||
$EDITOR patch-preamble;
|
||||
PATCH="patch-$VERSION";
|
||||
cat patch-preamble "$BASE/lyx-export/ANNOUNCE" patch >$PATCH;
|
||||
cat patch-preamble $BASE/lyx-export/ANNOUNCE patch >$PATCH;
|
||||
gzip -c $PATCH > $PATCH.gz
|
||||
if [ -f $PATCH.gz.sig ]; then
|
||||
rm $PATCH.gz.sig;
|
||||
|
Loading…
Reference in New Issue
Block a user