xemacs-packages.eclass 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # @ECLASS: xemacs-packages.eclass
  4. # @MAINTAINER:
  5. # xemacs@gentoo.org
  6. # @BLURB: Eclass to support elisp packages distributed by XEmacs.
  7. # @DESCRIPTION:
  8. # This eclass supports ebuilds for packages distributed by XEmacs.
  9. # @ECLASS-VARIABLE: XEMACS_PKG_CAT
  10. # @REQUIRED
  11. # @DESCRIPTION:
  12. # The package category that the package is in. Can be either standard,
  13. # mule, or contrib.
  14. # @ECLASS-VARIABLE: XEMACS_EXPERIMENTAL
  15. # @DEFAULT_UNSET
  16. # @DESCRIPTION:
  17. # If set then the package is downloaded from the experimental packages
  18. # repository, which is the staging area for packages upstream. Packages
  19. # in the experimental repository are auto-generated from XEmacs VCS, so
  20. # they may not be well-tested.
  21. EXPORT_FUNCTIONS src_unpack src_install
  22. RDEPEND="app-editors/xemacs"
  23. S="${WORKDIR}"
  24. : ${HOMEPAGE:="http://xemacs.org/"}
  25. : ${LICENSE:="GPL-2+"}
  26. # Backwards compatibility code, to be removed after 2017-05-03
  27. : ${XEMACS_PKG_CAT:=${PKG_CAT}}
  28. : ${XEMACS_EXPERIMENTAL:=${EXPERIMENTAL}}
  29. if [[ -n ${XEMACS_EXPERIMENTAL} ]]; then
  30. : ${SRC_URI:="http://ftp.xemacs.org/pub/xemacs/beta/experimental/packages/${P}-pkg.tar.gz"}
  31. else
  32. : ${SRC_URI:="http://ftp.xemacs.org/pub/xemacs/packages/${P}-pkg.tar.gz"}
  33. fi
  34. xemacs-packages_src_unpack() { :; }
  35. xemacs-packages_src_install() {
  36. local install_dir
  37. case ${XEMACS_PKG_CAT} in
  38. standard) install_dir="/usr/lib/xemacs/xemacs-packages" ;;
  39. mule) install_dir="/usr/lib/xemacs/mule-packages" ;;
  40. contrib) install_dir="/usr/lib/xemacs/site-packages" ;;
  41. *) die "Unsupported package category in XEMACS_PKG_CAT (or unset)" ;;
  42. esac
  43. debug-print "install_dir is ${install_dir}"
  44. dodir "${install_dir}"
  45. cd "${D}${EPREFIX}${install_dir}" || die
  46. unpack ${A}
  47. }