From 0998145634a68b41a8d7760b08f52f87498a7eaf Mon Sep 17 00:00:00 2001 From: Eric Smith Date: Sep 15 2017 05:56:15 +0000 Subject: Initial import (#1375380). --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..74466fb --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/icestorm-5c4d4db.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index e519dae..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# icestorm - -The icestorm package \ No newline at end of file diff --git a/icestorm-datadir.patch b/icestorm-datadir.patch new file mode 100644 index 0000000..759702a --- /dev/null +++ b/icestorm-datadir.patch @@ -0,0 +1,12 @@ +diff -up icestorm-01b9822638d60e048c295d005257daa4c147761f/icebox/icebox_vlog.py.datadir icestorm-01b9822638d60e048c295d005257daa4c147761f/icebox/icebox_vlog.py +--- icestorm-01b9822638d60e048c295d005257daa4c147761f/icebox/icebox_vlog.py.datadir 2016-12-10 23:25:36.362990574 -0700 ++++ icestorm-01b9822638d60e048c295d005257daa4c147761f/icebox/icebox_vlog.py 2016-12-10 23:26:01.410506021 -0700 +@@ -367,7 +367,7 @@ def seg_to_net(seg, default=None): + + if lookup_symbols: + text_func.append("// Debug Symbols") +- with open("/usr/local/share/icebox/chipdb-%s.txt" % ic.device, "r") as f: ++ with open("/usr/share/icebox/chipdb-%s.txt" % ic.device, "r") as f: + current_net = -1 + exported_names = dict() + for line in f: diff --git a/icestorm.spec b/icestorm.spec new file mode 100644 index 0000000..d68db81 --- /dev/null +++ b/icestorm.spec @@ -0,0 +1,65 @@ +%global commit0 5c4d4db08d39673b98ce953f1ab1d1368eeb2f44 + +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) + +%global __python %{__python3} + +Name: icestorm +Version: 0 +Release: 0.3.20170914git%{shortcommit0}%{?dist} +Summary: Lattice iCE40 FPGA bitstream creation/analysis/programming tools +License: ISC +URL: http://www.clifford.at/%{name}/ +Source0: https://github.com/cliffordwolf/%{name}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz + +# Fedora-specific patch for datadir +Patch1: %{name}-datadir.patch + +BuildRequires: python%{python3_pkgversion} libftdi-devel + +%description +Project IceStorm aims at documenting the bitstream format of Lattice iCE40 +FPGAs and providing simple tools for analyzing and creating bitstream files. + +%prep +%setup -q -n %{name}-%{commit0} +%patch1 -p1 -b .datadir +# fix shebang lines in Python scripts +find . -name \*.py -exec sed -i 's|/usr/bin/env python3|/usr/bin/python3|' {} \; +# get rid of .gitignore files in examples +find . -name \.gitignore -delete + +%build +%global moreflags -I/usr/include/libftdi1 -DPREFIX='\\\"%{_prefix}\\\"' -DCHIPDB_SUBDIR='\\\"%{_datarootdir}/%{name}\\\"' +make %{?_smp_mflags} \ + CFLAGS="%{optflags} %{moreflags}" \ + CXXFLAGS="%{optflags} %{moreflags}" \ + LDFLAGS="$RPM_LD_FLAGS" + +%install +%make_install PREFIX="%{_prefix}" +chmod +x %{buildroot}%{_bindir}/icebox.py +mv %{buildroot}%{_datarootdir}/icebox %{buildroot}%{_datarootdir}/%{name} +mv %{buildroot}%{_bindir}/iceboxdb.py %{buildroot}%{_datarootdir}/%{name} + +# We could do a minimal check section by running make in the example +# directories, but that depends on arachne-pnr, which depends on this +# package, so it would create a circular dependency. + +%files +%license README +%doc examples +%{_bindir}/* +%{_datarootdir}/%{name} + +%changelog +* Thu Sep 14 2017 Eric Smith 0-0.3.20170914git5c4d4db +- Updated per review comments. +- Updated to latest upstream. + +* Sat Dec 10 2016 Eric Smith 0-0.2.20161101git01b9822 +- Updated per review comments. +- Updated to latest upstream. + +* Mon Sep 12 2016 Eric Smith 0-0.1.20160904git0b4b038 +- Initial version. diff --git a/sources b/sources new file mode 100644 index 0000000..8e69030 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (icestorm-5c4d4db.tar.gz) = ff7710023421ab39c876352e8f3cd357b8d847c773879646a045d3786539d06cf9c3c313463aa970f9bbb941f647a8e0983f2d77014cc138f91fc1e9aab71b88