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.

37 lines
1002B

  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. [ -d "${TDE_PACKAGING_DIR}" ] || TDE_PACKAGING_DIR="${HOME}/tde/${TDE_BRANCH:-master}/tde-packaging"
  6. [ -d "${DIST_PACKAGING_DIR}" ] || DIST_PACKAGING_DIR="${TDE_PACKAGING_DIR}/redhat"
  7. # Special case for QT3
  8. if [ "${PKGNAME}" = "qt3" ]; then
  9. case "$(rpmdist.sh --dist)" in
  10. .oss*) DIST_PACKAGING_DIR="${TDE_PACKAGING_DIR}/opensuse" ;;
  11. .mga*|.mdk*|.pclos*) DIST_PACKAGING_DIR="${TDE_PACKAGING_DIR}/mageia" ;;
  12. esac
  13. fi
  14. for filename in \
  15. "${PKGNAME}-${TDE_VERSION}.spec" \
  16. "${PKGNAME}-14.0.0.spec" \
  17. "${PKGNAME}.spec" \
  18. "trinity-${PKGNAME}-${TDE_VERSION}.spec" \
  19. "trinity-${PKGNAME}-14.0.0.spec" \
  20. "trinity-${PKGNAME}.spec" \
  21. ; do
  22. SPECFILE="$(find "${DIST_PACKAGING_DIR}" -follow -name "${filename}")"
  23. [ -r "${SPECFILE}" ] && break || continue
  24. done
  25. if [ -r "${SPECFILE}" ]; then
  26. echo "${SPECFILE}"
  27. exit 0
  28. else
  29. exit 1
  30. fi