mico.spec 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. ##
  2. ## mico.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.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: mico
  27. Summary: CORBA Toolkit
  28. URL: http://www.mico.org/
  29. Vendor: The MICO Project
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [PLUS]
  32. Group: System
  33. License: LGPL/GPL
  34. Version: 2.3.10
  35. Release: 20030707
  36. # package options
  37. %option with_ssl no
  38. %option with_qt no
  39. # list of sources
  40. Source0: http://www.mico.org/mico-%{version}.tar.gz
  41. Source2: rc.mico
  42. Patch0: mico.patch
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20030103, gcc, make
  47. PreReq: OpenPKG, openpkg >= 20030103
  48. %if "%{with_ssl}" == "yes"
  49. BuildPreReq: openssl
  50. PreReq: openssl
  51. %endif
  52. %if "%{with_qt}" == "yes"
  53. BuildPreReq: qt
  54. PreReq: qt
  55. %endif
  56. AutoReq: no
  57. AutoReqProv: no
  58. %description
  59. The acronym MICO expands to MICO Is CORBA. The intention of this
  60. project is to provide a freely available and fully compliant
  61. implementation of the CORBA standard. The following design
  62. principles guided the implementation of MICO:
  63. - Start from scratch, and only use standard APIs (Posix/Win32)
  64. - Don't rely on propietary or specialized libraries
  65. - Use standard C++ for the implementation
  66. - Only make use of widely available, free, non-proprietary tools
  67. - Only implement what is required for a CORBA compliant implementation
  68. - Provide a clear design even for implementation internals
  69. %prep
  70. %setup -q -n mico
  71. %patch -p1
  72. %build
  73. CC="%{l_cc}"
  74. CXX="%{l_cxx}"
  75. CFLAGS="%{l_cflags -O}"
  76. CXXFLAGS="%{l_cxxflags -O} -Wno-deprecated"
  77. %if "%{with_qt}" == "yes"
  78. CXXFLAGS="$CXXFLAGS -I%{l_prefix}/include/qt"
  79. %endif
  80. CPPFLAGS="%{l_cppflags}"
  81. LDFLAGS="%{l_ldflags}"
  82. JAVAC=no
  83. export CC CXX CFLAGS CXXFLAGS CPPFLAGS LDFLAGS JAVAC
  84. ./configure \
  85. --prefix=%{l_prefix} \
  86. %if "%{with_ssl}" == "yes"
  87. --with-ssl=%{l_prefix} \
  88. %endif
  89. %if "%{with_qt}" == "yes"
  90. --with-qt=%{l_prefix} \
  91. %endif
  92. %if "%{with_gtk}" == "yes"
  93. --with-gtk=%{l_prefix} \
  94. %endif
  95. %if "%{with_tcl}" == "yes"
  96. --with-tcl=%{l_prefix} \
  97. %endif
  98. --disable-mini-stl \
  99. --disable-shared
  100. %{l_make} %{l_mflags}
  101. %install
  102. rm -rf $RPM_BUILD_ROOT
  103. # make directory structure
  104. %{l_shtool} mkdir -f -p -m 755 \
  105. $RPM_BUILD_ROOT%{l_prefix}/bin \
  106. $RPM_BUILD_ROOT%{l_prefix}/lib \
  107. $RPM_BUILD_ROOT%{l_prefix}/include/mico \
  108. $RPM_BUILD_ROOT%{l_prefix}/include/coss \
  109. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  110. $RPM_BUILD_ROOT%{l_prefix}/var/mico \
  111. $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  112. $RPM_BUILD_ROOT%{l_prefix}/man/man5 \
  113. $RPM_BUILD_ROOT%{l_prefix}/man/man8
  114. # install binaries, libraries, headers
  115. %{l_make} %{l_mflags} install \
  116. INSTDIR=$RPM_BUILD_ROOT%{l_prefix} \
  117. SHARED_INSTDIR=$RPM_BUILD_ROOT%{l_prefix}
  118. # install our own things
  119. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  120. -e 's;@l_musr@;%{l_musr};g' -e 's;@l_mgrp@;%{l_mgrp};g' \
  121. %{SOURCE rc.mico} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  122. # cleanup installation files
  123. rm -rf $RPM_BUILD_ROOT%{l_prefix}/doc
  124. rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/ministl
  125. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/mico-setup.*
  126. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  127. mv $RPM_BUILD_ROOT%{l_prefix}/man/man8/nsd.8 \
  128. $RPM_BUILD_ROOT%{l_prefix}/man/man8/mico-nsd.8
  129. ( cd $RPM_BUILD_ROOT%{l_prefix}/lib
  130. for name in mico micoaux micocoss micoir micox; do
  131. mv lib${name}%{version}.a lib${name}.a
  132. done
  133. %if "%{with_qt}" == "yes"
  134. mv libmicoqt%{version}.a libmicoqt.a
  135. %endif
  136. %if "%{with_gtk}" == "yes"
  137. mv libmicogtk%{version}.a libmicogtk.a
  138. %endif
  139. %if "%{with_tcl}" == "yes"
  140. mv libmicotcl%{version}.a libmicotcl.a
  141. %endif
  142. )
  143. # generate files listing
  144. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  145. %files -f files
  146. %clean
  147. rm -rf $RPM_BUILD_ROOT