From: Richard Kimberly Heck Date: Thu, 30 Aug 2018 19:08:47 +0000 (-0400) Subject: Updates to build script. X-Git-Tag: 2.3.1~10 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0272ae778d7e67ef4741ea190615c585c32d9955;p=features.git Updates to build script. --- diff --git a/development/tools/lyx-build b/development/tools/lyx-build index 21eb84f333..0463e4de5b 100755 --- a/development/tools/lyx-build +++ b/development/tools/lyx-build @@ -16,9 +16,24 @@ if [ -z "$EDITOR" ]; then EDITOR=vi; fi # Options to make, when we compile MAKEOPTS="-j4"; +PKGNUM=""; +while getopts ":m:p:" opt; do + case $opt in + m ) MAKEOPTS="$OPTARG";; + p ) PKGNUM="$OPTARG";; + \? ) echo "Unknown option $opt"; exit 1;; + esac +done +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_BASE="$VERSION"; + +if [ -n "$PKGNUM" ]; then + VERSION="$VERSION-$PKGNUM"; +fi echo "This is version $VERSION."; echo -n "Ready to build source packages..."; @@ -41,6 +56,10 @@ if ! make lyxdist; then fi echo "Packages created:"; +if [ -n "$PKGNUM" ]; then + mv lyx-$VERSION_BASE.tar.gz lyx-$VERSION.tar.gz; + mv lyx-$VERSION_BASE.tar.xz lyx-$VERSION.tar.xz; +fi cp -v lyx-$VERSION.tar.{gz,xz} $BASE; echo -n "Ready to build signatures..."; @@ -58,8 +77,8 @@ read rm -Rf $BASE/lyx-test/ mkdir $BASE/lyx-test/ cd $BASE/lyx-test/ -tar -zxvf $BASE/lyx-build/lyx-$VERSION.tar.gz >/dev/null -if ! cd lyx-$VERSION; then +tar -zxvf $BASE/lyx-build/lyx-$VERSION.tar.gz +if ! cd lyx-$VERSION_BASE; then echo "Unable to enter build directory!"; exit 1; fi @@ -76,9 +95,9 @@ else exit 1; fi -LASTNUM=$(echo $VERSION | sed -e 's/.*\.//'); -LAST=$(($LASTNUM - 1)); -FIRST=$(echo $VERSION | sed -e 's/[0-9]*$//'); +LASTNUM=$(echo $VERSION_BASE | sed -e 's/.*\.//'); +LAST=$((LASTNUM - 1)); +FIRST=$(echo $VERSION_BASE | sed -e 's/[0-9]*$//'); ORIGINAL=${FIRST}0; LAST=$FIRST$LAST; @@ -133,7 +152,7 @@ elif [ "$LASTNUM" = "2" ]; then fi NUM="$LASTNUM$NUMFIX"; cat $BASE/lyx-export/development/tools/patch-preamble | \ -sed -e "s/VERSION/$VERSION/; s/ORIGINAL/$ORIGINAL/; s/LAST/$LAST/; s/NUM/$NUM/;" >patch-preamble; +sed -e "s/VERSION/$VERSION_BASE/; s/ORIGINAL/$ORIGINAL/; s/LAST/$LAST/; s/NUM/$NUM/;" >patch-preamble; echo -n "Please verify the patch preamble..."; read $EDITOR patch-preamble; diff --git a/development/tools/patch-preamble b/development/tools/patch-preamble index b068c47902..f385953e2e 100644 --- a/development/tools/patch-preamble +++ b/development/tools/patch-preamble @@ -1,10 +1,10 @@ -This is patch-2.0.1, the 1st maintenance patch against LyX 2.0.0. -You need the source of lyx 2.0.0 to apply this patch. +This is patch-VERSION, the NUM maintenance patch against LyX ORIGINAL. +You need the source of lyx LAST to apply this patch. This patch should be applied like this - cd lyx-2.0.0 + cd lyx-LAST make distclean - zcat patch-2.0.0.gz | patch -p1 + zcat patch-VERSION.gz | patch -p1 and then LyX can be build as usual. If you want to skip the 'distclean' step, make sure to re-run configure.