Blame SPECS/opa-fm.spec

86e033
Name: opa-fm
86e033
Version: 10.0.0.0
86e033
Release: 444%{?dist}
86e033
Summary: Intel Omni-Path Fabric Management Software
86e033
86e033
Group: System Environment/Daemons
86e033
License: BSD
86e033
Url: https://github.com/01org/opa-fm
86e033
# tarball created by:
86e033
# git clone https://github.com/01org/opa-fm.git
86e033
# cd opa-fm
86e033
# git archive --format=tar --prefix=opa-fm/ 5f4087aabb5d03c42738b320af0fc60e9df4d1f7 | xz > opa-fm.tar.xz
86e033
Source0: %{name}.tar.xz
86e033
86e033
Patch0001: 0001-opafmd-larger-array-to-hold-program-path.patch
86e033
# bz1262327 needs Patch0002 and Patch0003
86e033
Patch0002: 0001-Fix-well-known-tempfile-issue-in-script.patch
86e033
Patch0003: 0002-Revert-Add-script-for-building-S-RPMs.patch
86e033
86e033
#BuildRequires: libibverbs-devel >= 1.1-1, libibumad-devel, libibmad-devel
86e033
BuildRequires: autoconf
86e033
BuildRequires: systemd
86e033
BuildRequires: zlib-devel, openssl-devel, expat-devel
86e033
BuildRequires: libibmad-devel, libibverbs-devel
86e033
Requires(post): systemd
86e033
Requires(preun): systemd
86e033
Requires(postun): systemd
86e033
ExclusiveArch: x86_64
86e033
86e033
%description
86e033
opa-fm contains Intel Omni-Path fabric management applications. This
86e033
includes: the Subnet Manager, Baseboard Manager, Performance Manager,
86e033
Fabric Executive, and some fabric management tools.
86e033
86e033
%prep
86e033
%setup -q -n %{name}
86e033
%patch0001 -p1
86e033
%patch0002 -p1
86e033
%patch0003 -p1
86e033
86e033
# Make it possible to override hardcoded compiler flags
86e033
sed -i -r -e 's/(release_C(C)?OPT_Flags\s*)=/\1?=/' Makerules/Target.LINUX.GNU.*
86e033
86e033
# A crude hack from necessity. Upstream hardcodes "/opt/opafm" in many places.
86e033
# Packaging guidelines disallow installation into /opt.
86e033
# Instead we'll use /usr/lib/opa-fm/ (NOT _libdir !) as this package's private
86e033
# directory.
86e033
sed -i -e 's#/opt/opafm#/usr/lib/opa-fm#g' $(grep -r -l '/opt/opafm' .)
86e033
# The same holds for opa-ff, which this package references:
86e033
sed -i -e 's#/opt/opa#/usr/lib/opa-ff#g'   $(grep -r -l '/opt/opa' .)
86e033
86e033
%build
86e033
export CFLAGS='%{optflags}'
86e033
export CXXFLAGS='%{optflags}'
86e033
export release_COPT_Flags='%{optflags}'
86e033
export release_CCOPT_Flags='%{optflags}'
86e033
cd Esm
86e033
./fmbuild -V %{version}.%{release}
86e033
86e033
%install
86e033
install -D -m 755 stage.rpm/opafm.service %{buildroot}/%{_unitdir}/opafm.service
86e033
install -D -m 755 stage.rpm/opafmctrl.sh %{buildroot}/usr/lib/opa-fm/bin/opafmctrl.sh
86e033
install -D -m 755 stage.rpm/opafmd %{buildroot}/usr/lib/opa-fm/bin/opafmd
86e033
86e033
install -D -m 644 stage.rpm/opafm.xml %{buildroot}%{_sysconfdir}/sysconfig/opafm.xml
86e033
install -D -m 755 stage.rpm/opafm.info %{buildroot}%{_sysconfdir}/sysconfig/opa/opafm.info
86e033
86e033
install -D stage.rpm/fm_capture %{buildroot}/usr/lib/opa-fm/bin/fm_capture
86e033
install -D stage.rpm/fm_cmd %{buildroot}/usr/lib/opa-fm/bin/fm_cmd
86e033
install -D stage.rpm/fm_cmdall %{buildroot}/usr/lib/opa-fm/bin/fm_cmdall
86e033
install -D stage.rpm/smpoolsize %{buildroot}/usr/lib/opa-fm/bin/smpoolsize
86e033
86e033
install -D stage.rpm/sm %{buildroot}/usr/lib/opa-fm/runtime/sm
86e033
install -D stage.rpm/fe %{buildroot}/usr/lib/opa-fm/runtime/fe
86e033
86e033
install -D stage.rpm/config_check %{buildroot}/usr/lib/opa-fm/etc/config_check
86e033
install -D stage.rpm/config_convert %{buildroot}/usr/lib/opa-fm/etc/config_convert
86e033
install -D stage.rpm/config_diff %{buildroot}/usr/lib/opa-fm/etc/config_diff
86e033
install -D stage.rpm/config_generate %{buildroot}/usr/lib/opa-fm/etc/config_generate
86e033
install -D stage.rpm/opafm %{buildroot}/usr/lib/opa-fm/etc/opafm
86e033
install -D stage.rpm/opafm.arch %{buildroot}/usr/lib/opa-fm/etc/opafm.arch
86e033
install -D stage.rpm/opafm.info %{buildroot}/usr/lib/opa-fm/etc/opafm.info
86e033
install -D Esm/ib/src/linux/startup/opafm_src.xml %{buildroot}/usr/lib/opa-fm/etc/opafm_src.xml
86e033
86e033
install -D stage.rpm/opafm.xml %{buildroot}/usr/lib/opa-fm/etc/opafm.xml
86e033
install -D stage.rpm/opaxmlextract %{buildroot}/usr/lib/opa-fm/etc/opaxmlextract
86e033
install -D stage.rpm/opaxmlfilter %{buildroot}/usr/lib/opa-fm/etc/opaxmlfilter
86e033
86e033
mkdir -p %{buildroot}%{_sbindir}
86e033
ln -s /usr/lib/opa-fm/bin/fm_cmd %{buildroot}%{_sbindir}/opafmcmd
86e033
ln -s /usr/lib/opa-fm/bin/fm_cmdall %{buildroot}%{_sbindir}/opafmcmdall
86e033
86e033
%post
86e033
%systemd_post opafm.service
86e033
86e033
%preun
86e033
%systemd_preun opafm.service
86e033
86e033
%postun
86e033
%systemd_postun_with_restart opafm.service
86e033
86e033
%files
86e033
%doc Esm/README
86e033
%{_unitdir}/opafm.service
86e033
%config(noreplace) %{_sysconfdir}/sysconfig/opafm.xml
86e033
%{_sysconfdir}/sysconfig/opa/opafm.info
86e033
%{_prefix}/lib/opa-fm/bin/*
86e033
%{_prefix}/lib/opa-fm/etc/*
86e033
%{_prefix}/lib/opa-fm/runtime/*
86e033
%{_sbindir}/opafmcmd
86e033
%{_sbindir}/opafmcmdall
86e033
86e033
86e033
%changelog
86e033
* Mon Sep 28 2015 Honggang Li <honli@redhat.com> - 10.0.0.0-444
86e033
- Update the N-V-R
86e033
- Related: bz1262327
86e033
86e033
* Mon Sep 28 2015 Honggang Li <honli@redhat.com> - 10.0.0.0-443
86e033
- Apply one missed patch to fix various /tmp races
86e033
- Revert the script for building (S)RPMs
86e033
- Resolves: bz1262327
86e033
86e033
* Thu Sep 24 2015 Honggang Li <honli@redhat.com> - 10.0.0.0-442
86e033
- Fix typo in changelog
86e033
- Related: bz1262327
86e033
86e033
* Wed Sep 23 2015 Honggang Li <honli@redhat.com> - 10.0.0.0-441
86e033
- Fix various /tmp races
86e033
- Resolves: bz1262327
86e033
86e033
* Wed Aug 26 2015 Michal Schmidt <mschmidt@redhat.com> - 10.0.0.0-440
86e033
- Respect optflags.
86e033
- Avoid overflowing prog path due to /opt -> /usr/lib substitution.
86e033
- Resolves: bz1257087
86e033
- Resolves: bz1257093
86e033
86e033
* Mon Aug 24 2015 Michal Schmidt <mschmidt@redhat.com> - 10.0.0.0-439
86e033
- Update to new upstream snapshot with unbundled expat.
86e033
- Related: bz1173302
86e033
86e033
* Tue Aug 18 2015 Michal Schmidt <mschmidt@redhat.com> - 10.0.0.0-438
86e033
- Initial packaging for RHEL, based on upstream spec file.
86e033
- Cleaned up spec.
86e033
- Moved /opt/opafm -> /usr/lib/opa-fm.
86e033
- Fix scriptlets.
86e033
86e033
* Thu Oct 09 2014 Kaike Wan <kaike.wan@intel.com> - 10.0.0.0-177
86e033
- Initial version