[msp430mcu] Import SRPM from review
rspanton
rspanton at fedoraproject.org
Wed Aug 15 12:02:52 UTC 2012
commit e93be3a817059b7cd84a7fe4b23a37077c5bc3b4
Author: Rob Spanton <rspanton at zepler.net>
Date: Wed Aug 15 13:02:29 2012 +0100
Import SRPM from review
.gitignore | 1 +
msp430mcu-20120406-sf3522088.patch | 25 +++++++++++++
msp430mcu-destdir.patch | 68 ++++++++++++++++++++++++++++++++++++
msp430mcu.spec | 65 ++++++++++++++++++++++++++++++++++
sources | 1 +
5 files changed, 160 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..1e03c4b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/msp430mcu-20120406.tar.bz2
diff --git a/msp430mcu-20120406-sf3522088.patch b/msp430mcu-20120406-sf3522088.patch
new file mode 100644
index 0000000..7141756
--- /dev/null
+++ b/msp430mcu-20120406-sf3522088.patch
@@ -0,0 +1,25 @@
+From 9d8ff420b11fc00b1c410348218a5b72faf72d64 Mon Sep 17 00:00:00 2001
+From: "Peter A. Bigot" <pabigot at users.sourceforge.net>
+Date: Fri, 27 Apr 2012 14:38:31 -0500
+Subject: [PATCH] SF 3522088 msp430mcu install.sh misses a mkdir
+
+---
+ scripts/install.sh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/scripts/install.sh b/scripts/install.sh
+index 74851f1..38dcd42 100755
+--- a/scripts/install.sh
++++ b/scripts/install.sh
+@@ -15,7 +15,7 @@ BINPATH=${PREFIX}/bin
+ INCPATH=${PREFIX}/msp430/include
+ LIBPATH=${PREFIX}/msp430/lib
+
+-mkdir -p ${INCPATH} ${LIBPATH}
++mkdir -p ${INCPATH} ${LIBPATH} ${BINPATH}
+
+ # Upstream headers
+ install -p -m 0644 ${UPSTREAM}/*.h ${INCPATH}
+--
+1.7.7.6
+
diff --git a/msp430mcu-destdir.patch b/msp430mcu-destdir.patch
new file mode 100644
index 0000000..649d56e
--- /dev/null
+++ b/msp430mcu-destdir.patch
@@ -0,0 +1,68 @@
+From 5e7bee811584221b1fd13f4c8d4964cff02562ce Mon Sep 17 00:00:00 2001
+From: Rob Spanton <rspanton at zepler.net>
+Date: Tue, 15 May 2012 23:58:07 +0100
+Subject: [PATCH] Add DESTDIR support to install.sh
+
+When packaging, one normally wants to tell `make install` (or its
+equivalents) a path to prefix all install paths with. This is
+normally done by passing this prefix to it in a DESTDIR variable.
+This patch adjusts install.sh to take a DESTDIR prefix variable to
+make it possible to package the msp430mcu stuff.
+---
+ scripts/install.sh | 19 ++++++++++---------
+ 1 files changed, 10 insertions(+), 9 deletions(-)
+
+diff --git a/scripts/install.sh b/scripts/install.sh
+index 38dcd42..113d1cc 100755
+--- a/scripts/install.sh
++++ b/scripts/install.sh
+@@ -4,6 +4,7 @@
+ # This file is part of msp430mcu (http://sourceforge.net/projects/mspgcc/)
+
+ PREFIX=${1:-/msp430/install/dev}
++DESTDIR=${DESTDIR:-}
+ MSP430MCU_ROOT=${MSP430MCU_ROOT:-${MSP430_ROOT:-/msp430}/msp430mcu}
+ UPSTREAM=${MSP430MCU_ROOT}/upstream
+ ANALYSIS=${MSP430MCU_ROOT}/analysis
+@@ -15,23 +16,23 @@ BINPATH=${PREFIX}/bin
+ INCPATH=${PREFIX}/msp430/include
+ LIBPATH=${PREFIX}/msp430/lib
+
+-mkdir -p ${INCPATH} ${LIBPATH} ${BINPATH}
++mkdir -p ${DESTDIR}${INCPATH} ${DESTDIR}${LIBPATH} ${DESTDIR}${BINPATH}
+
+ # Upstream headers
+-install -p -m 0644 ${UPSTREAM}/*.h ${INCPATH}
++install -p -m 0644 ${UPSTREAM}/*.h ${DESTDIR}${INCPATH}
+
+ # Local override headers
+-install -p -m 0644 ${MSP430MCU_ROOT}/include/*.h ${INCPATH}
++install -p -m 0644 ${MSP430MCU_ROOT}/include/*.h ${DESTDIR}${INCPATH}
+
+ # Override msp430.h to accommodate legacy MSPGCC MCU identifiers
+-install -p -m 0644 ${ANALYSIS}/msp430.h ${INCPATH}
++install -p -m 0644 ${ANALYSIS}/msp430.h ${DESTDIR}${INCPATH}
+
+ # MCU-specific data for GCC driver program
+-install -p -m 0644 ${ANALYSIS}/msp430mcu.spec ${LIBPATH}
++install -p -m 0644 ${ANALYSIS}/msp430mcu.spec ${DESTDIR}${LIBPATH}
+
+ # Install MCU-specific memory and periph maps
+-cp -pr ${ANALYSIS}/ldscripts ${LIBPATH}
+-chmod -R og+rX ${LIBPATH}/ldscripts
++cp -pr ${ANALYSIS}/ldscripts ${DESTDIR}${LIBPATH}
++chmod -R og+rX ${DESTDIR}${LIBPATH}/ldscripts
+
+ # Install utility that tells where everything got installed
+ cat bin/msp430mcu-config.in \
+@@ -41,5 +42,5 @@ cat bin/msp430mcu-config.in \
+ -e 's!@INCPATH@!'"${INCPATH}"'!g' \
+ -e 's!@VERSION@!'"${VERSION}"'!g' \
+ -e 's!@UPSTREAM_VERSION@!'"${UPSTREAM_VERSION}"'!g' \
+-> ${BINPATH}/msp430mcu-config \
+-&& chmod 0755 ${BINPATH}/msp430mcu-config
++> ${DESTDIR}${BINPATH}/msp430mcu-config \
++&& chmod 0755 ${DESTDIR}${BINPATH}/msp430mcu-config
+--
+1.7.7.6
+
diff --git a/msp430mcu.spec b/msp430mcu.spec
new file mode 100644
index 0000000..0e9b5ca
--- /dev/null
+++ b/msp430mcu.spec
@@ -0,0 +1,65 @@
+Name: msp430mcu
+Version: 20120406
+Release: 3%{?dist}
+Summary: Headers and linker scripts for MSP430 micro-controllers
+Group: Development/Libraries
+License: BSD
+URL: http://mspgcc.sf.net/
+
+Source0: http://sourceforge.net/projects/mspgcc/files/msp430mcu/msp430mcu-%{version}.tar.bz2
+
+# LTS patch from
+# http://sourceforge.net/projects/mspgcc/files/mspgcc/mspgcc-20120406.tar.bz2
+Patch0: msp430mcu-%{version}-sf3522088.patch
+
+# Add DESTDIR support -- patch submitted here:
+# http://sourceforge.net/tracker/?func=detail&aid=3527433&group_id=42303&atid=432701
+Patch1: msp430mcu-destdir.patch
+
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+BuildArch: noarch
+
+%description
+Headers and linker scripts for the Texas Instruments MSP430 range of
+micro-controllers. These headers provide the location of all the
+special function registers of the micro-controllers. The linker
+scripts provide the mapping of those registers into memory as well as
+information on where code should be loaded.
+
+%prep
+%setup -T -q -b 0
+%patch0 -p1
+%patch1 -p1
+
+
+%build
+# No build to do
+
+
+%install
+MSP430MCU_ROOT=`pwd` DESTDIR=%{buildroot} ./scripts/install.sh %{_prefix}
+
+%files
+%doc COPYING
+
+%dir %{_prefix}/msp430/include
+%dir %{_prefix}/msp430/lib
+%dir %{_prefix}/msp430/lib/ldscripts
+
+%{_prefix}/msp430/include/*
+%{_prefix}/msp430/lib/ldscripts/*
+%{_prefix}/msp430/lib/msp430mcu.spec
+%{_bindir}/msp430mcu-config
+
+
+%changelog
+* Tue Aug 14 2012 Rob Spanton <rspanton at zepler.net> 20120406-3
+- Remove %%clean section
+- Remove %%defattr line
+- Remove rm -rf %%{buildroot} from %%install section
+
+* Fri May 18 2012 Rob Spanton <rspanton at zepler.net> 20120406-2
+- Complete summary and description fields
+
+* Wed May 16 2012 Rob Spanton <rspanton at zepler.net> 20120406-1
+- Initial release
diff --git a/sources b/sources
index e69de29..ebc9dfa 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+f813c659db2d31be55e63ad7ab90837b msp430mcu-20120406.tar.bz2
More information about the scm-commits
mailing list