Build with linker flags from redhat-rpm-config

This commit is contained in:
Florian Weimer 2018-02-01 17:23:46 +01:00
parent 39d57f32ec
commit 1997cdd9d8

View File

@ -6,7 +6,7 @@
Name: i2c-tools
Version: 4.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A heterogeneous set of I2C tools for Linux
License: GPLv2+
URL: https://i2c.wiki.kernel.org/index.php/I2C_Tools
@ -90,13 +90,15 @@ Obsoletes: i2c-tools-devel < 4.0-1
%patch2 -p1
%build
make CFLAGS="$RPM_OPT_FLAGS" BUILD_STATIC_LIB=0 EXTRA=eeprog
make CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" BUILD_STATIC_LIB=0 EXTRA=eeprog
pushd eepromer
make CFLAGS="$RPM_OPT_FLAGS -I../include"
make CFLAGS="$RPM_OPT_FLAGS -I../include" LDFLAGS="$RPM_LD_FLAGS"
popd
pushd py-smbus
CFLAGS="$RPM_OPT_FLAGS -I../include" %{__python2} setup.py build -b build-py2
CFLAGS="$RPM_OPT_FLAGS -I../include" %{__python3} setup.py build -b build-py3
CFLAGS="$RPM_OPT_FLAGS -I../include" LDFLAGS="$RPM_LD_FLAGS" \
%{__python2} setup.py build -b build-py2
CFLAGS="$RPM_OPT_FLAGS -I../include" LDFLAGS="$RPM_LD_FLAGS" \
%{__python3} setup.py build -b build-py3
popd
@ -186,6 +188,9 @@ exit 0
%changelog
* Thu Feb 1 2018 Florian Weimer <fweimer@redhat.com> - 4.0-2
- Build with linker flags from redhat-rpm-config
* Tue Nov 21 2017 Ondřej Lysoněk <olysonek@redhat.com> - 4.0-1
- New version
- Dropped i2c-tools-devel, introduced libi2c, libi2c-devel