corosync.spec.in 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  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. %{_bindir}/corosync-blackbox
  107. %dir %{_sysconfdir}/corosync
  108. %dir %{_sysconfdir}/corosync/service.d
  109. %dir %{_sysconfdir}/corosync/uidgid.d
  110. %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example
  111. %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu
  112. %if %{with dbus}
  113. %{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
  114. %endif
  115. %if %{with snmp}
  116. %(_datadir)/snmp/mibs/COROSYNC-MIB.txt
  117. %endif
  118. %{_initrddir}/corosync
  119. %{_initrddir}/corosync-notifyd
  120. %dir %{_libexecdir}/lcrso
  121. %{_libexecdir}/lcrso/coroparse.lcrso
  122. %{_libexecdir}/lcrso/objdb.lcrso
  123. %{_libexecdir}/lcrso/service_cfg.lcrso
  124. %{_libexecdir}/lcrso/service_cpg.lcrso
  125. %{_libexecdir}/lcrso/service_evs.lcrso
  126. %{_libexecdir}/lcrso/service_confdb.lcrso
  127. %{_libexecdir}/lcrso/service_pload.lcrso
  128. %{_libexecdir}/lcrso/quorum_votequorum.lcrso
  129. %{_libexecdir}/lcrso/quorum_testquorum.lcrso
  130. %{_libexecdir}/lcrso/vsf_quorum.lcrso
  131. %{_libexecdir}/lcrso/vsf_ykd.lcrso
  132. %if %{with watchdog}
  133. %{_libexecdir}/lcrso/service_wd.lcrso
  134. %endif
  135. %if %{with monitoring}
  136. %{_libexecdir}/lcrso/service_mon.lcrso
  137. %endif
  138. %dir %{_localstatedir}/lib/corosync
  139. %dir %{_localstatedir}/log/cluster
  140. %{_mandir}/man8/corosync_overview.8*
  141. %{_mandir}/man8/corosync.8*
  142. %{_mandir}/man8/corosync-blackbox.8*
  143. %{_mandir}/man8/corosync-objctl.8*
  144. %{_mandir}/man8/corosync-keygen.8*
  145. %{_mandir}/man8/corosync-cfgtool.8*
  146. %{_mandir}/man8/corosync-cpgtool.8*
  147. %{_mandir}/man8/corosync-fplay.8*
  148. %{_mandir}/man8/corosync-pload.8*
  149. %{_mandir}/man8/corosync-notifyd.8*
  150. %{_mandir}/man8/corosync-quorumtool.8*
  151. %{_mandir}/man5/corosync.conf.5*
  152. # optional testagent rpm
  153. #
  154. %if %{with testagents}
  155. %package -n corosync-testagents
  156. Summary: The Corosync Cluster Engine Test Agents
  157. Group: Development/Libraries
  158. Requires: %{name} = %{version}-%{release}
  159. %description -n corosync-testagents
  160. This package contains corosync test agents.
  161. %files -n corosync-testagents
  162. %defattr(755,root,root,-)
  163. %{_datadir}/corosync/tests/mem_leak_test.sh
  164. %{_datadir}/corosync/tests/net_breaker.sh
  165. %{_bindir}/cpg_test_agent
  166. %{_bindir}/confdb_test_agent
  167. %{_bindir}/sam_test_agent
  168. %{_bindir}/votequorum_test_agent
  169. %{_libexecdir}/lcrso/service_syncv2.lcrso
  170. %endif
  171. # library
  172. #
  173. %package -n corosynclib
  174. Summary: The Corosync Cluster Engine Libraries
  175. Group: System Environment/Libraries
  176. Requires: %{name} = %{version}-%{release}
  177. %description -n corosynclib
  178. This package contains corosync libraries.
  179. %files -n corosynclib
  180. %defattr(-,root,root,-)
  181. %doc LICENSE
  182. %{_libdir}/libcfg.so.*
  183. %{_libdir}/libcpg.so.*
  184. %{_libdir}/libconfdb.so.*
  185. %{_libdir}/libevs.so.*
  186. %{_libdir}/libtotem_pg.so.*
  187. %{_libdir}/liblogsys.so.*
  188. %{_libdir}/libcoroipcc.so.*
  189. %{_libdir}/libcoroipcs.so.*
  190. %{_libdir}/libquorum.so.*
  191. %{_libdir}/libvotequorum.so.*
  192. %{_libdir}/libpload.so.*
  193. %{_libdir}/libsam.so.*
  194. %post -n corosynclib -p /sbin/ldconfig
  195. %postun -n corosynclib -p /sbin/ldconfig
  196. %package -n corosynclib-devel
  197. Summary: The Corosync Cluster Engine Development Kit
  198. Group: Development/Libraries
  199. Requires: corosynclib = %{version}-%{release}
  200. Requires: pkgconfig
  201. Provides: corosync-devel = %{version}
  202. Obsoletes: corosync-devel < 0.92-7
  203. %description -n corosynclib-devel
  204. This package contains include files and man pages used to develop using
  205. The Corosync Cluster Engine APIs.
  206. %files -n corosynclib-devel
  207. %defattr(-,root,root,-)
  208. %doc LICENSE README.devmap
  209. %dir %{_includedir}/corosync/
  210. %{_includedir}/corosync/cs_config.h
  211. %{_includedir}/corosync/corodefs.h
  212. %{_includedir}/corosync/coroipc_types.h
  213. %{_includedir}/corosync/coroipcs.h
  214. %{_includedir}/corosync/coroipcc.h
  215. %{_includedir}/corosync/cfg.h
  216. %{_includedir}/corosync/confdb.h
  217. %{_includedir}/corosync/corotypes.h
  218. %{_includedir}/corosync/cpg.h
  219. %{_includedir}/corosync/evs.h
  220. %{_includedir}/corosync/hdb.h
  221. %{_includedir}/corosync/list.h
  222. %{_includedir}/corosync/mar_gen.h
  223. %{_includedir}/corosync/sam.h
  224. %{_includedir}/corosync/swab.h
  225. %{_includedir}/corosync/quorum.h
  226. %{_includedir}/corosync/votequorum.h
  227. %dir %{_includedir}/corosync/totem/
  228. %{_includedir}/corosync/totem/coropoll.h
  229. %{_includedir}/corosync/totem/totem.h
  230. %{_includedir}/corosync/totem/totemip.h
  231. %{_includedir}/corosync/totem/totempg.h
  232. %dir %{_includedir}/corosync/lcr/
  233. %{_includedir}/corosync/lcr/lcr_ckpt.h
  234. %{_includedir}/corosync/lcr/lcr_comp.h
  235. %{_includedir}/corosync/lcr/lcr_ifact.h
  236. %dir %{_includedir}/corosync/engine
  237. %{_includedir}/corosync/engine/config.h
  238. %{_includedir}/corosync/engine/coroapi.h
  239. %{_includedir}/corosync/engine/logsys.h
  240. %{_includedir}/corosync/engine/objdb.h
  241. %{_includedir}/corosync/engine/quorum.h
  242. %{_libdir}/libcfg.so
  243. %{_libdir}/libcpg.so
  244. %{_libdir}/libconfdb.so
  245. %{_libdir}/libevs.so
  246. %{_libdir}/libtotem_pg.so
  247. %{_libdir}/liblogsys.so
  248. %{_libdir}/libcoroipcc.so
  249. %{_libdir}/libcoroipcs.so
  250. %{_libdir}/libquorum.so
  251. %{_libdir}/libvotequorum.so
  252. %{_libdir}/libpload.so
  253. %{_libdir}/libsam.so
  254. %{_libdir}/pkgconfig/*.pc
  255. %{_mandir}/man3/cpg_*3*
  256. %{_mandir}/man3/evs_*3*
  257. %{_mandir}/man3/confdb_*3*
  258. %{_mandir}/man3/votequorum_*3*
  259. %{_mandir}/man3/sam_*3*
  260. %{_mandir}/man8/cpg_overview.8*
  261. %{_mandir}/man8/evs_overview.8*
  262. %{_mandir}/man8/confdb_overview.8*
  263. %{_mandir}/man8/logsys_overview.8*
  264. %{_mandir}/man8/votequorum_overview.8*
  265. %{_mandir}/man8/coroipc_overview.8*
  266. %{_mandir}/man8/sam_overview.8*
  267. %changelog
  268. * @date@ Autotools generated version <nobody@nowhere.org> - @version@-1-@numcomm@.@alphatag@.@dirty@
  269. - Autotools generated version