ctalk.spec 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. ##
  2. ## ctalk.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package versions
  24. %define V_ctalk 0.0.79a
  25. %define V_ctpp 1.0.44
  26. # package information
  27. Name: ctalk
  28. Summary: Object-Orientation Extensions for ISO-C
  29. URL: http://www.ctalklang.org/
  30. Vendor: Robert Kiesling
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: Language
  35. License: GPL
  36. Version: %{V_ctalk}
  37. Release: 20081015
  38. # list of sources
  39. Source0: http://www.ctalklang.org/files/ctalk-%{V_ctalk}.tar.gz
  40. Source1: http://www.ctalklang.org/files/ctpp-%{V_ctpp}.tar.gz
  41. Patch0: ctalk.patch
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20060823
  46. PreReq: OpenPKG, openpkg >= 20060823
  47. AutoReq: no
  48. AutoReqProv: no
  49. %description
  50. Ctalk adds object oriented programming features, including an object
  51. class hierarchy, methods, and operator overloading, to ANSI and ISO
  52. C source code. It also contains the C99 compliant C preprocessor
  53. ctpp(1) which can be used stand-alone, too.
  54. %track
  55. prog ctalk = {
  56. version = %{V_ctalk}
  57. url = http://www.ctalklang.org/files/index.shtml
  58. regex = ctalk-(__VER__)\.tar\.gz
  59. }
  60. prog ctalk:ctpp = {
  61. version = %{V_ctpp}
  62. url = http://www.ctalklang.org/files/index.shtml
  63. regex = ctpp-(__VER__)\.tar\.gz
  64. }
  65. %prep
  66. %setup -q -c
  67. %setup -q -T -D -a 1
  68. %patch -p0
  69. for dir in ctpp-* ctalk-*; do
  70. ( echo "#!/bin/sh"
  71. echo "%{l_shtool} install \${1+\"\$@\"}"
  72. ) >$dir/install-sh
  73. chmod a+x $dir/install-sh
  74. done
  75. %build
  76. ( cd ctalk-*
  77. CC="%{l_cc}" \
  78. CFLAGS="%{l_cflags -O}" \
  79. ./configure \
  80. --prefix=%{l_prefix} \
  81. --mandir=%{l_prefix}/man \
  82. --infodir=%{l_prefix}/info \
  83. --disable-shared
  84. %{l_make} %{l_mflags}
  85. ) || exit $?
  86. ( cd ctpp-*
  87. CC="%{l_cc}" \
  88. CFLAGS="%{l_cflags -O}" \
  89. ./configure \
  90. --prefix=%{l_prefix} \
  91. --mandir=%{l_prefix}/man \
  92. --infodir=%{l_prefix}/info \
  93. --disable-shared
  94. %{l_make} %{l_mflags}
  95. ) || exit $?
  96. %install
  97. rm -rf $RPM_BUILD_ROOT
  98. ( cd ctalk-*
  99. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  100. ) || exit $?
  101. ( cd ctpp-*
  102. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  103. ) || exit $?
  104. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  105. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  106. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  107. %files -f files
  108. %clean
  109. rm -rf $RPM_BUILD_ROOT