[spim] Initial import (#698051)
mikep
mikep at fedoraproject.org
Mon Nov 28 16:01:12 UTC 2011
commit 9e7d5513ee7fbbdc9397014bed1612dbdda856e1
Author: W. Michael Petullo <mike at flyn.org>
Date: Mon Nov 28 10:01:01 2011 -0600
Initial import (#698051)
spim.spec | 78 ++++++++++++++++++++++++++++++++++++++
spimsimulator-Makefile-fix.patch | 47 +++++++++++++++++++++++
2 files changed, 125 insertions(+), 0 deletions(-)
---
diff --git a/spim.spec b/spim.spec
new file mode 100644
index 0000000..483d766
--- /dev/null
+++ b/spim.spec
@@ -0,0 +1,78 @@
+Name: spim
+Version: 20111122
+Release: 0.2.svn%{?dist}
+Summary: An assembly language MIPS32 simulator
+Group: Development/Languages
+License: BSD
+URL: http://spimsimulator.sourceforge.net/
+
+# These source files are generated from SPIM's Subversion repository.
+#
+# Run "svn co https://spimsimulator.svn.sourceforge.net/svnroot/spimsimulator spimsimulator"
+# "cd spimsimulator"
+# For each PROJECT: spim, CPU, and Documentation:
+# "tar czvf spimsimulator-spim-[PROJECT]-[DATE].tar.gz [PROJECT]"
+#
+# The sources are taken from SVN because the upstream tarballs contain
+# compiled code.
+Source0: spimsimulator-spim-20111122.tar.gz
+Source1: spimsimulator-CPU-20111122.tar.gz
+Source2: spimsimulator-Documentation-20111122.tar.gz
+
+# Modify Makefile to respect existing CFLAGS
+# https://sourceforge.net/tracker/?func=detail&aid=3441292&group_id=388698&atid=1614804
+Patch0: spimsimulator-Makefile-fix.patch
+
+BuildRequires: flex bison
+
+%description
+spim is a self-contained simulator that runs MIPS32 programs. It reads and
+executes assembly language programs written for this processor. spim also
+provides a simple debugger and minimal set of operating system services.
+
+%prep
+%setup -q -T -b 0 -c
+%setup -q -T -D -b 1 -c
+%setup -q -T -D -b 2 -c -n spim-%{version}/spim
+%patch0 -p1
+
+# Fix EOL encoding.
+sed 's/\r//' README > README.unix
+touch -r README README.unix
+mv -f README.unix README
+
+# Fix some permissions.
+find . -type f -perm /0111 -print0 | xargs -0 chmod a-x
+
+%build
+CFLAGS="%{optflags}" make %{?_smp_mflags}
+
+%install
+mkdir -p $RPM_BUILD_ROOT%{_bindir}
+make install DESTDIR=$RPM_BUILD_ROOT
+install -p -m 644 -D Documentation/spim.man %{buildroot}%{_mandir}/man1/spim.1
+
+%files
+%{_bindir}/*
+%{_datadir}/%{name}
+%{_mandir}/man1/*
+%doc README Documentation/TeX/spim.ps
+
+%changelog
+* Thu Nov 24 2011 W. Michael Petullo <mike[@]flyn.org> - 20111122-0.1.svn
+- Install README
+- Fix ownership of files in /usr/share
+- Fix permissions
+
+* Tue Nov 22 2011 W. Michael Petullo <mike[@]flyn.org> - 20111122-0.1.svn
+- Update to upstream subversion
+- Add instructions documenting how to create source tarballs
+- Remove Makefile patch; it is upstream
+- Use optflags
+- Fix ownership of man pages
+- BuildRequires flex
+- Fix EOL encoding of README
+- Fix typo in smp_mflags
+
+* Tue Apr 19 2011 W. Michael Petullo <mike[@]flyn.org> - 9.0.5-1
+- Initial package
diff --git a/spimsimulator-Makefile-fix.patch b/spimsimulator-Makefile-fix.patch
new file mode 100644
index 0000000..5965c40
--- /dev/null
+++ b/spimsimulator-Makefile-fix.patch
@@ -0,0 +1,47 @@
+diff -u --recursive spim-vanilla/Makefile spim/Makefile
+--- spim-vanilla/Makefile 2011-11-22 16:03:37.000000000 -0600
++++ spim/Makefile 2011-11-22 20:31:46.639818922 -0600
+@@ -81,20 +81,20 @@
+
+ # SPIM needs flex's -I flag since the scanner is used interactively.
+ # You can set the -8 flag so that funny characters do not hang the scanner.
+-LEXFLAGS = -I -8
++LEXFLAGS += -I -8
+
+
+ # If you use lex, set the variables this way:
+ #MYLEX = lex
+-#LEXFLAGS =
++#LEXFLAGS +=
+
+
+ # SPIM works with either byacc or bison
+ #YACC=byacc
+-#YACCFLAGS = -d
++#YACCFLAGS += -d
+
+ YACC=bison
+-YFLAGS = -d --defines=parser_yacc.h --output=parser_yacc.c -p yy
++YFLAGS += -d --defines=parser_yacc.h --output=parser_yacc.c -p yy
+
+
+ # Size of the segments when spim starts up (data segment must be >= 64K).
+@@ -112,14 +112,14 @@
+ DEFINES = $(MEM_SIZES) -DDEFAULT_EXCEPTION_HANDLER="\"$(EXCEPTION_DIR)/exceptions.s\""
+
+ CC = g++
+-CFLAGS = -I. -I$(CPU_DIR) $(DEFINES) -g -Wall -pedantic -Wextra -Wunused -Wno-write-strings -x c++
+-YCFLAGS =
+-LDFLAGS = -lm
++CFLAGS += -I. -I$(CPU_DIR) $(DEFINES) -g -Wall -pedantic -Wextra -Wunused -Wno-write-strings -x c++
++YCFLAGS +=
++LDFLAGS += -lm
+ CSH = bash
+
+ # lex.yy.c is usually compiled with -O to speed it up.
+
+-LEXCFLAGS = -O $(CFLAGS)
++LEXCFLAGS += -O $(CFLAGS)
+
+
+
More information about the scm-commits
mailing list