ncurses.spec 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. ##
  2. ## ncurses.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package versions
  26. %define V_base 5.3
  27. %define V_patch0 20031004
  28. %define V_patch1 20031018
  29. %define V_patch2 20031025
  30. %define V_patch3 20031101
  31. %define V_patch4 20031108
  32. %define V_patch5 20031122
  33. %define V_patch6 20031129
  34. %define V_patchL %{V_patch6}
  35. %define V_patches 6
  36. # package information
  37. Name: ncurses
  38. Summary: Terminal Capability and Display Library
  39. URL: http://www.gnu.org/software/ncurses/
  40. Vendor: Free Software Foundation
  41. Packager: The OpenPKG Project
  42. Distribution: OpenPKG [BASE]
  43. Group: Terminal
  44. License: GPL
  45. Version: %{V_base}.%{V_patchL}
  46. Release: 20031204
  47. # list of sources
  48. Source0: ftp://invisible-island.net/ncurses/ncurses-%{V_base}.tar.gz
  49. Patch0: ftp://invisible-island.net/ncurses/%{V_base}/patch-%{V_base}-%{V_patch0}.sh
  50. Patch1: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch1}.patch.gz
  51. Patch2: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch2}.patch.gz
  52. Patch3: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch3}.patch.gz
  53. Patch4: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch4}.patch.gz
  54. Patch5: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch5}.patch.gz
  55. Patch6: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch6}.patch.gz
  56. Patch100: ncurses.patch
  57. # build information
  58. Prefix: %{l_prefix}
  59. BuildRoot: %{l_buildroot}
  60. BuildPreReq: OpenPKG, openpkg >= 20020206, sharutils
  61. PreReq: OpenPKG, openpkg >= 20020206
  62. AutoReq: no
  63. AutoReqProv: no
  64. %description
  65. NCurses is the GNU re-implementation of the popular Curses
  66. terminal screen handling library.
  67. %prep
  68. %setup -q -n ncurses-%{V_base}
  69. ( cat %{PATCH0} >patchbase.sh
  70. %{l_shtool} subst \
  71. -e 's;gzip -dc;%{l_gzip} -dc;' \
  72. -e 's;patch -p1;%{l_patch} -p1;' \
  73. patchbase.sh
  74. sh patchbase.sh
  75. ) || exit $?
  76. for patchfile in \
  77. %{expand:%(i=1; while [ $i -le %{V_patches} ]; do %{l_shtool} echo -n " %%{PATCH$i}"; i=`expr $i + 1`; done)}
  78. do
  79. %{l_gzip} -d -c $patchfile | %{l_patch} -p1 || true
  80. done
  81. %patch100 -p0
  82. %build
  83. CC="%{l_cc}" \
  84. CFLAGS="%{l_cflags}" \
  85. ./configure \
  86. --prefix=%{l_prefix} \
  87. --includedir=%{l_prefix}/include/ncurses \
  88. --datadir=%{l_prefix}/share/ncurses \
  89. --enable-hashmap \
  90. --enable-safe-sprintf \
  91. --without-debug \
  92. --with-manpage-format=normal \
  93. --disable-getcap-cache \
  94. --without-cxx-binding \
  95. --without-cxx \
  96. --enable-termcap \
  97. --disable-overwrite
  98. %{l_make} %{l_mflags}
  99. %install
  100. rm -rf $RPM_BUILD_ROOT
  101. %{l_shtool} subst -e "s;ln -s;ln;g" man/edit_man.sh
  102. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  103. ( cd $RPM_BUILD_ROOT%{l_prefix}/man
  104. for dir in man1 man3; do
  105. cd $dir
  106. for file in *.[13][a-z]*; do
  107. if [ ".$file" = ".*.[13][a-z]*" ]; then
  108. break
  109. fi
  110. eval `echo "$file" | sed -e 's;^\(.*\.[13]\)[a-z]*$;base=\1;'`
  111. mv $file ncurses_$base
  112. done
  113. cd ..
  114. done
  115. ) || exit $?
  116. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
  117. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  118. %files -f files
  119. %clean
  120. rm -rf $RPM_BUILD_ROOT