recipe 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # Build recipe for moe.
  2. #
  3. # Copyright (c) 2016-2017 Matias Fonzo, <selk@dragora.org>.
  4. # Copyright (c) 2019-2020 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. program=moe
  18. version=1.11-rc1
  19. pkgversion=$(echo $version | tr - _)
  20. release=1
  21. # Set 'outdir' for a nice and well-organized output directory
  22. outdir="${outdir}/${arch}/tools"
  23. tarname=${program}-${version}.tar.lz
  24. # Remote source(s)
  25. fetch=http://download.savannah.gnu.org/releases/moe/$tarname
  26. homepage=http://www.gnu.org/software/moe
  27. license=GPLv2+
  28. description="
  29. The GNU moe editor.
  30. GNU moe is a powerful, 8-bit clean, console text editor for ISO-8859
  31. and ASCII character encodings. It has a modeless, user-friendly
  32. interface, online help, multiple windows, unlimited undo/redo
  33. capability, unlimited line length, global search/replace (on all
  34. buffers at once), block operations, automatic indentation, word
  35. wrapping, file name completion, directory browser, duplicate removal
  36. from prompt histories, delimiter matching, text conversion from/to
  37. UTF-8, romanization, etc.
  38. For more information, visit: $homepage
  39. "
  40. # Source documentation
  41. docs="AUTHORS COPYING ChangeLog NEWS README"
  42. docsdir="${docdir}/${program}-${pkgversion}"
  43. build()
  44. {
  45. set -e
  46. unpack "${tardir}/$tarname"
  47. cd "$srcdir"
  48. # Set sane permissions
  49. chmod -R u+w,go-w,a+rX-s .
  50. ./configure CXXFLAGS="-Wall -W $QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
  51. $configure_args \
  52. --infodir=$infodir \
  53. --mandir=$mandir \
  54. --build="$(cc -dumpmachine)"
  55. make -j${jobs}
  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. for file in $docs
  66. do
  67. cp -p $file "${destdir}${docsdir}"
  68. done
  69. }