ctalk.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. ##
  2. ## ctalk.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. # package versions
  25. %define V_ctalk 0.0.16a
  26. %define V_ctpp 1.0.21a
  27. # package information
  28. Name: ctalk
  29. Summary: Object-Orientation Extensions for ISO-C
  30. URL: http://ctalk-lang.sourceforge.net/
  31. Vendor: Robert Kiesling
  32. Packager: OpenPKG Foundation e.V.
  33. Distribution: OpenPKG Community
  34. Class: EVAL
  35. Group: Language
  36. License: GPL
  37. Version: %{V_ctalk}
  38. Release: 20071103
  39. # list of sources
  40. Source0: http://switch.dl.sourceforge.net/ctalk-lang/ctalk-%{V_ctalk}.tar.gz
  41. Source1: http://switch.dl.sourceforge.net/ctalk-lang/ctpp-%{V_ctpp}.tar.gz
  42. Patch0: ctalk.patch
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20060823
  47. PreReq: OpenPKG, openpkg >= 20060823
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. Ctalk adds object oriented programming features, including an object
  52. class hierarchy, methods, and operator overloading, to ANSI and ISO
  53. C source code. It also contains the C99 compliant C preprocessor
  54. ctpp(1) which can be used stand-alone, too.
  55. %track
  56. prog ctalk = {
  57. version = %{V_ctalk}
  58. url = http://prdownloads.sourceforge.net/ctalk-lang/
  59. regex = ctalk-(__VER__)\.tar\.gz
  60. }
  61. prog ctalk:ctpp = {
  62. version = %{V_ctpp}
  63. url = http://prdownloads.sourceforge.net/ctalk-lang/
  64. regex = ctpp-(__VER__)\.tar\.gz
  65. }
  66. %prep
  67. %setup -q -c
  68. %setup -q -T -D -a 1
  69. %patch -p0
  70. %build
  71. ( cd ctalk-*
  72. CC="%{l_cc}" \
  73. CFLAGS="%{l_cflags -O}" \
  74. ./configure \
  75. --prefix=%{l_prefix} \
  76. --mandir=%{l_prefix}/man \
  77. --infodir=%{l_prefix}/info \
  78. --disable-shared
  79. %{l_make} %{l_mflags -O}
  80. ) || exit $?
  81. ( cd ctpp-*
  82. CC="%{l_cc}" \
  83. CFLAGS="%{l_cflags -O}" \
  84. ./configure \
  85. --prefix=%{l_prefix} \
  86. --mandir=%{l_prefix}/man \
  87. --infodir=%{l_prefix}/info \
  88. --disable-shared
  89. %{l_make} %{l_mflags -O}
  90. ) || exit $?
  91. %install
  92. rm -rf $RPM_BUILD_ROOT
  93. ( cd ctalk-*
  94. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  95. ) || exit $?
  96. ( cd ctpp-*
  97. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  98. ) || exit $?
  99. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  100. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  101. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  102. %files -f files
  103. %clean
  104. rm -rf $RPM_BUILD_ROOT