epel9
Irina Boverman 7 years ago
parent 965bde20e1
commit fe9ba88b06

@ -189,7 +189,6 @@ Obsoletes: qpid-proton-cpp-devel-docs
%doc %{proton_datadir}/examples/cpp/ssl-certs %doc %{proton_datadir}/examples/cpp/ssl-certs
%doc %{proton_datadir}/examples/cpp/tutorial.dox %doc %{proton_datadir}/examples/cpp/tutorial.dox
%if 0%{?rhel} && 0%{?rhel} <= 7
%package -n %{pythonx}-qpid-proton %package -n %{pythonx}-qpid-proton
%{?python_provide:%python_provide python2-qpid-proton} %{?python_provide:%python_provide python2-qpid-proton}
Group: System Environment/Libraries Group: System Environment/Libraries
@ -206,7 +205,6 @@ Requires: %{pythonx}
%license %{proton_licensedir}/LICENSE.txt %license %{proton_licensedir}/LICENSE.txt
%license %{proton_licensedir}/licenses.xml %license %{proton_licensedir}/licenses.xml
%{python2_sitearch}/* %{python2_sitearch}/*
%endif
%if 0%{?fedora} || 0%{?rhel} > 7 %if 0%{?fedora} || 0%{?rhel} > 7
@ -249,16 +247,9 @@ Obsoletes: python-qpid-proton-doc
%build %build
%if 0%{?fedora} mkdir buildpython2
export ADDCFLAGS=" -Wno-error=return-type" cd buildpython2
%cmake \
-DSYSINSTALL_BINDINGS=ON \
-DCMAKE_SKIP_RPATH:BOOL=OFF \
-DENABLE_FUZZ_TESTING=NO \
"-DCMAKE_C_FLAGS=$CMAKE_C_FLAGS $CFLAGS $ADDCFLAGS" \
-DCYRUS_SASL_INCLUDE_DIR=/usr/include \
.
%endif
%if 0%{?rhel} && 0%{?rhel} <= 7 %if 0%{?rhel} && 0%{?rhel} <= 7
%cmake \ %cmake \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-z,relro,-z,now" \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,-z,relro,-z,now" \
@ -267,26 +258,63 @@ export ADDCFLAGS=" -Wno-error=return-type"
-DSYSINSTALL_BINDINGS=ON \ -DSYSINSTALL_BINDINGS=ON \
-DCMAKE_SKIP_RPATH:BOOL=OFF \ -DCMAKE_SKIP_RPATH:BOOL=OFF \
-DENABLE_FUZZ_TESTING=NO \ -DENABLE_FUZZ_TESTING=NO \
. ..
%endif
%if 0%{?fedora} || 0%{?rhel} > 7
export ADDCFLAGS=" -Wno-error=return-type"
%cmake \
-DSYSINSTALL_BINDINGS=ON \
-DCMAKE_SKIP_RPATH:BOOL=OFF \
-DENABLE_FUZZ_TESTING=NO \
"-DCMAKE_C_FLAGS=$CMAKE_C_FLAGS $CFLAGS $ADDCFLAGS" \
-DCYRUS_SASL_INCLUDE_DIR=/usr/include \
-DPYTHON_EXECUTABLE=/usr/bin/python2.7 \
-DPYTHON_INCLUDE_DIR=/usr/include/python2.7/ \
"-DPYTHON_LIBRARY=%{_libdir}/libpython2.7.so" \
..
%endif %endif
#make all docs %{?_smp_mflags} #make all docs %{?_smp_mflags}
make all docs -j1 make all docs -j1
%if 0%{?fedora} || 0%{?rhel} > 7 %if 0%{?fedora} || 0%{?rhel} > 7
(cd python/dist; %py2_build)
cd ..
mkdir buildpython3
cd buildpython3
%cmake \
-DSYSINSTALL_BINDINGS=ON \
-DCMAKE_SKIP_RPATH:BOOL=OFF \
-DENABLE_FUZZ_TESTING=NO \
"-DCMAKE_C_FLAGS=$CMAKE_C_FLAGS $CFLAGS $ADDCFLAGS" \
-DCYRUS_SASL_INCLUDE_DIR=/usr/include \
..
#make all docs %{?_smp_mflags}
make all docs -j1
(cd python/dist; %py3_build) (cd python/dist; %py3_build)
%endif %endif
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
cd buildpython2
%make_install %make_install
%if 0%{?fedora} || 0%{?rhel} > 7 %if 0%{?fedora} || 0%{?rhel} > 7
(cd python/dist; %py2_install)
cd ../buildpython3
%make_install
(cd python/dist; %py3_install) (cd python/dist; %py3_install)
%endif %endif
CPROTON_BUILD=$PWD . ./config.sh #CPROTON_BUILD=$PWD . ./config.sh
#chmod +x %{buildroot}%{python_sitearch}/_cproton.so chmod +x %{buildroot}%{python2_sitearch}/_cproton.so
%if 0%{?fedora} || 0%{?rhel} > 7
chmod +x %{buildroot}%{python3_sitearch}/_cproton.so
%endif
#find %{buildroot}%{proton_datadir}/examples/ -type f | xargs chmod -x #find %{buildroot}%{proton_datadir}/examples/ -type f | xargs chmod -x
%if 0%{?rhel} && 0%{?rhel} <= 6 %if 0%{?rhel} && 0%{?rhel} <= 6
@ -366,6 +394,9 @@ rm -fr %{buildroot}%{proton_datadir}/examples/php
%check %check
%changelog %changelog
* Thu Jul 26 2018 Irina Boverman <iboverma@redhat.com> - 0.24.0-2
- Updated to build both python2- and python3-qpid-proton packages
* Tue Jul 24 2018 Irina Boverman <iboverma@redhat.com> - 0.24.0-1 * Tue Jul 24 2018 Irina Boverman <iboverma@redhat.com> - 0.24.0-1
- Rebased to 0.24.0 - Rebased to 0.24.0

Loading…
Cancel
Save