Blame SPECS/genwqe-tools.spec

8a484f
# Copyright 2015, International Business Machines
8a484f
#
8a484f
# Licensed under the Apache License, Version 2.0 (the "License");
8a484f
# you may not use this file except in compliance with the License.
8a484f
# You may obtain a copy of the License at
8a484f
#
8a484f
#     http://www.apache.org/licenses/LICENSE-2.0
8a484f
#
8a484f
# Unless required by applicable law or agreed to in writing, software
8a484f
# distributed under the License is distributed on an "AS IS" BASIS,
8a484f
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8a484f
# See the License for the specific language governing permissions and
8a484f
# limitations under the License.
8a484f
#
8a484f
# zlib-devel 1.2.8 is better, but 1.2.7 should work too
8a484f
#
8a484f
# The following switch tries to take care that the distros libz.so is been taken:
8a484f
#    CONFIG_ZLIB_PATH=%%{_libdir}/libz.so
8a484f
# No special libz build should be needed anymore, since we added the right
8a484f
# dependency to the spec file. We want to have a zlib-devel installed.
8a484f
#
8a484f
8a484f
%global _hardened_build 1
8a484f
8a484f
Summary: GenWQE userspace tools
8a484f
Name: genwqe-tools
8a484f
Version: 4.0.20
8a484f
Release: 3%{?dist}
8a484f
License: ASL 2.0
8a484f
URL: https://github.com/ibm-genwqe/genwqe-user/
8a484f
BuildRequires: zlib-devel >= 1.2.7
8a484f
BuildRequires: help2man
8a484f
%ifarch %{power64}
8a484f
BuildRequires: libcxl-devel
8a484f
%endif
8a484f
Source0: https://github.com/ibm-genwqe/genwqe-user/archive/v%{version}.tar.gz
8a484f
Patch0: genwqe-user-4.0.18-install-gzFile_test.patch
8a484f
Requires: genwqe-zlib = %{version}-%{release}
8a484f
8a484f
%description
8a484f
Provide a suite of utilities to manage and configure the IBM GenWQE card.
8a484f
8a484f
%package -n genwqe-zlib
8a484f
Summary: GenWQE hardware accelerated libz
8a484f
%description -n genwqe-zlib
8a484f
GenWQE hardware accelerated libz and test-utilities.
8a484f
8a484f
%package -n genwqe-vpd
8a484f
Summary: GenWQE adapter VPD tools
8a484f
%description -n genwqe-vpd
8a484f
The genwqe-vpd package contains GenWQE adapter VPD tools.
8a484f
8a484f
%package -n genwqe-zlib-devel
8a484f
Summary: Development files for %{name}
8a484f
Requires: genwqe-zlib%{?_isa} = %{version}-%{release}
8a484f
8a484f
%description -n genwqe-zlib-devel
8a484f
The genwqe-zlib-devel package contains libraries and header files for
8a484f
developing applications that use %{name}.
8a484f
8a484f
%package -n genwqe-zlib-static
8a484f
Summary: Static library files for %{name}
8a484f
Requires: genwqe-zlib-devel%{?_isa} = %{version}-%{release}
8a484f
8a484f
%description -n genwqe-zlib-static
8a484f
The genwqe-zlib-static package contains static libraries for
8a484f
developing applications that use %{name}.
8a484f
8a484f
%prep
8a484f
%autosetup -p1 -n genwqe-user-%{version}
8a484f
8a484f
%build
8a484f
LDFLAGS="%{__global_ldflags}" CFLAGS="%{optflags}" make %{?_smp_mflags} tools lib \
8a484f
 VERSION=%{version} CONFIG_ZLIB_PATH=%{_libdir}/libz.so V=2
8a484f
8a484f
%install
8a484f
make %{?_smp_mflags} install DESTDIR=%{buildroot}/%{_prefix} \
8a484f
    SYSTEMD_UNIT_DIR=%{buildroot}/%{_unitdir} \
8a484f
    LIB_INSTALL_PATH=%{buildroot}/%{_libdir}/genwqe \
8a484f
    INCLUDE_INSTALL_PATH=%{buildroot}/%{_includedir}/genwqe
8a484f
8a484f
# move genwqe_vpd.csv to expected location.
8a484f
mkdir -p %{buildroot}/%{_sysconfdir}/
8a484f
install -m 0644 tools/genwqe_vpd.csv %{buildroot}/etc/
8a484f
8a484f
# remove libz stuff
8a484f
rm %{buildroot}%{_libdir}/genwqe/libz.*
8a484f
mv %{buildroot}%{_libdir}/genwqe/* %{buildroot}%{_libdir}/
8a484f
rmdir %{buildroot}%{_libdir}/genwqe/
8a484f
8a484f
%post -n genwqe-zlib -p /sbin/ldconfig
8a484f
%postun -n genwqe-zlib -p /sbin/ldconfig
8a484f
8a484f
%files -n genwqe-tools
8a484f
%license LICENSE
8a484f
%{_bindir}/genwqe_echo
8a484f
%{_bindir}/genwqe_ffdc
8a484f
%{_bindir}/genwqe_cksum
8a484f
%{_bindir}/genwqe_memcopy
8a484f
%{_bindir}/genwqe_peek
8a484f
%{_bindir}/genwqe_poke
8a484f
%{_bindir}/genwqe_update
8a484f
%{_bindir}/gzFile_test
8a484f
%{_bindir}/genwqe_gunzip
8a484f
%{_bindir}/genwqe_gzip
8a484f
%{_bindir}/genwqe_test_gz
8a484f
%{_bindir}/genwqe_mt_perf
8a484f
%{_bindir}/zlib_mt_perf
8a484f
8a484f
%{_mandir}/man1/genwqe_echo.1*
8a484f
%{_mandir}/man1/genwqe_ffdc.1*
8a484f
%{_mandir}/man1/genwqe_gunzip.1*
8a484f
%{_mandir}/man1/genwqe_gzip.1*
8a484f
%{_mandir}/man1/genwqe_cksum.1*
8a484f
%{_mandir}/man1/genwqe_memcopy.1*
8a484f
%{_mandir}/man1/genwqe_peek.1*
8a484f
%{_mandir}/man1/genwqe_poke.1*
8a484f
%{_mandir}/man1/genwqe_update.1*
8a484f
%{_mandir}/man1/zlib_mt_perf.1*
8a484f
%{_mandir}/man1/genwqe_test_gz.1*
8a484f
%{_mandir}/man1/genwqe_mt_perf.1*
8a484f
%{_mandir}/man1/gzFile_test.1*
8a484f
8a484f
%ifarch %{power64}
8a484f
%{_bindir}/genwqe_maint
8a484f
%{_bindir}/genwqe_loadtree
8a484f
/%{_unitdir}/genwqe_maint.service
8a484f
%{_mandir}/man1/genwqe_maint.1*
8a484f
%{_mandir}/man1/genwqe_loadtree.1*
8a484f
%endif
8a484f
8a484f
%files -n genwqe-zlib
8a484f
%license LICENSE
8a484f
%{_libdir}/*.so.*
8a484f
8a484f
%files -n genwqe-vpd
8a484f
%license LICENSE
8a484f
%config(noreplace) %{_sysconfdir}/genwqe_vpd.csv
8a484f
%{_bindir}/genwqe_csv2vpd
8a484f
%{_bindir}/genwqe_vpdconv
8a484f
%{_bindir}/genwqe_vpdupdate
8a484f
%{_mandir}/man1/genwqe_csv2vpd.1*
8a484f
%{_mandir}/man1/genwqe_vpdconv.1*
8a484f
%{_mandir}/man1/genwqe_vpdupdate.1*
8a484f
8a484f
%files -n genwqe-zlib-devel
8a484f
%dir %{_includedir}/genwqe
8a484f
%{_includedir}/genwqe/*
8a484f
%{_libdir}/*.so
8a484f
8a484f
%files -n genwqe-zlib-static
8a484f
%{_libdir}/*.a
8a484f
8a484f
%changelog
8a484f
* Wed May 23 2018 Than Ngo <than@redhat.com> - 4.0.20-3
8a484f
- Related: bz#1521050, add explicit package version requirement
8a484f
8a484f
* Fri May 18 2018 Than Ngo <than@redhat.com> - 4.0.20-2
8a484f
- Related: bz#1521050, fix rpmdiff issue
8a484f
8a484f
* Thu May 17 2018 Than Ngo <than@redhat.com> - 4.0.20-1
8a484f
- Resolves: bz#1521050, update to 4.0.20
8a484f
8a484f
* Tue Jan 09 2018 Than Ngo <than@redhat.com> - - 4.0.18-6
8a484f
- Related: bz#1532269, add -Wl,-z,relro to the linker flags in order to fix a rpmdiff
8a484f
8a484f
* Mon Jan 08 2018 Than Ngo <than@redhat.com> - 4.0.18-5
8a484f
- Resolves: bz#1532269, fixed genwqe_cksum when failed causes EEH
8a484f
8a484f
* Fri Nov 17 2017 Than Ngo <than@redhat.com> - 4.0.18-4
8a484f
- Resolves: bz#1513837, fixed potential arbitrary code execution bug
8a484f
8a484f
* Thu Oct 12 2017 Than Ngo <than@redhat.com> - 4.0.18-3
8a484f
- Resolves: bz#1456492, add backported patches from 4.0.19 branch
8a484f
8a484f
* Tue Apr 04 2017 Rafael Fonseca <rdossant@redhat.com> - 4.0.18-2
8a484f
- Remove dynamically linked test binary.
8a484f
8a484f
* Tue Mar 14 2017 Rafael Fonseca <rdossant@redhat.com> - 4.0.18-1
8a484f
- Import package from Fedora.