nano.spec 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. ##
  2. ## nano.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2022 OpenPKG Project <http://openpkg.org/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package version
  24. %define V_opkg 6.3
  25. %define V_dist 6.3
  26. %define V_subdir 6
  27. # package information
  28. Name: nano
  29. Summary: GNU Clone of the PICO Text Editor
  30. URL: http://www.nano-editor.org/
  31. Vendor: Chris Allegretta
  32. Packager: OpenPKG Project
  33. Distribution: OpenPKG Community
  34. Class: BASE
  35. Group: Editor
  36. License: GPL
  37. Version: %{V_opkg}
  38. Release: 20220428
  39. # list of sources
  40. Source0: http://www.nano-editor.org/dist/v%{V_subdir}/nano-%{V_dist}.tar.xz
  41. # build information
  42. BuildPreReq: OpenPKG, openpkg >= 20160101, make, pkgconfig
  43. PreReq: OpenPKG, openpkg >= 20160101
  44. BuildPreReq: ncurses
  45. PreReq: ncurses
  46. %description
  47. NANO is a clone of the popular PICO text editor from the PINE mail
  48. package. It is a very small editor targeted for novice users.
  49. %track
  50. prog nano = {
  51. version = %{V_dist}
  52. url = http://www.nano-editor.org/download.php
  53. regex = nano-(\d+\.\d+)\s*\.tar\.xz
  54. }
  55. %prep
  56. %setup -q -n nano-%{V_dist}
  57. %build
  58. CC="%{l_cc}" \
  59. CFLAGS="%{l_cflags -O}" \
  60. CPPFLAGS="%{l_cppflags}" \
  61. LDFLAGS="%{l_ldflags}" \
  62. GREP="grep" \
  63. ./configure \
  64. --prefix=%{l_prefix} \
  65. --mandir=%{l_prefix}/man \
  66. --infodir=%{l_prefix}/info \
  67. --without-slang \
  68. --enable-utf8 \
  69. --disable-nls
  70. %{l_make} %{l_mflags -O}
  71. %install
  72. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  73. strip $RPM_BUILD_ROOT%{l_prefix}/bin/nano >/dev/null 2>&1 || true
  74. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  75. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
  76. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  77. %files -f files
  78. %clean