4
0

corosync.spec.in 7.8 KB

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