ncurses.spec 4.3 KB

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