recipe 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # Build recipe for emacs.
  2. #
  3. # Copyright (C) 2018 Kevin "The Nuclear" Bloom, <kdb4@openmailbox.org>
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. #
  17. # Based on recipes written by Mateus P. Rodrigues, <mprodrigues@dragora.org>
  18. # and Matias Fonzo, <selk@dragora.org>.
  19. program=emacs
  20. version=27.1
  21. release=1
  22. tarname=${program}-${version}.tar.xz
  23. # srcdir=${program}-${version} # Not needed in major releases
  24. # Remote source(s)
  25. fetch=http://ftp.gnu.org/gnu/emacs/$tarname
  26. description="
  27. emacs - The Emacs text editor.
  28. GNU Emacs is an extensible, customizable text editor and more.
  29. At its core is an interpreter for Emacs Lisp, a dialect of the
  30. Lisp programming language with extensions to support text
  31. editing.
  32. "
  33. homepage=http://www.gnu.org/software/emacs/
  34. license="GPLv3+"
  35. # Source documentation
  36. docs="BUGS CONTRIBUTE COPYING ChangeLog* README"
  37. docsdir="${docdir}/${program}-${version}"
  38. build()
  39. {
  40. set -e
  41. unpack "${tardir}/$tarname"
  42. cd "$srcdir"
  43. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  44. $configure_args \
  45. --libdir=/usr/lib${libSuffix} \
  46. --infodir=$infodir \
  47. --mandir=$mandir \
  48. --docdir=$docdir \
  49. --with-x \
  50. --build="$(cc -dumpmachine)"
  51. make -j${jobs} V=1
  52. make -j${jobs} DESTDIR="$destdir" install
  53. # Delete index file for the package
  54. if test -d "${destdir}/$infodir"
  55. then
  56. rm -f "${destdir}/${infodir}/dir"
  57. fi
  58. # Copy documentation
  59. mkdir -p "${destdir}${docsdir}"
  60. for file in $docs
  61. do
  62. if test -e $file
  63. then
  64. cp -p $file "${destdir}${docsdir}"
  65. fi
  66. done
  67. }