diff options
author | Ramón M. Gómez <ramongomez@us.es> | 2020-02-20 14:27:30 +0100 |
---|---|---|
committer | Ramón M. Gómez <ramongomez@us.es> | 2020-02-20 14:27:30 +0100 |
commit | 12ff50f5288fc4abae453dba488c2bf3608fc51d (patch) | |
tree | d96193d8bd5478336076d3ccd77eb0e52d8a466a | |
parent | ba568ee49724fa3dddc77306f5d9179fd92d8fac (diff) |
#940: Fix bug when build OGAgent for openSUSE.
-rwxr-xr-x | admin/Sources/Clients/ogagent/linux/build-packages.sh | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/admin/Sources/Clients/ogagent/linux/build-packages.sh b/admin/Sources/Clients/ogagent/linux/build-packages.sh index 02b5ee12..facde2c9 100755 --- a/admin/Sources/Clients/ogagent/linux/build-packages.sh +++ b/admin/Sources/Clients/ogagent/linux/build-packages.sh @@ -1,24 +1,26 @@ #!/bin/bash cd $(dirname "$0") -top=`pwd` +top=$(pwd) -[ -r ../src/VERSION ] && VERSION="$(cat ../src/VERSION)" || VERSION="1.1.0" +VERSION="$(cat ../src/VERSION 2>/dev/null)" || VERSION="1.1.1" RELEASE="1" # Debian based dpkg-buildpackage -b -d -cat ogagent-template.spec | - sed -e s/"version 0.0.0"/"version ${VERSION}"/g | - sed -e s/"release 1"/"release ${RELEASE}"/g > ogagent-$VERSION.spec +# Fix version number. +sed -e "s/version 0.0.0/version ${VERSION}/g" \ + -e "s/release 1/release ${RELEASE}/g" ogagent-template.spec > ogagent-$VERSION.spec # Now fix dependencies for opensuse -cat ogagent-template.spec | - sed -e s/"version 0.0.0"/"version ${VERSION}"/g | - sed -e s/"name ogagent"/"name ogagent-opensuse"/g | - sed -e s/"PyQt4"/"python-qt4"/g | - sed -e s/"libXScrnSaver"/"libXss1"/g > ogagent-opensuse-$VERSION.spec +sed -e "s/name ogagent/name ogagent-opensuse/g" \ + -e "s/version 0.0.0/version ${VERSION}/g" \ + -e "s/release 1/release ${RELEASE}/g" \ + -e "s/chkconfig//g" \ + -e "s/initscripts/insserv/g" \ + -e "s/PyQt4/python-qt4/g" \ + -e "s/libXScrnSaver/libXss1/g" ogagent-template.spec > ogagent-opensuse-$VERSION.spec # Right now, ogagent-xrdp-1.7.0.spec is not needed |