mico.spec 5.7 KB

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