corosync.spec.in 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. %global alphatag @alphatag@
  2. %global numcomm @numcomm@
  3. %global dirty @dirty@
  4. # Conditionals
  5. # Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
  6. # to disable or enable specific features
  7. %bcond_with testagents
  8. %bcond_with watchdog
  9. %bcond_with monitoring
  10. %bcond_with snmp
  11. %bcond_with dbus
  12. Name: corosync
  13. Summary: The Corosync Cluster Engine and Application Programming Interfaces
  14. Version: @version@
  15. Release: 1%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
  16. License: BSD
  17. Group: System Environment/Base
  18. URL: http://www.openais.org
  19. Source0: http://developer.osdl.org/dev/openais/downloads/%{name}-%{version}/%{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}.tar.gz
  20. # Runtime bits
  21. Requires: corosynclib = %{version}-%{release}
  22. Requires(pre): /usr/sbin/useradd
  23. Requires(post): /sbin/chkconfig
  24. Requires(preun): /sbin/chkconfig
  25. Conflicts: openais <= 0.89, openais-devel <= 0.89
  26. # Build bits
  27. %define buildtrunk 0
  28. %{?_with_buildtrunk: %define buildtrunk 1}
  29. %if %{buildtrunk}
  30. BuildRequires: autoconf automake
  31. %endif
  32. BuildRequires: nss-devel
  33. BuildRequires: libibverbs-devel librdmacm-devel
  34. %if %{with snmp}
  35. BuildRequires: net-snmp-devel
  36. %endif
  37. %if %{with dbus}
  38. BuildRequires: dbus-devel
  39. %endif
  40. BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
  41. %prep
  42. %setup -q -n %{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
  43. %build
  44. %if %{buildtrunk}
  45. ./autogen.sh
  46. %endif
  47. export ibverbs_CFLAGS=-I/usr/include/infiniband \
  48. export ibverbs_LIBS=-libverbs \
  49. export rdmacm_CFLAGS=-I/usr/include/rdma \
  50. export rdmacm_LIBS=-lrdmacm \
  51. %{configure} \
  52. --enable-nss \
  53. %if %{with testagents}
  54. --enable-testagents \
  55. %endif
  56. %if %{with watchdog}
  57. --enable-watchdog \
  58. %endif
  59. %if %{with monitoring}
  60. --enable-monitoring \
  61. %endif
  62. %if %{with snmp}
  63. --enable-snmp \
  64. %endif
  65. %if %{with dbus}
  66. --enable-dbus \
  67. %endif
  68. --enable-rdma \
  69. --with-initddir=%{_initrddir}
  70. make %{_smp_mflags}
  71. %install
  72. rm -rf %{buildroot}
  73. make install DESTDIR=%{buildroot}
  74. ## tree fixup
  75. # drop static libs
  76. rm -f %{buildroot}%{_libdir}/*.a
  77. # drop docs and html docs for now
  78. rm -rf %{buildroot}%{_docdir}/*
  79. %clean
  80. rm -rf %{buildroot}
  81. %description
  82. This package contains the Corosync Cluster Engine Executive, several default
  83. APIs and libraries, default configuration files, and an init script.
  84. %post
  85. if [ $1 -eq 1 ]; then
  86. /sbin/chkconfig --add corosync || :
  87. fi
  88. %preun
  89. if [ $1 -eq 0 ]; then
  90. /sbin/service corosync stop &>/dev/null || :
  91. /sbin/chkconfig --del corosync || :
  92. fi
  93. %files
  94. %defattr(-,root,root,-)
  95. %doc LICENSE SECURITY
  96. %{_bindir}/corosync-blackbox
  97. %{_sbindir}/corosync
  98. %{_sbindir}/corosync-keygen
  99. %{_sbindir}/corosync-objctl
  100. %{_sbindir}/corosync-cfgtool
  101. %{_sbindir}/corosync-fplay
  102. %{_sbindir}/corosync-pload
  103. %{_sbindir}/corosync-cpgtool
  104. %{_sbindir}/corosync-quorumtool
  105. %{_sbindir}/corosync-notifyd
  106. %dir %{_sysconfdir}/corosync
  107. %dir %{_sysconfdir}/corosync/service.d
  108. %dir %{_sysconfdir}/corosync/uidgid.d
  109. %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example
  110. %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu
  111. %if %{with dbus}
  112. %{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
  113. %endif
  114. %if %{with snmp}
  115. %(_datadir)/snmp/mibs/COROSYNC-MIB.txt
  116. %endif
  117. %{_initrddir}/corosync
  118. %{_initrddir}/corosync-notifyd
  119. %dir %{_libexecdir}/lcrso
  120. %{_libexecdir}/lcrso/coroparse.lcrso
  121. %{_libexecdir}/lcrso/objdb.lcrso
  122. %{_libexecdir}/lcrso/service_cfg.lcrso
  123. %{_libexecdir}/lcrso/service_cpg.lcrso
  124. %{_libexecdir}/lcrso/service_evs.lcrso
  125. %{_libexecdir}/lcrso/service_confdb.lcrso
  126. %{_libexecdir}/lcrso/service_pload.lcrso
  127. %{_libexecdir}/lcrso/quorum_votequorum.lcrso
  128. %{_libexecdir}/lcrso/quorum_testquorum.lcrso
  129. %{_libexecdir}/lcrso/vsf_quorum.lcrso
  130. %{_libexecdir}/lcrso/vsf_ykd.lcrso
  131. %dir %{_localstatedir}/lib/corosync
  132. %dir %{_localstatedir}/log/cluster
  133. %{_mandir}/man8/corosync_overview.8*
  134. %{_mandir}/man8/corosync.8*
  135. %{_mandir}/man8/corosync-blackbox.8*
  136. %{_mandir}/man8/corosync-objctl.8*
  137. %{_mandir}/man8/corosync-keygen.8*
  138. %{_mandir}/man8/corosync-cfgtool.8*
  139. %{_mandir}/man8/corosync-cpgtool.8*
  140. %{_mandir}/man8/corosync-fplay.8*
  141. %{_mandir}/man8/corosync-pload.8*
  142. %{_mandir}/man8/corosync-notifyd.8*
  143. %{_mandir}/man8/corosync-quorumtool.8*
  144. %{_mandir}/man5/corosync.conf.5*
  145. %package -n corosynclib
  146. Summary: The Corosync Cluster Engine Libraries
  147. Group: System Environment/Libraries
  148. Requires: %{name} = %{version}-%{release}
  149. %description -n corosynclib
  150. This package contains corosync libraries.
  151. %files -n corosynclib
  152. %defattr(-,root,root,-)
  153. %doc LICENSE
  154. %{_libdir}/libcfg.so.*
  155. %{_libdir}/libcpg.so.*
  156. %{_libdir}/libconfdb.so.*
  157. %{_libdir}/libevs.so.*
  158. %{_libdir}/libtotem_pg.so.*
  159. %{_libdir}/liblogsys.so.*
  160. %{_libdir}/libcoroipcc.so.*
  161. %{_libdir}/libcoroipcs.so.*
  162. %{_libdir}/libquorum.so.*
  163. %{_libdir}/libvotequorum.so.*
  164. %{_libdir}/libpload.so.*
  165. %{_libdir}/libsam.so.*
  166. %post -n corosynclib -p /sbin/ldconfig
  167. %postun -n corosynclib -p /sbin/ldconfig
  168. %package -n corosynclib-devel
  169. Summary: The Corosync Cluster Engine Development Kit
  170. Group: Development/Libraries
  171. Requires: corosynclib = %{version}-%{release}
  172. Requires: pkgconfig
  173. Provides: corosync-devel = %{version}
  174. Obsoletes: corosync-devel < 0.92-7
  175. %description -n corosynclib-devel
  176. This package contains include files and man pages used to develop using
  177. The Corosync Cluster Engine APIs.
  178. %files -n corosynclib-devel
  179. %defattr(-,root,root,-)
  180. %doc LICENSE README.devmap
  181. %dir %{_includedir}/corosync/
  182. %{_includedir}/corosync/cs_config.h
  183. %{_includedir}/corosync/corodefs.h
  184. %{_includedir}/corosync/coroipc_types.h
  185. %{_includedir}/corosync/coroipcs.h
  186. %{_includedir}/corosync/coroipcc.h
  187. %{_includedir}/corosync/cfg.h
  188. %{_includedir}/corosync/confdb.h
  189. %{_includedir}/corosync/corotypes.h
  190. %{_includedir}/corosync/cpg.h
  191. %{_includedir}/corosync/evs.h
  192. %{_includedir}/corosync/hdb.h
  193. %{_includedir}/corosync/list.h
  194. %{_includedir}/corosync/mar_gen.h
  195. %{_includedir}/corosync/sam.h
  196. %{_includedir}/corosync/swab.h
  197. %{_includedir}/corosync/quorum.h
  198. %{_includedir}/corosync/votequorum.h
  199. %dir %{_includedir}/corosync/totem/
  200. %{_includedir}/corosync/totem/coropoll.h
  201. %{_includedir}/corosync/totem/totem.h
  202. %{_includedir}/corosync/totem/totemip.h
  203. %{_includedir}/corosync/totem/totempg.h
  204. %dir %{_includedir}/corosync/lcr/
  205. %{_includedir}/corosync/lcr/lcr_ckpt.h
  206. %{_includedir}/corosync/lcr/lcr_comp.h
  207. %{_includedir}/corosync/lcr/lcr_ifact.h
  208. %dir %{_includedir}/corosync/engine
  209. %{_includedir}/corosync/engine/config.h
  210. %{_includedir}/corosync/engine/coroapi.h
  211. %{_includedir}/corosync/engine/logsys.h
  212. %{_includedir}/corosync/engine/objdb.h
  213. %{_includedir}/corosync/engine/quorum.h
  214. %{_libdir}/libcfg.so
  215. %{_libdir}/libcpg.so
  216. %{_libdir}/libconfdb.so
  217. %{_libdir}/libevs.so
  218. %{_libdir}/libtotem_pg.so
  219. %{_libdir}/liblogsys.so
  220. %{_libdir}/libcoroipcc.so
  221. %{_libdir}/libcoroipcs.so
  222. %{_libdir}/libquorum.so
  223. %{_libdir}/libvotequorum.so
  224. %{_libdir}/libpload.so
  225. %{_libdir}/libsam.so
  226. %{_libdir}/pkgconfig/*.pc
  227. %{_mandir}/man3/cpg_*3*
  228. %{_mandir}/man3/evs_*3*
  229. %{_mandir}/man3/confdb_*3*
  230. %{_mandir}/man3/votequorum_*3*
  231. %{_mandir}/man3/sam_*3*
  232. %{_mandir}/man8/cpg_overview.8*
  233. %{_mandir}/man8/evs_overview.8*
  234. %{_mandir}/man8/confdb_overview.8*
  235. %{_mandir}/man8/logsys_overview.8*
  236. %{_mandir}/man8/votequorum_overview.8*
  237. %{_mandir}/man8/coroipc_overview.8*
  238. %{_mandir}/man8/sam_overview.8*
  239. %changelog
  240. * @date@ Autotools generated version <nobody@nowhere.org> - @version@-1-@numcomm@.@alphatag@.@dirty@
  241. - Autotools generated version