perl-curses.spec 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. ##
  2. ## perl-curses.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://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. # versions of individual parts
  25. %define V_perl 5.10.0
  26. %define V_curses 1.20
  27. %define V_curses_ui 0.95
  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 20031210
  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: OpenPKG Foundation e.V.
  38. Distribution: OpenPKG Community
  39. Class: BASE
  40. Group: Perl
  41. License: GPL/Artistic
  42. Version: %{V_perl}
  43. Release: 20071219
  44. # list of sources
  45. Source0: http://www.cpan.org/modules/by-module/Curses/Curses-%{V_curses}.tgz
  46. Source1: http://www.cpan.org/modules/by-module/Curses/Curses-UI-%{V_curses_ui}.tar.gz
  47. Source2: http://www.cpan.org/modules/by-module/Curses/Curses-UI-DelimitedTextViewer-%{V_curses_ui_dtv}.tar.gz
  48. Source3: http://www.cpan.org/modules/by-module/Curses/CursesWidgets-%{V_curses_widgets}.tar.gz
  49. Source4: http://www.cpan.org/modules/by-module/Curses/CursesForms-%{V_curses_forms}.tar.gz
  50. Source5: ftp://invisible-island.net/cdk/cdk-perl-%{V_cdk_perl}.tgz
  51. # build information
  52. Prefix: %{l_prefix}
  53. BuildRoot: %{l_buildroot}
  54. BuildPreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126
  55. PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}
  56. BuildPreReq: ncurses, cdk >= 4.9.11.20031210, perl-term
  57. PreReq: ncurses, cdk >= 4.9.11.20031210, perl-term
  58. AutoReq: no
  59. AutoReqProv: no
  60. %description
  61. Various modules for using the Curses library from within the Perl
  62. language plus additional widgets:
  63. - Curses (%{V_curses})
  64. - Curses::UI (%{V_curses_ui})
  65. - Curses::UI::DelimitedTextViewer (%{V_curses_ui_dtv})
  66. - Curses::Widgets (%{V_curses_widgets})
  67. - Curses::Forms (%{V_curses_forms})
  68. - Cdk (%{V_cdk_perl})
  69. %track
  70. prog perl-curses:cdk-perl = {
  71. version = %{V_cdk_perl}
  72. url = ftp://invisible-island.net/cdk/
  73. regex = cdk-perl-(__VER__)\.tgz
  74. }
  75. prog perl-curses:Curses = {
  76. version = %{V_curses}
  77. url = http://www.cpan.org/modules/by-module/Curses/
  78. regex = Curses-(__VER__)\.tgz
  79. }
  80. prog perl-curses:Curses-UI = {
  81. version = %{V_curses_ui}
  82. url = http://www.cpan.org/modules/by-module/Curses/
  83. regex = Curses-UI-(__VER__)\.tar\.gz
  84. }
  85. prog perl-curses:Curses-UI-DelimitedTextViewer = {
  86. version = %{V_curses_ui_dtv}
  87. url = http://www.cpan.org/modules/by-module/Curses/
  88. regex = Curses-UI-DelimitedTextViewer-(__VER__)\.tar\.gz
  89. }
  90. prog perl-curses:CursesForms = {
  91. version = %{V_curses_forms}
  92. url = http://www.cpan.org/modules/by-module/Curses/
  93. regex = CursesForms-(__VER__)\.tar\.gz
  94. }
  95. prog perl-curses:CursesWidgets = {
  96. version = %{V_curses_widgets}
  97. url = http://www.cpan.org/modules/by-module/Curses/
  98. regex = CursesWidgets-(__VER__)\.tar\.gz
  99. }
  100. %prep
  101. %setup -q -c
  102. %setup -q -T -D -a 1
  103. %setup -q -T -D -a 2
  104. %setup -q -T -D -a 3
  105. %setup -q -T -D -a 4
  106. %setup -q -T -D -a 5
  107. %build
  108. %install
  109. rm -rf $RPM_BUILD_ROOT
  110. %{l_prefix}/bin/perl-openpkg prepare
  111. # build Curses
  112. ( cd Curses-%{V_curses}
  113. hint="unknown"
  114. case "%{l_platform -t}" in
  115. *-freebsd* ) hint="freebsd.ncurses" ;;
  116. *-linux* ) hint="linux.ncurses" ;;
  117. *-sunos* ) hint="solaris" ;;
  118. esac
  119. if [ -f hints/c-$hint.h ]; then
  120. cp hints/c-$hint.h c-config.h
  121. fi
  122. ) || exit $?
  123. CURSES_CFLAGS="%{l_cppflags ncurses}" \
  124. CURSES_LDFLAGS="%{l_ldflags} -lncurses" \
  125. CURSES_PANEL_CFLAGS="%{l_cppflags ncurses}" \
  126. CURSES_PANEL_LDFLAGS="%{l_ldflags} -lncurses" \
  127. CURSES_MENU_CFLAGS="%{l_cppflags ncurses}" \
  128. CURSES_MENU_LDFLAGS="%{l_ldflags} -lncurses" \
  129. CURSES_FORM_CFLAGS="%{l_cppflags ncurses}" \
  130. CURSES_FORM_LDFLAGS="%{l_ldflags} -lncurses" \
  131. %{l_prefix}/bin/perl-openpkg -d Curses-%{V_curses} \
  132. --args "PANELS MENUS FORMS" \
  133. configure build install
  134. %{l_prefix}/bin/perl-openpkg -d Curses-UI-%{V_curses_ui} \
  135. configure build install
  136. %{l_prefix}/bin/perl-openpkg -d Curses-UI-DelimitedTextViewer-%{V_curses_ui_dtv} \
  137. configure build install
  138. %{l_prefix}/bin/perl-openpkg -d CursesWidgets-%{V_curses_widgets} \
  139. configure build install
  140. %{l_prefix}/bin/perl-openpkg -d CursesForms-%{V_curses_forms} \
  141. configure build install
  142. # build Cdk
  143. ( cd cdk-perl-%{V_cdk_perl}
  144. %{l_shtool} subst \
  145. -e 's;-L/usr/local/lib;%{l_ldflags};' \
  146. -e 's;-I/usr/include/ncurses;%{l_cppflags ncurses};' \
  147. -e 's;-I/usr/local/include/cdk;%{l_cppflags cdk};' \
  148. Makefile.PL
  149. ) || exit $?
  150. %{l_prefix}/bin/perl-openpkg -d cdk-perl-%{V_cdk_perl} configure build install
  151. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  152. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  153. %files -f files
  154. %clean
  155. rm -rf $RPM_BUILD_ROOT