ncc.spec 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. ##
  2. ## ncc.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 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. # package information
  26. Name: ncc
  27. Summary: C Code Program Analysis
  28. URL: http://students.ceid.upatras.gr/~sxanth/ncc/
  29. Vendor: Stelios Xanthakis
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: EVAL
  33. Group: Language
  34. License: GPL
  35. Version: 2.0
  36. Release: 20041126
  37. # list of sources
  38. Source0: http://students.ceid.upatras.gr/~sxanth/ncc/ncc-%{version}.tar.gz
  39. Patch0: ncc.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20040130, X11, gcc, ncurses, make
  44. PreReq: OpenPKG, openpkg >= 20040130, X11, gcc, ncurses
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. NCC provides program analysis data of C source code, i.e., program
  49. flow and usage of variables. It works in combination with GCC and
  50. provides a textual program flow browser.
  51. %track
  52. prog ncc = {
  53. version = %{version}
  54. url = http://students.ceid.upatras.gr/~sxanth/ncc/
  55. regex = ncc-(__VER__)\.tar\.gz
  56. }
  57. %prep
  58. %setup -q
  59. %patch -p0
  60. rm -f ncc
  61. touch *
  62. %{l_shtool} subst \
  63. -e 's;/usr/include/nognu;%{l_prefix}/share/ncc/nognu;' \
  64. config.h
  65. %build
  66. x11_incdir=`%{l_rc} --query x11_incdir`
  67. x11_libdir=`%{l_rc} --query x11_libdir`
  68. %{l_make} %{l_mflags} \
  69. CC="%{l_cxx} -I$x11_incdir -L$x11_libdir" \
  70. LCFLAGS="%{l_cxxflags -O}"
  71. %install
  72. rm -rf $RPM_BUILD_ROOT
  73. %{l_shtool} mkdir -f -p -m 755 \
  74. $RPM_BUILD_ROOT%{l_prefix}/bin \
  75. $RPM_BUILD_ROOT%{l_prefix}/share/ncc
  76. %{l_shtool} install -c -s -m 755 \
  77. objdir/ncc $RPM_BUILD_ROOT%{l_prefix}/bin/
  78. %{l_shtool} install -c -s -m 755 \
  79. nccnav/nccnav $RPM_BUILD_ROOT%{l_prefix}/bin/
  80. %{l_shtool} install -c -m 644 \
  81. doc/nognu $RPM_BUILD_ROOT%{l_prefix}/share/ncc/
  82. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  83. %files -f files
  84. %clean
  85. rm -rf $RPM_BUILD_ROOT