ncurses.spec 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. ##
  2. ## ncurses.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2005 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2005 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2005 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.4
  27. %define V_patch1 20050319
  28. %define V_patch2 20050320
  29. %define V_patchB %{V_patch1}
  30. %define V_patchL %{V_patch2}
  31. %define V_patches 2
  32. # package information
  33. Name: ncurses
  34. Summary: Terminal Capability and Display Library
  35. URL: http://www.gnu.org/software/ncurses/
  36. Vendor: Free Software Foundation
  37. Packager: The OpenPKG Project
  38. Distribution: OpenPKG
  39. Class: BASE
  40. Group: Terminal
  41. License: GPL
  42. Version: %{V_base}.%{V_patchL}
  43. Release: 20050321
  44. # list of sources
  45. Source0: ftp://invisible-island.net/ncurses/ncurses-%{V_base}.tar.gz
  46. Patch1: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch1}-patch.sh.bz2
  47. Patch2: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch2}.patch.gz
  48. Patch100: ncurses.patch
  49. # build information
  50. Prefix: %{l_prefix}
  51. BuildRoot: %{l_buildroot}
  52. BuildPreReq: OpenPKG, openpkg >= 20040130, sharutils
  53. PreReq: OpenPKG, openpkg >= 20040130
  54. AutoReq: no
  55. AutoReqProv: no
  56. %description
  57. NCurses is the GNU re-implementation of the popular SVR4 Curses
  58. terminal screen handling library. Its API is base-level conformant
  59. with the X/OPEN curses specification XSI Curses. It uses the
  60. Terminfo database format, supports pads and color and multiple
  61. highlights and forms characters and function-key mapping, and has
  62. all the other SVR4-Curses enhancements over original BSD Curses.
  63. Additionally, it provides full emulations of the SVR4 panels
  64. (supporting a stack of windows), forms (supporting data collection
  65. through on-screen forms) and menu (supporting a uniform interface
  66. for menu programming) companion libraries.
  67. %track
  68. prog ncurses = {
  69. version = %{V_base}
  70. url = ftp://invisible-island.net/ncurses/
  71. regex = ncurses-(__VER__)\.tar\.gz
  72. }
  73. prog ncurses:patchbase = {
  74. version = %{V_patchB}
  75. url = ftp://invisible-island.net/ncurses/
  76. regex = (\d+\.\d+)
  77. url = ftp://invisible-island.net/ncurses/__NEWVER__/
  78. regex = ncurses-__NEWVER__-(\d+)-patch\.sh\.bz2
  79. }
  80. prog ncurses:patchset = {
  81. version = %{V_patchL}
  82. url = ftp://invisible-island.net/ncurses/
  83. regex = (\d+\.\d+)
  84. url = ftp://invisible-island.net/ncurses/__NEWVER__/
  85. regex = ncurses-__NEWVER__-(\d+)\.patch\.gz
  86. }
  87. %prep
  88. %setup -q -n ncurses-%{V_base}
  89. for patchfile in \
  90. %{expand:%(i=1; while [ $i -le %{V_patches} ]; do %{l_shtool} echo -n " %%{PATCH$i}"; i=`expr $i + 1`; done)}
  91. do
  92. case "$patchfile" in
  93. *bz2 ) %{l_bzip2} -d -c $patchfile | %{l_patch} -p1 || true ;;
  94. *gz ) %{l_gzip} -d -c $patchfile | %{l_patch} -p1 || true ;;
  95. * )
  96. echo "Unknown patch format" | %{l_rpmtool} msg -b -t error 1>&2
  97. exit 1
  98. ;;
  99. esac
  100. done
  101. %patch -p0 -P 100
  102. %build
  103. CC="%{l_cc}" \
  104. CFLAGS="%{l_cflags}" \
  105. ./configure \
  106. --prefix=%{l_prefix} \
  107. --includedir=%{l_prefix}/include/ncurses \
  108. --datadir=%{l_prefix}/share/ncurses \
  109. --enable-hashmap \
  110. --enable-safe-sprintf \
  111. --without-debug \
  112. --with-manpage-format=normal \
  113. --disable-getcap-cache \
  114. --without-cxx-binding \
  115. --without-cxx \
  116. --without-gpm \
  117. --enable-termcap \
  118. --disable-overwrite
  119. %{l_make} %{l_mflags}
  120. %install
  121. rm -rf $RPM_BUILD_ROOT
  122. %{l_shtool} subst -e "s;ln -s;ln;g" man/edit_man.sh
  123. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  124. ( cd $RPM_BUILD_ROOT%{l_prefix}/man
  125. for dir in man1 man3; do
  126. cd $dir
  127. for file in *.[13][a-z]*; do
  128. if [ ".$file" = ".*.[13][a-z]*" ]; then
  129. break
  130. fi
  131. eval `echo "$file" | sed -e 's;^\(.*\.[13]\)[a-z]*$;base=\1;'`
  132. mv $file ncurses_$base
  133. done
  134. cd ..
  135. done
  136. ) || exit $?
  137. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
  138. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  139. %files -f files
  140. %clean
  141. rm -rf $RPM_BUILD_ROOT