perl-curses.spec 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. ##
  2. ## perl-curses.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 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. # versions of individual parts
  26. %define V_curses 1.06
  27. %define V_curses_ui 0.73
  28. %define V_curses_ui_dtv 0.10
  29. %define V_curses_widgets 1.997
  30. %define V_curses_forms 1.997
  31. %define V_cdk_perl 20020728
  32. # package information
  33. Name: perl-curses
  34. Summary: Perl Modules for use with Curses
  35. URL: http://www.cpan.org/
  36. Vendor: Perl Community
  37. Packager: The OpenPKG Project
  38. Distribution: OpenPKG [BASE]
  39. Group: Language
  40. License: GPL/Artistic
  41. Version: 20030329
  42. Release: 20030329
  43. # list of sources
  44. Source0: http://www.cpan.org/modules/by-module/Curses/Curses-%{V_curses}.tar.gz
  45. Source1: http://www.cpan.org/modules/by-module/Curses/Curses-UI-%{V_curses_ui}.tar.gz
  46. Source2: http://www.cpan.org/modules/by-module/Curses/Curses-UI-DelimitedTextViewer-%{V_curses_ui_dtv}.tar.gz
  47. Source3: http://www.cpan.org/modules/by-module/Curses/CursesWidgets-%{V_curses_widgets}.tar.gz
  48. Source4: http://www.cpan.org/modules/by-module/Curses/CursesForms-%{V_curses_forms}.tar.gz
  49. Source5: ftp://invisible-island.net/cdk/cdk-perl-%{V_cdk_perl}.tgz
  50. Patch0: perl-curses.patch
  51. # build information
  52. Prefix: %{l_prefix}
  53. BuildRoot: %{l_buildroot}
  54. BuildPreReq: OpenPKG, openpkg >= 20020206, perl, perl-openpkg, ncurses, cdk, perl-term
  55. PreReq: OpenPKG, openpkg >= 20020206, perl, perl-openpkg, ncurses, cdk, perl-term
  56. AutoReq: no
  57. AutoReqProv: no
  58. %description
  59. Various modules for using the Curses library from within the Perl
  60. language plus additional widgets:
  61. - Curses (%{V_curses})
  62. - Curses::UI (%{V_curses_ui})
  63. - Curses::UI::DelimitedTextViewer (%{V_curses_ui_dtv})
  64. - Curses::Widgets (%{V_curses_widgets})
  65. - Curses::Forms (%{V_curses_forms})
  66. - Cdk (%{V_cdk_perl})
  67. %prep
  68. %setup0 -q -c
  69. %setup1 -q -T -D -a 1
  70. %setup2 -q -T -D -a 2
  71. %setup3 -q -T -D -a 3
  72. %setup4 -q -T -D -a 4
  73. %setup5 -q -T -D -a 5
  74. (cd Curses-UI-%{V_curses_ui} && %{l_patch} -p0 <%{SOURCE perl-curses.patch})
  75. %build
  76. %install
  77. # perform common prolog operations
  78. %{l_prefix}/bin/perl-openpkg prolog
  79. # build Curses
  80. ( cd Curses-%{V_curses}
  81. hint="unknown"
  82. case "%{l_target}" in
  83. *-freebsd* ) hint="freebsd.ncurses" ;;
  84. *-linux* ) hint="linux.ncurses" ;;
  85. *-solaris* ) hint="solaris" ;;
  86. esac
  87. if [ -f hints/c-$hint.h ]; then
  88. cp hints/c-$hint.h c-config.h
  89. fi
  90. %{l_shtool} subst \
  91. -e 's:my $inc;:my $inc = "-I%{l_prefix}/include -I%{l_prefix}/include/ncurses";:' \
  92. -e 's:my $libs;:my $libs = "-L%{l_prefix}/lib -lpanel -lmenu -lform -lncurses";:' \
  93. Makefile.PL
  94. %{l_prefix}/bin/perl-openpkg install PANELS MENUS FORMS
  95. )
  96. # build Curses::UI
  97. %{l_prefix}/bin/perl-openpkg install -d Curses-UI-%{V_curses_ui}
  98. # build Curses::UI
  99. %{l_prefix}/bin/perl-openpkg install -d Curses-UI-DelimitedTextViewer-%{V_curses_ui_dtv}
  100. # build Curses::Widgets
  101. %{l_prefix}/bin/perl-openpkg install -d CursesWidgets-%{V_curses_widgets}
  102. # build Curses::Forms
  103. %{l_prefix}/bin/perl-openpkg install -d CursesForms-%{V_curses_forms}
  104. # build Cdk
  105. ( cd cdk-perl-%{V_cdk_perl}
  106. %{l_shtool} subst \
  107. -e 's;-L/usr/local/lib;-L%{l_prefix}/lib;' \
  108. -e 's;-I/usr/include/ncurses;-I%{l_prefix}/include/ncurses;' \
  109. -e 's;-I/usr/local/include/cdk;-I%{l_prefix}/include/cdk;' \
  110. Makefile.PL
  111. %{l_prefix}/bin/perl-openpkg install
  112. )
  113. # perform common epilog operations
  114. %{l_prefix}/bin/perl-openpkg epilog
  115. %files -f files
  116. %clean
  117. rm -rf $RPM_BUILD_ROOT