ncurses.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. ##
  2. ## ncurses.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.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. %define V_base 5.2
  26. %define V_patch0 20020727
  27. %define V_patch1 20020803
  28. %define V_patch2 20020810
  29. %define V_patch3 20020817
  30. %define V_patch4 20020824
  31. %define V_patchL %{V_patch4}
  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 [BASE]
  39. Group: Terminal
  40. License: GPL
  41. Version: %{V_base}.%{V_patchL}
  42. Release: 20020825
  43. # list of sources
  44. Source0: ftp://dickey.his.com/ncurses/ncurses-%{V_base}.tar.gz
  45. Patch0: ftp://dickey.his.com/ncurses/%{V_base}/patch-%{V_base}-%{V_patch0}.sh.gz
  46. Patch1: ftp://dickey.his.com/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch1}.patch.gz
  47. Patch2: ftp://dickey.his.com/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch2}.patch.gz
  48. Patch3: ftp://dickey.his.com/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch3}.patch.gz
  49. Patch4: ftp://dickey.his.com/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch4}.patch.gz
  50. # build information
  51. Prefix: %{l_prefix}
  52. BuildRoot: %{l_buildroot}
  53. BuildPreReq: OpenPKG, openpkg >= 20020206
  54. PreReq: OpenPKG, openpkg >= 20020206
  55. AutoReq: no
  56. AutoReqProv: no
  57. %description
  58. NCurses is the GNU re-implementation of the popular Curses
  59. terminal screen handling library.
  60. %prep
  61. %setup -q -n ncurses-%{V_base}
  62. ( %{l_gzip} -d -c %{PATCH0} >patchbase.sh
  63. %{l_shtool} subst \
  64. -e 's;gzip -dc;%{l_gzip} -dc;' \
  65. -e 's;patch -p1;%{l_patch} -p1;' \
  66. patchbase.sh
  67. sh patchbase.sh
  68. )
  69. for patch in %{PATCH1} %{PATCH2} %{PATCH3} %{PATCH4}; do
  70. %{l_gzip} -d -c $patch | %{l_patch} -p1 || true
  71. done
  72. %build
  73. CC="%{l_cc}" \
  74. CFLAGS="%{l_cflags}" \
  75. ./configure \
  76. --prefix=%{l_prefix} \
  77. --includedir=%{l_prefix}/include/ncurses \
  78. --datadir=%{l_prefix}/share/ncurses \
  79. --enable-hashmap \
  80. --enable-safe-sprintf \
  81. --without-debug \
  82. --with-manpage-format=normal \
  83. --disable-getcap-cache \
  84. --without-cxx-binding \
  85. --without-cxx \
  86. --enable-termcap \
  87. --disable-overwrite
  88. %{l_make} %{l_mflags}
  89. %install
  90. rm -rf $RPM_BUILD_ROOT
  91. %{l_shtool} subst -e "s;ln -s;ln;g" man/edit_man.sh
  92. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  93. (
  94. cd $RPM_BUILD_ROOT%{l_prefix}/man
  95. for dir in man1 man3; do
  96. cd $dir
  97. for file in *.[13][a-z]*; do
  98. if [ ".$file" = ".*.[13][a-z]*" ]; then
  99. break
  100. fi
  101. eval `echo "$file" | sed -e 's;^\(.*\.[13]\)[a-z]*$;base=\1;'`
  102. mv $file ncurses_$base
  103. done
  104. cd ..
  105. done
  106. )
  107. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2> /dev/null || true
  108. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  109. %files -f files
  110. %clean
  111. rm -rf $RPM_BUILD_ROOT