perl-curses.spec 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. ##
  2. ## perl-curses.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.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.85
  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: 20031016
  42. Release: 20031016
  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 >= 20030909, perl, perl-openpkg, ncurses, cdk, perl-term
  55. PreReq: OpenPKG, openpkg >= 20030909, 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} &&\
  75. %{l_patch} -p0 <%{PATCH perl-curses.patch}
  76. ) || exit $?
  77. %build
  78. %install
  79. # perform common prolog operations
  80. %{l_prefix}/bin/perl-openpkg prolog
  81. # build Curses
  82. ( cd Curses-%{V_curses}
  83. hint="unknown"
  84. case "%{l_platform -t}" in
  85. *-freebsd* ) hint="freebsd.ncurses" ;;
  86. *-linux* ) hint="linux.ncurses" ;;
  87. *-sunos* ) hint="solaris" ;;
  88. esac
  89. if [ -f hints/c-$hint.h ]; then
  90. cp hints/c-$hint.h c-config.h
  91. fi
  92. %{l_shtool} subst \
  93. -e 's:my $inc;:my $inc = "%{l_cppflags ncurses}";:' \
  94. -e 's:my $libs;:my $libs = "%{l_ldflags} -lpanel -lmenu -lform -lncurses";:' \
  95. Makefile.PL
  96. %{l_prefix}/bin/perl-openpkg install PANELS MENUS FORMS
  97. ) || exit $?
  98. # build Curses::UI
  99. %{l_prefix}/bin/perl-openpkg install -d Curses-UI-%{V_curses_ui}
  100. # build Curses::UI
  101. %{l_prefix}/bin/perl-openpkg install -d Curses-UI-DelimitedTextViewer-%{V_curses_ui_dtv}
  102. # build Curses::Widgets
  103. %{l_prefix}/bin/perl-openpkg install -d CursesWidgets-%{V_curses_widgets}
  104. # build Curses::Forms
  105. %{l_prefix}/bin/perl-openpkg install -d CursesForms-%{V_curses_forms}
  106. # build Cdk
  107. ( cd cdk-perl-%{V_cdk_perl}
  108. %{l_shtool} subst \
  109. -e 's;-L/usr/local/lib;%{l_ldflags};' \
  110. -e 's;-I/usr/include/ncurses;%{l_cppflags ncurses};' \
  111. -e 's;-I/usr/local/include/cdk;%{l_cppflags cdk};' \
  112. Makefile.PL
  113. %{l_prefix}/bin/perl-openpkg install
  114. ) || exit $?
  115. # perform common epilog operations
  116. %{l_prefix}/bin/perl-openpkg epilog
  117. %files -f files
  118. %clean
  119. rm -rf $RPM_BUILD_ROOT