ncurses.spec 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. ##
  2. ## ncurses.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package versions
  25. %define V_base 5.5
  26. %define V_patch1 20060909
  27. %define V_patch2 20060916
  28. %define V_patch3 20060923
  29. %define V_patch4 20060930
  30. %define V_patch5 20061007
  31. %define V_patch6 20061014
  32. %define V_patch7 20061021
  33. %define V_patch8 20061028
  34. %define V_patch9 20061104
  35. %define V_patch10 20061125
  36. %define V_patch11 20061202
  37. %define V_patch12 20061209
  38. %define V_patch13 20061216
  39. %define V_patchB %{V_patch13}
  40. %define V_patchL %{V_patch13}
  41. %define V_patches 13
  42. # package information
  43. Name: ncurses
  44. Summary: Terminal Capability and Display Library
  45. URL: http://www.gnu.org/software/ncurses/
  46. Vendor: Free Software Foundation
  47. Packager: OpenPKG Foundation e.V.
  48. Distribution: OpenPKG Community
  49. Class: BASE
  50. Group: Terminal
  51. License: MIT-style
  52. Version: %{V_base}.%{V_patchL}
  53. Release: 20061217
  54. # list of sources
  55. Source0: ftp://invisible-island.net/ncurses/ncurses-%{V_base}.tar.gz
  56. Patch1: ftp://invisible-island.net/ncurses/%{V_base}/patch-%{V_base}-%{V_patch1}.sh.gz
  57. Patch2: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch2}.patch.gz
  58. Patch3: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch3}.patch.gz
  59. Patch4: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch4}.patch.gz
  60. Patch5: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch5}.patch.gz
  61. Patch6: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch6}.patch.gz
  62. Patch7: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch7}.patch.gz
  63. Patch8: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch8}.patch.gz
  64. Patch9: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch9}.patch.gz
  65. Patch10: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch10}.patch.gz
  66. Patch11: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch11}.patch.gz
  67. Patch12: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch12}.patch.gz
  68. Patch13: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch13}.patch.gz
  69. Patch100: ncurses.patch
  70. # build information
  71. Prefix: %{l_prefix}
  72. BuildRoot: %{l_buildroot}
  73. BuildPreReq: OpenPKG, openpkg >= 20040130, sharutils
  74. PreReq: OpenPKG, openpkg >= 20040130
  75. AutoReq: no
  76. AutoReqProv: no
  77. %description
  78. NCurses is the GNU re-implementation of the popular SVR4 Curses
  79. terminal screen handling library. Its API is base-level conformant
  80. with the X/OPEN curses specification XSI Curses. It uses the
  81. Terminfo database format, supports pads and color and multiple
  82. highlights and forms characters and function-key mapping, and has
  83. all the other SVR4-Curses enhancements over original BSD Curses.
  84. Additionally, it provides full emulations of the SVR4 panels
  85. (supporting a stack of windows), forms (supporting data collection
  86. through on-screen forms) and menu (supporting a uniform interface
  87. for menu programming) companion libraries.
  88. %track
  89. prog ncurses = {
  90. version = %{V_base}
  91. url = ftp://invisible-island.net/ncurses/
  92. regex = ncurses-(__VER__)\.tar\.gz
  93. }
  94. prog ncurses:patchbase = {
  95. disabled
  96. version = %{V_patchB}
  97. url = ftp://invisible-island.net/ncurses/
  98. regex = (\d+\.\d+)
  99. url = ftp://invisible-island.net/ncurses/__NEWVER__/
  100. regex = ncurses-__NEWVER__-(\d+)-patch\.sh\.bz2
  101. }
  102. prog ncurses:patchset = {
  103. version = %{V_patchL}
  104. url = ftp://invisible-island.net/ncurses/
  105. regex = (\d+\.\d+)
  106. url = ftp://invisible-island.net/ncurses/__NEWVER__/
  107. regex = ncurses-__NEWVER__-(\d+)\.patch\.gz
  108. }
  109. %prep
  110. %setup -q -n ncurses-%{V_base}
  111. for patchfile in \
  112. %{expand:%(i=1; while [ $i -le %{V_patches} ]; do %{l_shtool} echo -n " %%{PATCH$i}"; i=`expr $i + 1`; done)}
  113. do
  114. case "$patchfile" in
  115. *.sh.bz2 ) %{l_bzip2} -d -c $patchfile | sed -e 's;gzip -dc;%{l_gzip} -dc;' -e 's;patch -p1;%{l_patch} -p1;' | sh - || true ;;
  116. *.sh.gz ) %{l_gzip} -d -c $patchfile | sed -e 's;gzip -dc;%{l_gzip} -dc;' -e 's;patch -p1;%{l_patch} -p1;' | sh - || true ;;
  117. *.patch.bz2 ) %{l_bzip2} -d -c $patchfile | %{l_patch} -p1 || true ;;
  118. *.patch.gz ) %{l_gzip} -d -c $patchfile | %{l_patch} -p1 || true ;;
  119. * )
  120. echo "Unknown patch format" | %{l_rpmtool} msg -b -t error 1>&2
  121. exit 1
  122. ;;
  123. esac
  124. done
  125. %patch -p0 -P 100
  126. %build
  127. CC="%{l_cc}" \
  128. CFLAGS="%{l_cflags}" \
  129. ./configure \
  130. --prefix=%{l_prefix} \
  131. --includedir=%{l_prefix}/include/ncurses \
  132. --datadir=%{l_prefix}/share/ncurses \
  133. --enable-hashmap \
  134. --enable-safe-sprintf \
  135. --without-debug \
  136. --with-manpage-format=normal \
  137. --disable-getcap-cache \
  138. --without-cxx-binding \
  139. --without-cxx \
  140. --without-gpm \
  141. --enable-termcap \
  142. --disable-overwrite
  143. %{l_make} %{l_mflags}
  144. %install
  145. rm -rf $RPM_BUILD_ROOT
  146. %{l_shtool} subst -e "s;ln -s;ln;g" edit_man.sh
  147. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  148. ( cd $RPM_BUILD_ROOT%{l_prefix}/man
  149. for dir in man1 man3; do
  150. cd $dir
  151. for file in *.[13][a-z]*; do
  152. if [ ".$file" = ".*.[13][a-z]*" ]; then
  153. break
  154. fi
  155. eval `echo "$file" | sed -e 's;^\(.*\.[13]\)[a-z]*$;base=\1;'`
  156. mv $file ncurses_$base
  157. done
  158. cd ..
  159. done
  160. ) || exit $?
  161. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
  162. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  163. %files -f files
  164. %clean
  165. rm -rf $RPM_BUILD_ROOT