[simulavr] Hack simulavr-1.0.0 to build from git repo tarball

Hans Ulrich Niedermann ndim at fedoraproject.org
Tue Aug 7 08:12:20 UTC 2012


commit 2b67f66521127368a3a325c4ad1274c837912ee1
Author: Hans Ulrich Niedermann <hun at n-dimensional.de>
Date:   Tue Aug 7 10:10:55 2012 +0200

    Hack simulavr-1.0.0 to build from git repo tarball

 get-patches.sh                                     |    2 +-
 simulavr-0.1.2.7-reset-LDFLAGS.patch               |   27 ----
 ...eck-script-add-config-value-for-msys-and-.patch |   52 ------
 ...G-2.0.x-but-SWIG-1.3.x-as-fallback-update.patch |  163 --------------------
 ...-error-__builtin_avr_delay_cycles-expects.patch |   34 ----
 simulavr-0004-Removed-debugging-message.patch      |   27 ----
 simulavr.spec                                      |   52 +++++--
 sources                                            |    2 +-
 8 files changed, 39 insertions(+), 320 deletions(-)
---
diff --git a/get-patches.sh b/get-patches.sh
index 0ee3337..b4d27e6 100755
--- a/get-patches.sh
+++ b/get-patches.sh
@@ -56,7 +56,7 @@ n=1
 while read patch
 do
 	srcpatch="$(dirname "$patch")/${name}-$(basename "$patch")"
-	${SED-sed} -e '1d' -e '/^-- $/,$d' "$patch" > "$srcpatch"
+	${SED-sed} -e '1d' -e '/^-- $/,$d' "$patch" | filterdiff -p1 -x delivery-check -x delivery-check.conf.sample -x doc/build.rst > "$srcpatch"
 	rm -f "$patch"
 	comment="$(sed -n 's/^Fedora-Spec-Comment:\s*//p' "$srcpatch")"
 	if test "x$comment" = "x"; then comment="Unspecified patch, possibly upstream fixes or Fedora specific"; fi
diff --git a/simulavr.spec b/simulavr.spec
index a8412d7..2080d20 100644
--- a/simulavr.spec
+++ b/simulavr.spec
@@ -5,15 +5,17 @@
 %global noarch_subpackage %{nil}
 %endif
 
+%define _configure ../configure
+
 
 Name:		simulavr
 Version:	1.0.0
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	An AVR Simulator
 
 Group:		Development/Tools
 License:	GPLv2+
-URL:		http://savannah.nongnu.org/projects/simulavr/
+URL:		http://www.nongnu.org/simulavr/
 
 
 # A few remarks on simulavr source tarballs and patches:
@@ -25,7 +27,19 @@ URL:		http://savannah.nongnu.org/projects/simulavr/
 # Conclusions:
 #  * We can't just easily cherry-pick a few patches and apply them
 #    on top of the simulavr-1.0.0.tar.gz code.
-Source0:	http://download.savannah.nongnu.org/releases/simulavr/%{name}-%{version}.tar.gz
+#  * We build our own simulavr-1.0.0.tar.gz.
+#
+# Source0:	http://download.savannah.nongnu.org/releases/simulavr/%{name}-%{version}.tar.gz
+#
+# Tarball build instruction:
+#  $ git clone git://github.com/ndim/simulavr.git
+#  $ cd simulavr
+#  $ git checkout ndim-fedora-1.0.0 # for further development
+#  $ git checkout d0022ca832a32f44201c8b23b40df204bf7ab464 # for simulavr-1.0.0
+#  $ autoreconf -vis .
+#  $ ./configure --prefix=$PWD/_i
+#  $ make distcheck
+Source0: %{name}-%{version}.tar.gz
 
 
 # For the source of the Fedora specific patches, see the respective
@@ -44,17 +58,17 @@ Source0:	http://download.savannah.nongnu.org/releases/simulavr/%{name}-%{version
 #
 # start of autogenerated patch tag list
 # Unspecified patch, possibly upstream fixes or Fedora specific
-#   delivery-check script: add config value for msys and
-Patch1: simulavr-0001-delivery-check-script-add-config-value-for-msys-and-.patch
-# Unspecified patch, possibly upstream fixes or Fedora specific
 #   support SWIG 2.0.x (but SWIG 1.3.x as fallback), update
-Patch2: simulavr-0002-support-SWIG-2.0.x-but-SWIG-1.3.x-as-fallback-update.patch
+#Patch1: simulavr-0001-support-SWIG-2.0.x-but-SWIG-1.3.x-as-fallback-update.patch
 # Unspecified patch, possibly upstream fixes or Fedora specific
 #   Fix compile error "__builtin_avr_delay_cycles expects an
-Patch3: simulavr-0003-Fix-compile-error-__builtin_avr_delay_cycles-expects.patch
+#Patch2: simulavr-0002-Fix-compile-error-__builtin_avr_delay_cycles-expects.patch
 # Unspecified patch, possibly upstream fixes or Fedora specific
 #   Removed debugging message
-Patch4: simulavr-0004-Removed-debugging-message.patch
+#Patch3: simulavr-0003-Removed-debugging-message.patch
+# Unspecified patch, possibly upstream fixes or Fedora specific
+#   Add simulavr_wrap.cxx to BUILT_SOURCES
+#Patch4: simulavr-0004-Add-simulavr_wrap.cxx-to-BUILT_SOURCES.patch
 # end of autogenerated patch tag list
 
 
@@ -95,26 +109,30 @@ This subpackage contains the documentation in HTML and PDF format.
 
 
 %prep
-%setup -q
+%setup
 # start of autogenerated prep patch list
-%patch1 -p1 -b .delivery_check_script_add_config_value_for_msys_and_
-%patch2 -p1 -b .support_SWIG_2_0_x_but_SWIG_1_3_x_as_fallback_update
-%patch3 -p1 -b .Fix_compile_error_builtin_avr_delay_cycles_expects
-%patch4 -p1 -b .Removed_debugging_message
+#patch1 -p1 -b .support_SWIG_2_0_x_but_SWIG_1_3_x_as_fallback_update
+#patch2 -p1 -b .Fix_compile_error_builtin_avr_delay_cycles_expects
+#patch3 -p1 -b .Removed_debugging_message
+#patch4 -p1 -b .Add_simulavr_wrap_cxx_to_BUILT_SOURCES
 # end of autogenerated prep patch list
-autoreconf -vis .
+# autoreconf -vis .
 
 
 %build
+mkdir _build
+cd _build
 %configure
 # FIXME: Skip -Werror for now, as flex generated code ignores
 # fwrite(3) return value which generates a warning.
 # FIXME: Fix doc build race conditions exposed by ${?_smp_mflags}.
 make ENABLE_WARNINGS="-Wall -Winline"
+make ENABLE_WARNINGS="-Wall -Winline" MAKE_SECOND_TIME=yes
 
 
 %install
 rm -rf "%{buildroot}"
+cd _build
 make install DESTDIR="%{buildroot}"
 rm -f "%{buildroot}%{_infodir}/dir"
 # Caution: We will not notice when anything new appears in docdir.
@@ -127,6 +145,7 @@ rm -rf "%{buildroot}"
 
 
 %check
+cd _build
 make DESTDIR="%{buildroot}" check
 
 
@@ -163,6 +182,9 @@ fi
 
 
 %changelog
+* Tue Aug  7 2012 Hans Ulrich Niedermann <hun at n-dimensional.de> - 1.0.0-2
+- Hack simulavr-1.0.0 to build (tarball built from ndim's git repo)
+
 * Tue Jul 24 2012 Hans Ulrich Niedermann <hun at n-dimensional.de> - 1.0.0-1
 - Update to simulavr-1.0.0
 
diff --git a/sources b/sources
index 6942c29..0afe085 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-9482c7b221b1056932b7190006aab806  simulavr-1.0.0.tar.gz
+098e08f3c6d397ca1d4d97ab617082b3  simulavr-1.0.0.tar.gz


More information about the scm-commits mailing list