1 %define RELEASE @RELEASE@
2 %define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
3 %if %{?_with_console_socket:1}%{!?_with_console_socket:0}
4 %define _enable_console_socket --enable-console-socket
6 %if %{?_without_console_socket:1}%{!?_without_console_socket:0}
7 %define _disable_console_socket --disable-console-socket
10 %if %{?_with_perf_mgr:1}%{!?_with_perf_mgr:0}
11 %define _enable_perf_mgr --enable-perf-mgr
13 %if %{?_without_perf_mgr:1}%{!?_without_perf_mgr:0}
14 %define _disable_perf_mgr --disable-perf-mgr
17 %if %{?_with_event_plugin:1}%{!?_with_event_plugin:0}
18 %define _enable_event_plugin --enable-event-plugin
20 %if %{?_without_event_plugin:1}%{!?_without_event_plugin:0}
21 %define _disable_event_plugin --disable-event-plugin
24 Summary: InfiniBand subnet manager and administration
29 Group: System Environment/Daemons
30 URL: http://openfabrics.org/
31 Source: http://www.openfabrics.org/downloads/management/@TARBALL@
32 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
33 BuildRequires: libibumad-devel, libtool
34 Requires: %{name}-libs = %{version}-%{release}, logrotate
35 Requires(post): /sbin/service, /sbin/chkconfig
36 Requires(preun): /sbin/chkconfig, /sbin/service
39 OpenSM provides an implementation of an InfiniBand Subnet Manager and
40 Administration. Such a software entity is required to run for in order
41 to initialize the InfiniBand hardware (at least one per each
45 Summary: Libraries from the opensm package
46 Group: System Environment/Libraries
47 Requires(post): /sbin/ldconfig
48 Requires(postun): /sbin/ldconfig
49 Obsoletes: libopensm, libosmcomp, libosmvendor
52 Shared libraries that are part of the opensm package but are also used by
53 other applications. If you don't need opensm itself installed, these
54 libraries can be installed to satisfy dependencies of other applications.
57 Summary: Development files for OpenSM
58 Group: System Environment/Libraries
59 Requires: %{name}-libs = %{version}-%{release} libibumad-devel
60 Obsoletes: libopensm-devel, libosmcomp-devel, libosmvendor-devel
63 Header files for OpenSM.
66 Summary: Static version of the opensm libraries
67 Group: System Environment/Libraries
68 Requires: %{name}-libs = %{version}-%{release} libibumad-devel
71 Static version of the opensm libraries
78 %{?_enable_console_socket} \
79 %{?_disable_console_socket} \
80 %{?_enable_perf_mgr} \
81 %{?_disable_perf_mgr} \
82 %{?_enable_event_plugin} \
83 %{?_disable_event_plugin}
87 rm -rf $RPM_BUILD_ROOT
88 make DESTDIR=$RPM_BUILD_ROOT install
89 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
90 etc=$RPM_BUILD_ROOT%{_sysconfdir}
91 mkdir -p ${RPM_BUILD_ROOT}/var/cache/opensm
92 if [ -f /etc/redhat-release -o -s /etc/redhat-release ]; then
97 mkdir -p $etc/{init.d,logrotate.d} $etc/@OPENSM_CONFIG_SUB_DIR@
98 install -m 755 scripts/${REDHAT}opensm.init $etc/init.d/opensmd
99 install -D -m 644 scripts/opensm.logrotate $etc/logrotate.d/opensm
100 install -m 755 scripts/sldd.sh $RPM_BUILD_ROOT%{_sbindir}/sldd.sh
103 rm -rf $RPM_BUILD_ROOT
107 /sbin/chkconfig --add opensmd
109 /sbin/service opensmd condrestart
114 /sbin/service opensmd stop
115 /sbin/chkconfig --del opensmd
116 rm -f /var/cache/opensm/*
119 %post libs -p /sbin/ldconfig
120 %postun libs -p /sbin/ldconfig
123 %defattr(-,root,root,-)
127 %doc AUTHORS COPYING README doc/performance-manager-HOWTO.txt doc/QoS_management_in_OpenSM.txt doc/opensm_release_notes-3.2.txt
128 %{_sysconfdir}/init.d/opensmd
130 %config(noreplace) %{_sysconfdir}/logrotate.d/opensm
131 %dir /var/cache/opensm
132 %dir %{_sysconfdir}/@OPENSM_CONFIG_SUB_DIR@
135 %defattr(-,root,root,-)
139 %defattr(-,root,root,-)
140 %{_includedir}/infiniband/*
144 %defattr(-,root,root,-)