ncurses.spec 5.7 KB

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