mono.spec 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. ##
  2. ## mono.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 version
  25. %define V_major 1.2
  26. %define V_minor 6
  27. # package information
  28. Name: mono
  29. Summary: Unix .NET Development Framework
  30. URL: http://go-mono.com/
  31. Vendor: The Mono Project
  32. Packager: OpenPKG Foundation e.V.
  33. Distribution: OpenPKG Community
  34. Class: EVAL
  35. Group: Language
  36. License: GPL
  37. Version: %{V_major}.%{V_minor}
  38. Release: 20071213
  39. # list of sources
  40. Source0: http://go-mono.com/sources/mono/mono-%{version}.tar.bz2
  41. Patch0: mono.patch
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20040130, pkgconfig, perl, bison, make, gcc
  46. PreReq: OpenPKG, openpkg >= 20040130
  47. BuildPreReq: glib2, glib2::with_threads = yes
  48. PreReq: glib2, glib2::with_threads = yes
  49. AutoReq: no
  50. AutoReqProv: no
  51. Conflicts: pnet
  52. %description
  53. The Mono project is an open source effort to create a free Unix
  54. implementation of the .NET Development Framework. This is the base
  55. package providing a Common Language Runtime (CLR) for the Common
  56. Language Infrastructure (CLI), a C# Compiler and a set of class
  57. libraries. The runtime can be embedded into your application. It
  58. implements both ADO.NET and ASP.NET.
  59. %track
  60. prog mono = {
  61. version = %{version}
  62. url = http://go-mono.com/sources-stable/
  63. regex = mono-(\d+\.\d+(\.\d+)*)\.tar\.bz2
  64. }
  65. %prep
  66. %setup -q
  67. %patch -p0
  68. %build
  69. # trick configure to not use truncl(3)
  70. # because this is not available everywhere,
  71. # although sometimes defined in <math.h>
  72. ( echo "ac_cv_header_aio_h=no"
  73. echo "ac_cv_func_trunc=no"
  74. echo "ac_cv_trunc=no"
  75. echo "ac_cv_lib_sunmath_aintl=no"
  76. ) >config.cache
  77. %{l_shtool} subst \
  78. -e 's/trunc;/notexisting;/' \
  79. configure
  80. # workaround Linux-specifics
  81. %{l_shtool} subst \
  82. -e 's;#!/bin/bash;#!%{l_bash};g' \
  83. mono/arch/arm/dpiops.sh \
  84. mono/arch/arm/fpaops.sh \
  85. mono/arch/arm/vfpops.sh \
  86. scripts/mono-find-provides \
  87. scripts/mono-find-requires \
  88. web/mono-build-w32.sh \
  89. mcs/class/Managed.Windows.Forms/build-csproj \
  90. mcs/class/Managed.Windows.Forms/build-csproj2k5 \
  91. mcs/class/Mono.Cairo/Samples/gtk/compile.sh \
  92. mcs/class/Mono.Cairo/Samples/png/compile.sh \
  93. mcs/class/Mono.Cairo/Samples/win32/compile.sh \
  94. mcs/class/Mono.Cairo/Samples/x11/compile.sh \
  95. mcs/tools/tinderbox/tinderbox.sh
  96. # configure program
  97. CC="%{l_cc}" \
  98. CFLAGS="%{l_cflags -O}" \
  99. CPPFLAGS="%{l_cppflags}" \
  100. LDFLAGS="%{l_ldflags}" \
  101. ./configure \
  102. --cache-file=./config.cache \
  103. --prefix=%{l_prefix} \
  104. --mandir=%{l_prefix}/man \
  105. --bindir=%{l_prefix}/libexec/mono \
  106. --with-gc=included \
  107. --with-jit=yes \
  108. --disable-shared
  109. # build program
  110. %{l_make} %{l_mflags}
  111. %install
  112. # use a working install to create subdirs
  113. %{l_shtool} subst \
  114. -e 's;\$(mkdir_p);%{l_shtool} mkdir -p;' \
  115. Makefile */Makefile */*/Makefile
  116. # install program
  117. rm -rf $RPM_BUILD_ROOT
  118. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  119. # activate executables
  120. %{l_shtool} mkdir -f -p -m 755 \
  121. $RPM_BUILD_ROOT%{l_prefix}/bin
  122. for bin in `cd $RPM_BUILD_ROOT%{l_prefix}/libexec/mono && echo *`; do
  123. case $bin in
  124. *.exe ) continue ;;
  125. esac
  126. ln $RPM_BUILD_ROOT%{l_prefix}/libexec/mono/$bin \
  127. $RPM_BUILD_ROOT%{l_prefix}/bin/$bin
  128. done
  129. # strip down installation
  130. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/libgc-mono
  131. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  132. # determine installation files
  133. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  134. %{l_files_std} \
  135. '%config %{l_prefix}/etc/mono/*' \
  136. '%config %{l_prefix}/etc/mono/*/*'
  137. %files -f files
  138. %clean
  139. rm -rf $RPM_BUILD_ROOT