Trinity Desktop Environment Packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
604B

  1. #!/bin/bash
  2. PKGNAME="${1##*/}"
  3. TDE_VERSION="${2:-${TDE_VERSION:-14.0.5}}"
  4. [ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1
  5. SPECFILE=$(get_specfile.sh ${PKGNAME} ${TDE_VERSION})
  6. [ ! -r "${SPECFILE}" ] && exit 2
  7. VERSION=$(sed -n "/^Version:/ s/Version:[ ]*//p" ${SPECFILE})
  8. RELEASE=$(sed -n "/^Release:/ s/Release:[ ]*//p" ${SPECFILE})
  9. VERSION=$(rpm -E "${VERSION}")
  10. VERSION=$(rpm --define "tde_version ${TDE_VERSION}" -E "${VERSION}")
  11. RELEASE=$(rpm --define "tde_version ${TDE_VERSION}" -E "${RELEASE}")
  12. RELEASE=${RELEASE%$(rpmdist.sh --dist)}
  13. echo ${VERSION}-${RELEASE}