ncurses.spec 7.1 KB

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