vala.spec 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. ##
  2. ## vala.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 version
  24. %define V_major 0.3
  25. %define V_minor 2
  26. # package information
  27. Name: vala
  28. Summary: C#-Style High-Level Language for C/GObject
  29. URL: http://www.vala-project.org/
  30. Vendor: Joerg Billeter, Raffaele Sandrini
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: Language
  35. License: LGPL
  36. Version: %{V_major}.%{V_minor}
  37. Release: 20080513
  38. # list of sources
  39. Source0: ftp://ftp.gnome.org/pub/GNOME/sources/vala/%{V_major}/vala-%{version}.tar.bz2
  40. Patch0: vala.patch
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, flex, bison
  45. PreReq: OpenPKG, openpkg >= 20060823
  46. BuildPreReq: glib2
  47. PreReq: glib2
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. Vala is a programming language that aims to bring modern programming
  52. language features to C developers without imposing any additional
  53. runtime requirements and without using a different ABI compared to
  54. applications and libraries written in C. The Vala compiler is a
  55. self-hosting compiler that translates Vala source code into C source
  56. and header files. It uses GLib's GObject type system to create
  57. classes and interfaces declared in the Vala source code. The syntax
  58. of Vala is similar to C#, modified to better fit the GObject type
  59. system. Vala supports modern language features as the following:
  60. interfaces, properties, signals, foreach, lambda expressions, type
  61. inference for local variables, generics, non-null types, assisted
  62. memory management and exception handling.
  63. Vala is designed to allow access to existing C libraries, especially
  64. GObject-based libraries, without the need for runtime bindings.
  65. Each to be used library requires a Vala API file at compile-time,
  66. containing the class and method declarations in Vala syntax. Using
  67. classes and methods written in Vala from an application written in C
  68. is not difficult. The Vala library only has to install the generated
  69. header files and C applications may then access the GObject-based
  70. API of the Vala library as usual.
  71. %track
  72. prog vala = {
  73. version = %{version}
  74. url = http://live.gnome.org/Vala/Release
  75. regex = vala-(__VER__)\.tar\.bz2
  76. }
  77. %prep
  78. %setup -q
  79. %patch -p0
  80. %build
  81. CC="%{l_cc}" \
  82. CFLAGS="%{l_cflags -O}" \
  83. CPPFLAGS="%{l_cppflags}" \
  84. LDFLAGS="%{l_ldflags}" \
  85. ./configure \
  86. --prefix=%{l_prefix} \
  87. --mandir=%{l_prefix}/man \
  88. --disable-shared
  89. %{l_make} %{l_mflags -O}
  90. %install
  91. rm -rf $RPM_BUILD_ROOT
  92. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  93. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/devhelp
  94. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  95. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  96. %files -f files
  97. %clean
  98. rm -rf $RPM_BUILD_ROOT