ncurses.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. ##
  2. ## ncurses.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@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. %define V_base 5.2
  25. %define V_patch0 20010908
  26. %define V_patch1 20010915
  27. # package information
  28. Name: ncurses
  29. Summary: Terminal Capability and Display Library
  30. URL: http://www.gnu.org/software/ncurses/
  31. Vendor: Free Software Foundation
  32. Packager: The OpenPKG Project
  33. Distribution: OpenPKG [EXP]
  34. Group: Terminal
  35. License: GPL
  36. Version: %{V_base}
  37. Release: 5
  38. # list of sources
  39. Source0: ftp://dickey.his.com/ncurses/ncurses-%{V_base}.tar.gz
  40. Patch0: ftp://dickey.his.com/ncurses/%{V_base}/patch-%{V_base}-%{V_patch0}.sh
  41. Patch1: ftp://dickey.his.com/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch1}.patch.gz
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 0.9-33, patch
  46. PreReq: OpenPKG, openpkg >= 0.9-33
  47. AutoReq: no
  48. AutoReqProv: no
  49. %description
  50. NCurses is the GNU re-implementation of the popular Curses
  51. terminal screen handling library.
  52. %prep
  53. %setup -q
  54. ( PATH="%{l_prefix}/bin:$PATH"; export PATH; sh %{PATCH0} )
  55. for patch in %{PATCH1}; do
  56. %{l_gzip} -d -c $patch | %{l_patch} -p1
  57. done
  58. %build
  59. CC="%{l_cc}" \
  60. CFLAGS="%{l_cflags -O}" \
  61. ./configure \
  62. --prefix=%{l_prefix} \
  63. --includedir=%{l_prefix}/include/ncurses \
  64. --datadir=%{l_prefix}/share/ncurses \
  65. --enable-hashmap \
  66. --enable-safe-sprintf \
  67. --without-debug \
  68. --with-manpage-format=normal \
  69. --disable-getcap-cache \
  70. --without-cxx-binding \
  71. --without-cxx \
  72. --enable-termcap \
  73. --disable-overwrite
  74. %{l_make} %{l_mflags}
  75. %install
  76. rm -rf $RPM_BUILD_ROOT
  77. %{l_rpmtool} subst "s;ln -s;ln;g" -- man/edit_man.sh
  78. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  79. (
  80. cd $RPM_BUILD_ROOT%{l_prefix}/man
  81. for dir in man1 man3; do
  82. cd $dir
  83. for file in *.[13][a-z]*; do
  84. if [ ".$file" = ".*.[13][a-z]*" ]; then
  85. break
  86. fi
  87. eval `echo "$file" | sed -e 's;^\(.*\.[13]\)[a-z]*$;base=\1;'`
  88. mv $file ncurses_$base
  89. done
  90. cd ..
  91. done
  92. )
  93. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2> /dev/null || true
  94. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  95. %files -f files
  96. %clean
  97. rm -rf $RPM_BUILD_ROOT