recipe 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Build recipe for moe.
  2. #
  3. # Copyright (c) 2016-2017 Matias Fonzo, <selk@dragora.org>.
  4. # Copyright (c) 2019-2022 Matias Fonzo, <selk@dragora.org>.
  5. #
  6. # Licensed under the Apache License, Version 2.0 (the "License");
  7. # you may not use this file except in compliance with the License.
  8. # You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. # Exit immediately on any error
  18. set -e
  19. program=moe
  20. version=1.12
  21. release=1
  22. # Define a category for the output of the package name
  23. pkgcategory=tools
  24. tarname=${program}-${version}.tar.lz
  25. # Remote source(s)
  26. fetch=https://download.savannah.gnu.org/releases/moe/$tarname
  27. homepage=https://www.gnu.org/software/moe
  28. license=GPLv2+
  29. description="
  30. The GNU moe editor.
  31. GNU moe is a powerful, 8-bit clean, console text editor for ISO-8859
  32. and ASCII character encodings. It has a modeless, user-friendly
  33. interface, online help, multiple windows, unlimited undo/redo
  34. capability, unlimited line length, global search/replace (on all
  35. buffers at once), block operations, automatic indentation, word
  36. wrapping, file name completion, directory browser, duplicate removal
  37. from prompt histories, delimiter matching, text conversion from/to
  38. UTF-8, romanization, etc.
  39. For more information, visit: $homepage
  40. "
  41. # Source documentation
  42. docs="AUTHORS COPYING ChangeLog NEWS README"
  43. docsdir="${docdir}/${program}-${version}"
  44. build()
  45. {
  46. unpack "${tardir}/$tarname"
  47. cd "$srcdir"
  48. # Set sane permissions
  49. chmod -R u+w,go-w,a+rX-s .
  50. ./configure CXXFLAGS="$QICXXFLAGS -Wall -W" LDFLAGS="$QILDFLAGS" \
  51. $configure_args \
  52. --infodir=$infodir \
  53. --mandir=$mandir \
  54. --build="$(gcc -dumpmachine)"
  55. make -j${jobs} V=1
  56. make -j${jobs} DESTDIR="$destdir" install
  57. # To manage dot new config file
  58. touch "${destdir}/etc/.graft-config"
  59. # Compress documentation deleting redundancy
  60. lzip -9 "${destdir}/${infodir}/moe.info" \
  61. "${destdir}/${mandir}/man1/moe.1"
  62. rm -f "${destdir}/${infodir}/dir"
  63. # Copy documentation
  64. mkdir -p "${destdir}/$docsdir"
  65. cp -p $docs "${destdir}/$docsdir"
  66. }