mono.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. ##
  2. ## mono.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: 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.1
  36. Release: 20040810
  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. %description
  50. The Mono project is an open source effort to create a free Unix
  51. implementation of the .NET Development Framework. This is the base
  52. package providing a Common Language Runtime (CLR) for the Common
  53. Language Infrastructure (CLI), a C# Compiler and a set of class
  54. libraries. The runtime can be embedded into your application. It
  55. implements both ADO.NET and ASP.NET.
  56. %track
  57. prog mono = {
  58. version = %{version}
  59. url = http://www.go-mono.com/download.html
  60. regex = mono-(__VER__)\.tar\.gz
  61. }
  62. %prep
  63. %setup -q
  64. %patch -p0
  65. %build
  66. # trick configure to not use truncl(3)
  67. # because this is not available everywhere,
  68. # although sometimes defined in <math.h>
  69. ( echo "ac_cv_header_aio_h=no"
  70. echo "ac_cv_func_trunc=no"
  71. echo "ac_cv_trunc=no"
  72. echo "ac_cv_lib_sunmath_aintl=no"
  73. ) >config.cache
  74. %{l_shtool} subst \
  75. -e 's;trunc(0\.0);notexisting();' \
  76. configure
  77. # configure program
  78. CC="%{l_cc}" \
  79. CFLAGS="%{l_cflags -O}" \
  80. CPPFLAGS="%{l_cppflags}" \
  81. LDFLAGS="%{l_ldflags}" \
  82. ./configure \
  83. --cache-file=./config.cache \
  84. --prefix=%{l_prefix} \
  85. --bindir=%{l_prefix}/libexec/mono \
  86. --with-gc=included \
  87. --with-jit=yes \
  88. --disable-shared
  89. # build program
  90. %{l_make} %{l_mflags -O}
  91. %install
  92. # install program
  93. rm -rf $RPM_BUILD_ROOT
  94. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  95. # activate executables
  96. %{l_shtool} mkdir -f -p -m 755 \
  97. $RPM_BUILD_ROOT%{l_prefix}/bin
  98. for bin in `cd $RPM_BUILD_ROOT%{l_prefix}/libexec/mono && echo *`; do
  99. case $bin in
  100. *.exe ) continue ;;
  101. esac
  102. ln $RPM_BUILD_ROOT%{l_prefix}/libexec/mono/$bin \
  103. $RPM_BUILD_ROOT%{l_prefix}/bin/$bin
  104. done
  105. # strip down installation
  106. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  107. # determine installation files
  108. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  109. %{l_files_std} \
  110. '%config %{l_prefix}/etc/mono/*' \
  111. '%not %dir %{l_prefix}/lib/pkgconfig'
  112. %files -f files
  113. %clean
  114. rm -rf $RPM_BUILD_ROOT