diff options
author | Norbert Preining <norbert@preining.info> | 2020-10-12 03:04:00 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-10-12 03:04:00 +0000 |
commit | 0ce40abb18ec02ec6fd6bcc5f21612c88daa7578 (patch) | |
tree | 416289fe1448873fd8ca33051f50ad85bffa8aaa /support/dktools/sl7-build-rpm.sh | |
parent | fdb18507cd80dc17f5a5256153d34668b4f4e61c (diff) |
CTAN sync 202010120303
Diffstat (limited to 'support/dktools/sl7-build-rpm.sh')
-rwxr-xr-x | support/dktools/sl7-build-rpm.sh | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/support/dktools/sl7-build-rpm.sh b/support/dktools/sl7-build-rpm.sh deleted file mode 100755 index 14b418e1a5..0000000000 --- a/support/dktools/sl7-build-rpm.sh +++ /dev/null @@ -1,76 +0,0 @@ -#! /bin/sh - -VERSION=`cat version.txt` - -# Check whether this script is run as unprivileged user -if [ "X$LOGNAME" = "Xroot" ] -then - echo 'ERROR: This script must not be run as root!' - exit 1 -fi - -# Check whether HOME environment variable is set -if [ "X$HOME" = "X" ] -then - echo 'ERROR: Environment variable HOME not set!' - exit 1 -fi - -# Check whether the version number was obtained -if [ "X$VERSION" = "X" ] -then - echo 'ERROR: Failed to find version number!' - echo 'Make sure to call this script in the correct directory!' - exit 1 -fi - -# Create HOME/rpmbuild directory if not yet present -if [ ! -d ${HOME}/rpmbuild ] -then - mkdir -p ${HOME}/rpmbuild - chmod 755 ${HOME}/rpmbuild -fi - -# Create subdirectories of HOME/rpmbuild if not yet present -for i in BUILD BUILDROOT RPMS SOURCES SPECS SRPMS -do - if [ ! -d ${HOME}/rpmbuild/${i} ] - then - mkdir -p ${HOME}/rpmbuild/${i} - chmod 755 ${HOME}/rpmbuild/${i} - fi -done - -# Copy source tarball to HOME/rpmbuild/SOURCES -if [ -f ../dktools-${VERSION}.tar.gz ] -then - cp ../dktools-${VERSION}.tar.gz ${HOME}/rpmbuild/SOURCES -else - echo 'ERROR: File' ../dktools-${VERSION}.ta.gz 'not found!' - exit 1 -fi - -# Copy *.spec file to HOME/rpmbuild/SPECS -if [ -f dktools-el7.spec ] -then - cp dktools-el7.spec ${HOME}/rpmbuild/SPECS/dktools-el7.spec - chmod 644 ${HOME}/rpmbuild/SPECS/dktools-el7.spec -else - echo 'ERROR: File dktools-el7.spec not found!' - exit 1 -fi - -# Build RPM file -cd ${HOME}/rpmbuild/SPECS -rpmbuild -ba dktools-el7.spec 2>&1 | tee errors - -# Some final notes -echo '' -ls ${HOME}/rpmbuild/RPMS/*/dktools-*${VERSION}*.rpm -echo '' -echo 'If the previous command succeeded, you find your *.rpm files' -echo "in a subdirectory of the the ${HOME}/rpmbuild/RPMS directory." -echo 'If the rpmbuild command showed errors, make sure to run the' -echo 'sl6-prepare.sh script as root before running this one.' -echo '' - |