Package the RISCV emulator (Spike).
[fedora-riscv.git] / stage1-riscv-fesvr / riscv-fesvr.spec.in
diff --git a/stage1-riscv-fesvr/riscv-fesvr.spec.in b/stage1-riscv-fesvr/riscv-fesvr.spec.in
new file mode 100644 (file)
index 0000000..babac6e
--- /dev/null
@@ -0,0 +1,54 @@
+%global debug_package %{nil}
+
+Name:           riscv-fesvr
+Version:        0
+Release:        0.2.git@SHORTCOMMIT@%{?dist}
+Summary:        RISC-V front end server library
+License:        BSD
+
+URL:            https://github.com/riscv/riscv-fesvr
+Source0:        https://github.com/riscv/%{name}/archive/@COMMIT@/%{name}-@SHORTCOMMIT@.tar.gz
+
+BuildRequires:  glibc-devel
+
+# Workaround some problem with RPM dependency generator.
+Provides:       libfesvr.so()(64bit)
+
+
+%description
+This is the RISC-V front end server library.
+
+
+%prep
+%setup -q -n %{name}-@COMMIT@
+
+
+%build
+mkdir build
+pushd build
+../configure --prefix=%{_prefix} --libdir=%{_libdir}
+make
+popd
+
+
+%install
+pushd build
+make install DESTDIR=$RPM_BUILD_ROOT
+popd
+
+# Package ignores libdir, so fix that.
+mv $RPM_BUILD_ROOT%{_prefix}/lib $RPM_BUILD_ROOT%{_libdir}
+
+
+%files
+%doc README.md COPYING LICENSE
+%{_bindir}/elf2hex
+%{_bindir}/fesvr-eth
+%{_bindir}/fesvr-rs232
+%{_bindir}/fesvr-zedboard
+%{_includedir}/fesvr
+%{_libdir}/libfesvr.so
+%{_libdir}/pkgconfig/riscv-fesvr.pc
+
+
+%changelog