Blame trellis.spec

Gabriel Somlo f2c4fb2
%global commit0 7a2e9ed8a7d145251f5720a43229ee77de637d4a
Gabriel L. Somlo a9423fb
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
Gabriel L. Somlo a9423fb
Gabriel Somlo d61106f
%global commit1 35d900a94ff0db152679a67bf6e4fbf40ebc34aa
Gabriel L. Somlo a9423fb
%global shortcommit1 %(c=%{commit1}; echo ${c:0:7})
Gabriel L. Somlo a9423fb
Gabriel Somlo f2c4fb2
%global snapdate 20220705
Gabriel L. Somlo a9423fb
Gabriel L. Somlo a9423fb
%global __python %{__python3}
Gabriel L. Somlo a9423fb
Gabriel L. Somlo a9423fb
Name:          trellis
Gabriel Somlo 307a2dc
Version:       1.2.1
Gabriel Somlo f2c4fb2
Release:       8.%{snapdate}git%{shortcommit0}%{?dist}
Gabriel L. Somlo a9423fb
Summary:       Lattice ECP5 FPGA bitstream creation/analysis/programming tools
Gabriel L. Somlo a9423fb
License:       ISC
Gabriel Somlo 307a2dc
URL:           https://github.com/YosysHQ/prj%{name}
Gabriel Somlo 307a2dc
Source0:       https://github.com/YosysHQ/prj%{name}/archive/%{commit0}/prj%{name}-%{shortcommit0}.tar.gz
Gabriel Somlo 307a2dc
Source1:       https://github.com/YosysHQ/prj%{name}-db/archive/%{commit1}/prj%{name}-db-%{shortcommit1}.tar.gz
Gabriel L. Somlo a9423fb
4e063ed
BuildRequires: make
Gabriel Somlo b9d800a
BuildRequires: cmake
Gabriel Somlo b9d800a
BuildRequires: gcc-c++
Gabriel L. Somlo a9423fb
BuildRequires: python3-devel
Gabriel L. Somlo a9423fb
BuildRequires: boost-python3-devel
Gabriel Somlo f2c4fb2
BuildRequires: pybind11-devel
Gabriel L. Somlo a9423fb
# for building docs:
d16ebec
BuildRequires: python3-sphinx-latex
Gabriel L. Somlo a9423fb
BuildRequires: python3-recommonmark
Gabriel L. Somlo a9423fb
BuildRequires: latexmk
Gabriel L. Somlo a9423fb
# for building manpages:
Gabriel L. Somlo a9423fb
BuildRequires: help2man
Gabriel L. Somlo a9423fb
Gabriel L. Somlo a9423fb
Requires:      %{name}-data = %{version}-%{release}
Gabriel L. Somlo a9423fb
Gabriel L. Somlo a9423fb
%description
Gabriel L. Somlo a9423fb
Project Trellis enables a fully open-source flow for ECP5 FPGAs using
Gabriel L. Somlo a9423fb
Yosys for Verilog synthesis and nextpnr for place and route. Project
Gabriel L. Somlo a9423fb
Trellis provides the device database and tools for bitstream creation.
Gabriel L. Somlo a9423fb
Gabriel L. Somlo a9423fb
%package devel
Gabriel L. Somlo a9423fb
Summary:       Development files for Project Trellis
Gabriel L. Somlo a9423fb
Requires:      %{name}%{?_isa} = %{version}-%{release}
Gabriel L. Somlo a9423fb
Requires:      %{name}-data = %{version}-%{release}
Gabriel L. Somlo a9423fb
Gabriel L. Somlo a9423fb
%description devel
Gabriel L. Somlo a9423fb
Development files to build packages using Project Trellis
Gabriel L. Somlo a9423fb
Gabriel L. Somlo a9423fb
%package data
Gabriel L. Somlo a9423fb
Summary:       Project Trellis - Lattice ECP5 Bitstream Database
Gabriel L. Somlo a9423fb
BuildArch:     noarch
Gabriel L. Somlo a9423fb
Gabriel L. Somlo a9423fb
%description data
Gabriel L. Somlo a9423fb
This package contains the bitstream documentation database for
Gabriel L. Somlo a9423fb
Lattice ECP5 FPGA devices.
Gabriel L. Somlo a9423fb
Gabriel L. Somlo a9423fb
%prep
Gabriel L. Somlo a9423fb
%setup -q -n prj%{name}-%{commit0} -a 1
Gabriel L. Somlo a9423fb
rm -rf database
Gabriel L. Somlo a9423fb
mv prj%{name}-db-%{commit1} database
Gabriel L. Somlo 2aea649
# add "-fPIC -g1" to CMAKE_CXX_FLAGS:
Gabriel L. Somlo 2aea649
# (NOTE: "-g1" reduces debuginfo verbosity over "-g", which helps on armv7hl)
Gabriel L. Somlo 2aea649
sed -i '/CMAKE_CXX_FLAGS/s/-O3/-O3 -fPIC -g1/' libtrellis/CMakeLists.txt
Gabriel L. Somlo 2aea649
# prevent "lib64" false positive (e.g., on i386):
Gabriel L. Somlo 7df7ee7
sed -i 's/"lib64"/"lib${LIB_SUFFIX}"/' libtrellis/CMakeLists.txt
Gabriel L. Somlo 928e9ce
# fix shebang lines in Python scripts:
Gabriel L. Somlo a9423fb
find . -name \*.py -exec sed -i 's|/usr/bin/env python3|/usr/bin/python3|' {} \;
Gabriel L. Somlo 928e9ce
# remove .gitignore files in examples:
Gabriel L. Somlo a9423fb
find . -name \.gitignore -delete
Gabriel L. Somlo a9423fb
Gabriel L. Somlo a9423fb
%build
Gabriel Somlo 08e8e62
# building manpages requires in-source build:
Gabriel Somlo 08e8e62
%define __cmake_in_source_build 1
Gabriel Somlo 08e8e62
# disable LTO to allow building for f33 rawhide (BZ 1865586):
Gabriel Somlo 08e8e62
%define _lto_cflags %{nil}
Gabriel Somlo f2c4fb2
%cmake libtrellis \
Gabriel Somlo f2c4fb2
	-DPYBIND11_INCLUDE_DIR="/usr/include/pybind11/" \
Gabriel Somlo f2c4fb2
	-DCURRENT_GIT_VERSION=%{version}-%{release}
Gabriel Somlo 08e8e62
%cmake_build
Gabriel L. Somlo a9423fb
%make_build -C docs latexpdf
Gabriel L. Somlo a9423fb
# build manpages:
Gabriel L. Somlo a9423fb
mkdir man1
Gabriel L. Somlo a9423fb
for f in ecp*
Gabriel L. Somlo a9423fb
do
Gabriel L. Somlo a9423fb
  [ -x $f ] || continue
Gabriel L. Somlo a9423fb
  LD_PRELOAD=./libtrellis.so \
Gabriel L. Somlo a9423fb
    help2man --no-discard-stderr --version-string %{version} -N \
Gabriel L. Somlo a9423fb
             -o man1/$f.1 ./$f
Gabriel L. Somlo a9423fb
  sed -i '/required but missing/d' man1/$f.1
Gabriel L. Somlo a9423fb
done
Gabriel L. Somlo a9423fb
Gabriel L. Somlo a9423fb
%install
Gabriel Somlo 08e8e62
%cmake_install
Gabriel L. Somlo a9423fb
install -Dpm644 -t %{buildroot}%{_mandir}/man1 man1/*
Gabriel L. Somlo a9423fb
Gabriel L. Somlo a9423fb
%check
Gabriel L. Somlo a9423fb
# nothing to do for now.
Gabriel L. Somlo a9423fb
Gabriel L. Somlo a9423fb
%files
Gabriel L. Somlo a9423fb
%license COPYING
Gabriel Somlo 9a061f3
%doc README.md
Gabriel Somlo 9a061f3
%doc docs/_build/latex/ProjectTrellis.pdf
Gabriel L. Somlo a9423fb
%doc examples
Gabriel L. Somlo a9423fb
%{_bindir}/*
Gabriel L. Somlo a9423fb
%dir %{_libdir}/%{name}
Gabriel L. Somlo a9423fb
%{_libdir}/%{name}/libtrellis.so
Gabriel L. Somlo a9423fb
%{_datadir}/%{name}/misc
Gabriel L. Somlo a9423fb
%{_mandir}/man1/ecp*.1*
Gabriel L. Somlo a9423fb
Gabriel L. Somlo a9423fb
%files devel
Gabriel L. Somlo a9423fb
%doc libtrellis/examples
Gabriel L. Somlo a9423fb
%{_libdir}/%{name}/pytrellis.so
Gabriel L. Somlo a9423fb
%{_datadir}/%{name}/timing
Gabriel L. Somlo a9423fb
%{_datadir}/%{name}/util
Gabriel L. Somlo a9423fb
Gabriel L. Somlo a9423fb
%files data
Gabriel L. Somlo a9423fb
%dir %{_datadir}/%{name}
Gabriel L. Somlo a9423fb
%{_datadir}/%{name}/database
Gabriel L. Somlo a9423fb
Gabriel L. Somlo a9423fb
%changelog
Gabriel Somlo f2c4fb2
* Tue Jul 05 2022 Gabriel Somlo <gsomlo@gmail.com> - 1.2.1-8.20220705git7a2e9ed
Gabriel Somlo f2c4fb2
- Update to newer snapshot (incl. fix for Python 3.11, BZ 2103635).
Gabriel Somlo f2c4fb2
091d3bc
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.2.1-7.20220509git64b38df
091d3bc
- Rebuilt for Python 3.11
091d3bc
75c71d6
* Wed May 11 2022 Thomas Rodgers <trodgers@redhat.com> - 1.2.1-6.20220509git64b38df
75c71d6
- Rebuilt for Boost 1.78
75c71d6
Gabriel Somlo d61106f
* Mon May 09 2022 Gabriel Somlo <gsomlo@gmail.com> - 1.2.1-5.20220509git64b38df
Gabriel Somlo d61106f
- Update to newer snapshot.
Gabriel Somlo d61106f
15269e6
* Wed May 04 2022 Thomas Rodgers <trodgers@redhat.com> - 1.2.1-4.20220407git46f50f7
15269e6
- Rebuilt for Boost 1.78
15269e6
Gabriel Somlo 053f595
* Thu Apr 07 2022 Gabriel Somlo <gsomlo@gmail.com> - 1.2.1-3.20220407git46f50f7
Gabriel Somlo 053f595
- Update to newer snapshot.
Gabriel Somlo 053f595
d16ebec
* Wed Apr 06 2022 Karolina Surma <ksurma@redhat.com> - 1.2.1-2.20220127git3ae21cf
d16ebec
- Use versioned BR on python3-sphinx-latex
d16ebec
Gabriel Somlo 307a2dc
* Mon Feb 21 2022 Gabriel Somlo <gsomlo@gmail.com> - 1.2.1-1.20220222git3ae21cf
Gabriel Somlo 307a2dc
- Switch upstream to YosysHQ
Gabriel Somlo 307a2dc
- Update to version 1.21
Gabriel Somlo 307a2dc
Gabriel Somlo 995fc7a
* Thu Jan 27 2022 Gabriel Somlo <gsomlo@gmail.com> - 1.0-0.23.20220127git2f06397
Gabriel Somlo 995fc7a
- Update to newer snapshot.
Gabriel Somlo 995fc7a
2799b0f
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.22.20210904git03e0070
2799b0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
2799b0f
Gabriel Somlo 8206708
* Sat Sep 04 2021 Gabriel Somlo <gsomlo@gmail.com> - 1.0-0.21.20210904git03e0070
Gabriel Somlo 8206708
- Update to newer snapshot.
Gabriel Somlo 8206708
cfd01ae
* Sat Aug 07 2021 Jonathan Wakely <jwakely@redhat.com> - 1.0-0.20.20210523gitfe1c39c
cfd01ae
- Rebuilt for Boost 1.76
cfd01ae
9ef302d
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.19.20210523gitfe1c39c
9ef302d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
9ef302d
7637c90
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.0-0.18.20210523gitfe1c39c
7637c90
- Rebuilt for Python 3.10
7637c90
Gabriel Somlo c3fccdc
* Sun May 23 2021 Gabriel Somlo <gsomlo@gmail.com> - 1.0-0.17.20210523gitfe1c39c
Gabriel Somlo c3fccdc
- Update to newer snapshot.
Gabriel Somlo c3fccdc
- Remove patch for pdf doc build (revert applied upstream).
Gabriel Somlo c3fccdc
Gabriel Somlo b9d800a
* Sun Mar 07 2021 Gabriel Somlo <gsomlo@gmail.com> - 1.0-0.16.20210307git210a0a7
Gabriel Somlo b9d800a
- Update to newer snapshot.
Gabriel Somlo b9d800a
da124e5
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.15.20201124git52d2915
da124e5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
da124e5
Gabriel Somlo b9d800a
* Fri Jan 22 2021 Jonathan Wakely <jwakely@redhat.com> - 1.0-0.14.              20201124git52d2915
69d8964
- Rebuilt for Boost 1.75
69d8964
Gabriel Somlo 1ad2aab
* Tue Nov 24 2020 Gabriel Somlo <gsomlo@gmail.com> - 1.0-0.13.20201124git52d2915
Gabriel Somlo 1ad2aab
- Update to newer snapshot.
Gabriel Somlo 1ad2aab
- Fix Python 3.10 build (BZ #1898928).
Gabriel Somlo 1ad2aab
Gabriel Somlo 08e8e62
* Thu Aug 06 2020 Gabriel Somlo <gsomlo@gmail.com> - 1.0-0.12.20200806gitf93243b
Gabriel Somlo 08e8e62
- Update to newer snapshot.
Gabriel Somlo 08e8e62
- Disable LTO for f33 rebuild (BZ 1865586)
Gabriel Somlo 08e8e62
4458851
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.11.20200127git30ee6f2
4458851
- Second attempt - Rebuilt for
4458851
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
4458851
86df15b
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.10.20200127git30ee6f2
86df15b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
86df15b
46a68ed
* Sat May 30 2020 Jonathan Wakely <jwakely@redhat.com> - 1.0-0.9.20200127git30ee6f2
46a68ed
- Rebuilt for Boost 1.73
46a68ed
7781357
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0-0.8.20200127git30ee6f2
7781357
- Rebuilt for Python 3.9
7781357
1272eae
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.7.20200127git30ee6f2
1272eae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
1272eae
Gabriel Somlo 9a061f3
* Mon Jan 27 2020 Gabriel Somlo <gsomlo@gmail.com> - 1.0-0.6.20200127git30ee6f2
Gabriel Somlo 9a061f3
- Update to newer snapshot.
Gabriel Somlo 9a061f3
- Fix Python 3.9 build (BZ #1793496).
Gabriel Somlo 9a061f3
- Fix pdf doc build (upstream requires obscure python/sphinx dependency).
Gabriel Somlo 9a061f3
7fe71d9
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0-0.5.20190806git7e97b5b
7fe71d9
- Rebuilt for Python 3.8
7fe71d9
Gabriel L. Somlo 74ce6ae
* Tue Aug 06 2019 Gabriel Somlo <gsomlo@gmail.com> - 1.0-0.4.20190806git7e97b5b
Gabriel L. Somlo 74ce6ae
- Update to newer snapshot.
Gabriel L. Somlo 74ce6ae
- Fix python 3.8 build (BZ #1737016).
Gabriel L. Somlo 74ce6ae
cba8946
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-0.3.20190327gitf1b1b35
cba8946
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
cba8946
Gabriel L. Somlo 7df7ee7
* Wed Mar 27 2019 Gabriel Somlo <gsomlo@gmail.com> - 1.0-0.2.20190327gitf1b1b35
Gabriel L. Somlo 74ce6ae
- Update to newer snapshot.
Gabriel L. Somlo 7df7ee7
- Fix library suffix mis-detection on i686.
Gabriel L. Somlo 74ce6ae
Gabriel L. Somlo 2aea649
* Wed Mar 20 2019 Gabriel Somlo <gsomlo@gmail.com> - 1.0-0.1.20190320git26d6667
Gabriel L. Somlo a9423fb
- Initial version.