commit 0272ae778d7e67ef4741ea190615c585c32d9955
Author: Richard Kimberly Heck <[email protected]>
Date: Thu Aug 30 15:08:47 2018 -0400
Updates to build script.
---
development/tools/lyx-build | 31 +++++++++++++++++++++++++------
development/tools/patch-preamble | 8 ++++----
2 files changed, 29 insertions(+), 10 deletions(-)
diff --git a/development/tools/lyx-build b/development/tools/lyx-build
index 21eb84f..0463e4d 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 b068c47..f385953 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.