4c902ac
%global commit0 c40fb2289952f4f120cc10a5a4c82a6fb88442dc
2b4ce7f
2b4ce7f
# The upstream makefile gets version information by invoking git. We can't
2b4ce7f
# do that. We can still use what the Makefile calls GIT_REV, because that's
2b4ce7f
# our shortcommit0 variable extracted from commit0 below.  We have to
2b4ce7f
# hard-code VER and VER_HASH here, as ver0 and verhash0.  When updating this
2b4ce7f
# package spec for a new git snapshot, clone the git repo, run make in it,
2b4ce7f
# and inspect the generated version_(has).cc to determine the correct values.
4c902ac
%global ver0 0.1+328+0
4c902ac
%global verhash0 34321
2b4ce7f
2b4ce7f
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
2b4ce7f
2b4ce7f
Name:           arachne-pnr
2b4ce7f
Version:        0.1
47267d2
Release:        0.8.20190729git%{shortcommit0}%{?dist}
2b4ce7f
Summary:        Place and route for FPGA compilation
2b4ce7f
License:        GPLv2
2b4ce7f
URL:            https://github.com/cseed/arachne-pnr
2b4ce7f
Source0:        https://github.com/cseed/%{name}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz
e629d0a
BuildRequires:  gcc-c++
2b4ce7f
BuildRequires:  icestorm
2b4ce7f
2b4ce7f
%description
2b4ce7f
Arachne-pnr implements the place and route step of the hardware
2b4ce7f
compilation process for FPGAs. It accepts as input a technology-mapped
2b4ce7f
netlist in BLIF format, as output by the Yosys synthesis suite for
2b4ce7f
example. It currently targets the Lattice Semiconductor iCE40 family
2b4ce7f
of FPGAs. Its output is a textual bitstream representation for
2b4ce7f
assembly by the IceStorm icepack command. The output of icepack is a
2b4ce7f
binary bitstream which can be uploaded to a hardware device.
2b4ce7f
2b4ce7f
Together, Yosys, arachne-pnr and IceStorm provide an fully open-source
2b4ce7f
Verilog-to-bistream tool chain for iCE40 1K and 8K FPGA development.
2b4ce7f
2b4ce7f
%prep
2b4ce7f
%setup -q -n %{name}-%{commit0}
2b4ce7f
2b4ce7f
# can't use git from Makefile to extract version information
2b4ce7f
sed -i 's/^VER =.*/VER = %{ver0}/' Makefile
2b4ce7f
sed -i 's/^GIT_REV =.*/GIT_REV = %{shortcommit0}/' Makefile
2b4ce7f
sed -i 's/^VER_HASH =.*/VER_HASH = %{verhash0}/' Makefile
2b4ce7f
2b4ce7f
%build
2b4ce7f
make %{?_smp_mflags} \
2b4ce7f
     CXXFLAGS="%{optflags}" \
2b4ce7f
     PREFIX="%{_prefix}" \
2b4ce7f
     ICEBOX="%{_datadir}/icestorm"
2b4ce7f
2b4ce7f
%install
2b4ce7f
make install PREFIX="%{_prefix}" \
2b4ce7f
             DESTDIR="%{buildroot}" \
2b4ce7f
             ICEBOX="%{_datadir}/icestorm"
2b4ce7f
2b4ce7f
%files
2b4ce7f
%license COPYING
2b4ce7f
%doc README.md
2b4ce7f
%{_bindir}/*
2b4ce7f
%{_datadir}/%{name}
2b4ce7f
2b4ce7f
%changelog
47267d2
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1-0.8.20190729gitc40fb22
47267d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
47267d2
4c902ac
* Wed Aug  7 2019 Vasil Velichkov <vvvelichkov@gmail.com> - 0.1-0.7.20190729gitc40fb22
4c902ac
- Update to upstream git c40fb2289952f4f120cc10a5a4c82a6fb88442dc
4c902ac
b80b12a
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1-0.7.20170628git7e135ed
b80b12a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
b80b12a
acd948f
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1-0.6.20170628git7e135ed
acd948f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
acd948f
f949bea
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1-0.5.20170628git7e135ed
f949bea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
f949bea
7e500b9
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1-0.4.20170628git7e135ed
7e500b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
7e500b9
2b4ce7f
* Sun Sep 17 2017 Eric Smith <brouhaha@fedoraproject.org> 0.1-0.3.20170628git7e135ed
2b4ce7f
- updated to latest upstream.
2b4ce7f
2b4ce7f
* Mon Sep 12 2016 Eric Smith <brouhaha@fedoraproject.org> 0.1-0.2.20160813git52e69ed
2b4ce7f
- Updated directory used for icebox for consistency with icestorm package.
2b4ce7f
2b4ce7f
* Mon Sep 12 2016 Eric Smith <brouhaha@fedoraproject.org> 0.1-0.1.20160813git52e69ed
2b4ce7f
- Initial version.