mono.spec 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. ##
  2. ## mono.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2005 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2005 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2005 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: mono
  27. Summary: Unix .NET Development Framework
  28. URL: http://www.go-mono.com/
  29. Vendor: The Mono Project
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: EVAL
  33. Group: Language
  34. License: GPL
  35. Version: 1.0.5
  36. Release: 20050201
  37. # list of sources
  38. Source0: http://www.go-mono.com/archive/%{version}/mono-%{version}.tar.gz
  39. Patch0: mono.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20040130, pkgconfig
  44. PreReq: OpenPKG, openpkg >= 20040130
  45. BuildPreReq: glib2, glib2::with_threads = yes
  46. PreReq: glib2, glib2::with_threads = yes
  47. AutoReq: no
  48. AutoReqProv: no
  49. Conflicts: pnet
  50. %description
  51. The Mono project is an open source effort to create a free Unix
  52. implementation of the .NET Development Framework. This is the base
  53. package providing a Common Language Runtime (CLR) for the Common
  54. Language Infrastructure (CLI), a C# Compiler and a set of class
  55. libraries. The runtime can be embedded into your application. It
  56. implements both ADO.NET and ASP.NET.
  57. %track
  58. prog mono = {
  59. version = %{version}
  60. url = http://www.go-mono.com/download.html
  61. regex = mono-(\d+\.[02468](\.\d+)*)\.tar\.gz
  62. }
  63. %prep
  64. %setup -q
  65. %patch -p0
  66. %build
  67. # trick configure to not use truncl(3)
  68. # because this is not available everywhere,
  69. # although sometimes defined in <math.h>
  70. ( echo "ac_cv_header_aio_h=no"
  71. echo "ac_cv_func_trunc=no"
  72. echo "ac_cv_trunc=no"
  73. echo "ac_cv_lib_sunmath_aintl=no"
  74. ) >config.cache
  75. %{l_shtool} subst \
  76. -e 's;trunc(0\.0);notexisting();' \
  77. configure
  78. # configure program
  79. CC="%{l_cc}" \
  80. CFLAGS="%{l_cflags -O}" \
  81. CPPFLAGS="%{l_cppflags}" \
  82. LDFLAGS="%{l_ldflags}" \
  83. ./configure \
  84. --cache-file=./config.cache \
  85. --prefix=%{l_prefix} \
  86. --bindir=%{l_prefix}/libexec/mono \
  87. --with-gc=included \
  88. --with-jit=yes \
  89. --disable-shared
  90. # build program
  91. %{l_make} %{l_mflags -O}
  92. %install
  93. # use a working install to create subdirs
  94. %{l_shtool} subst \
  95. -e 's;\$(mkdir_p);%{l_shtool} mkdir -p;' \
  96. Makefile */Makefile */*/Makefile
  97. # install program
  98. rm -rf $RPM_BUILD_ROOT
  99. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  100. # activate executables
  101. %{l_shtool} mkdir -f -p -m 755 \
  102. $RPM_BUILD_ROOT%{l_prefix}/bin
  103. for bin in `cd $RPM_BUILD_ROOT%{l_prefix}/libexec/mono && echo *`; do
  104. case $bin in
  105. *.exe ) continue ;;
  106. esac
  107. ln $RPM_BUILD_ROOT%{l_prefix}/libexec/mono/$bin \
  108. $RPM_BUILD_ROOT%{l_prefix}/bin/$bin
  109. done
  110. # strip down installation
  111. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/libgc-mono
  112. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  113. # determine installation files
  114. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  115. %{l_files_std} \
  116. '%config %{l_prefix}/etc/mono/*' \
  117. '%not %dir %{l_prefix}/lib/pkgconfig'
  118. %files -f files
  119. %clean
  120. rm -rf $RPM_BUILD_ROOT