%if 0%{?centos} > 6 || 0%{?rhel} > 6 || 0%{?fedora} %global with_python3 1 %else %global without_python3 1 %endif Name: urjtag Version: 2017.10pre2 Release: 2%{?dist} Summary: A tool for communicating over JTAG with flash chips and CPUs Group: Development/Tools License: GPLv2+ URL: http://urjtag.org Source0: %{name}-%{version}.tar.xz %if 0%{?rhel} || 0%{?centos} %global py2_prefix python %else %global py2_prefix python2 %endif %if 0%{?with_python3} %global py3_prefix python3 %endif BuildRequires: libftdi-devel BuildRequires: swig BuildRequires: %{py2_prefix}-devel %if 0%{?with_python3} %if 0%{?rhel} || 0%{?centos} BuildRequires: %{py3_prefix}4-devel %else BuildRequires: %{py3_prefix}-devel %endif %endif BuildRequires: bison BuildRequires: flex %description UrJTAG aims to create an enhanced, modern tool for communicating over JTAG with flash chips, CPUs, and many more. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package -n %{py2_prefix}-%{name} %{?python_provide:%python_provide %{py2_prefix}-%{name}} # Remove before F30 Provides: %{name}-python = %{version}-%{release} Provides: %{name}-python%{?_isa} = %{version}-%{release} Obsoletes: %{name}-python < %{version}-%{release} Summary: Python bindings for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %if 0%{?with_python3} %package -n %{py3_prefix}-%{name} %if 0%{?rhel} || 0%{?centos} Provides: python3-%{name} %else %{?python_provide:%python_provide %{py3_prefix}-%{name}} %endif # Remove before F30 Provides: %{name}-python%{?_isa} = %{version}-%{release} Obsoletes: %{name}-python < %{version}-%{release} Summary: Python bindings for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %endif %description -n %{py2_prefix}-%{name} Python bindings and examples for %{name}. %if 0%{?with_python3} %description -n %{py3_prefix}-%{name} Python bindings and examples for %{name}. %endif %prep %setup -q %build %configure --enable-jedec-exp --enable-stapl --enable-bsdl --enable-svf --disable-static --enable-shared # V=1: verbose build, disables AM_SILENT_RULES %{__make} %{?_smp_mflags} V=1 pushd bindings/python/ %py2_build %if 0%{?with_python3} %py3_build %endif %install # cd urjtag make install DESTDIR=%{buildroot} rm -f %{buildroot}%{_libdir}/*.la rm -f %{buildroot}%{_libdir}/*.a %find_lang %{name} pushd bindings/python/ %py2_install %if 0%{?with_python3} %py3_install %endif %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files -f %{name}.lang %doc README NEWS ChangeLog COPYING AUTHORS %doc doc/howto_add_support_for_more_flash.txt %doc doc/README.ejtag doc/README.pld doc/README.stapl %doc doc/UrJTAG.txt %{_bindir}/jtag %{_bindir}/bsdl2jtag %{_libdir}/liburjtag.so.* %dir %{_datadir}/urjtag/ %{_datadir}/urjtag/* %{_mandir}/man1/jtag.1* %{_mandir}/man1/bsdl2jtag.1* %files devel %dir %{_includedir}/urjtag %{_includedir}/urjtag/*.h %{_libdir}/liburjtag.so %{_libdir}/pkgconfig/urjtag.pc %files -n %{py2_prefix}-%{name} %{python2_sitearch}/urjtag* %doc doc/urjtag-python.txt %doc bindings/python/t_urjtag_chain.py %doc bindings/python/t_srst.py %if 0%{?with_python3} %files -n %{py3_prefix}-%{name} %{python3_sitearch}/urjtag* %doc doc/urjtag-python.txt %doc bindings/python/t_urjtag_chain.py %doc bindings/python/t_srst.py %endif %changelog * Fri Mar 10 2018 Jiri Kastner - 2017.10pre2-2 - enabled experimental jedec flash detection * Fri Mar 9 2018 Jiri Kastner - 2017.10pre2-1 - updated to 2017.10pre2 * Fri Mar 9 2018 Jiri Kastner - 2017.10pre1-1 - updated to 2017.10pre1 - added python3 * Thu Mar 1 2018 Jiri Kastner - 0.10-22.20171020git49a4f5b5 - added bison and flex for bsdl2jtag command - updated to latest master * Fri Feb 09 2018 Iryna Shcherbina - 0.10-21.20111215gite1a4227 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) * Fri Feb 09 2018 Fedora Release Engineering - 0.10-20.20111215gite1a4227 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek - 0.10-19.20111215gite1a4227 - Add Provides for the old name without %%_isa * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 0.10-18.20111215gite1a4227 - Python 2 binary package renamed to python2-urjtag See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 * Thu Aug 03 2017 Fedora Release Engineering - 0.10-17.20111215gite1a4227 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 0.10-16.20111215gite1a4227 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.10-15.20111215gite1a4227 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Thu Jan 12 2017 Igor Gnatenko - 0.10-14.20111215gite1a4227 - Rebuild for readline 7.x * Fri Dec 9 2016 Jiri Kastner - 0.10-13.20111215gite1a4227 - libftdi is not detected as it is libftdi1 * Tue Jul 19 2016 Fedora Release Engineering - 0.10-12.20111215gite1a4227 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Fri Feb 05 2016 Fedora Release Engineering - 0.10-11.20111215gite1a4227 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Fri Jun 19 2015 Fedora Release Engineering - 0.10-10.20111215gite1a4227 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Tue Sep 16 2014 Peter Robinson 0.10-9.20111215gite1a4227 - Add patch to fix FTBFS on ARMv7 * Mon Aug 18 2014 Fedora Release Engineering - 0.10-8.20111215gite1a4227 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sun Jun 08 2014 Fedora Release Engineering - 0.10-7.20111215gite1a4227 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Thu Jun 05 2014 Scott Tsai - 0.10-6.20111215gite1a4227 - Rebuilt for libftdi soname bump * Wed Oct 9 2013 Shakthi Kannan - 0.10-5.20111215gite1a4227 - ExcludeArch armv7hl * Fri Feb 15 2013 Fedora Release Engineering - 0.10-4.20111215gite1a4227 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sun Jul 22 2012 Fedora Release Engineering - 0.10-3.20111215gite1a4227 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Thu Dec 15 2011 Scott Tsai 0.10-2.20111215gite1a4227 - Initial RPM release