ncurses.spec 6.1 KB

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