[mono-reflection] initial import

Tom Callaway spot at fedoraproject.org
Wed Jun 29 14:16:18 UTC 2011


commit 454a99ed255fe45054d0a8e980ac341c05024dc9
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date:   Wed Jun 29 10:16:07 2011 -0400

    initial import

 .gitignore                           |    1 +
 mono-reflection-build.patch          |   20 +++++++++
 mono-reflection-make-git-snapshot.sh |   35 ++++++++++++++++
 mono-reflection.pc                   |    8 ++++
 mono-reflection.spec                 |   73 ++++++++++++++++++++++++++++++++++
 sources                              |    1 +
 6 files changed, 138 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..a710747 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/mono-reflection-20110613git304d1d.tar.bz2
diff --git a/mono-reflection-build.patch b/mono-reflection-build.patch
new file mode 100644
index 0000000..cad2c7b
--- /dev/null
+++ b/mono-reflection-build.patch
@@ -0,0 +1,20 @@
+diff -up mono-reflection-201105123git04d1df/Makefile.build mono-reflection-201105123git04d1df/Makefile
+--- mono-reflection-201105123git04d1df/Makefile.build	2011-05-12 16:16:13.291241832 -0400
++++ mono-reflection-201105123git04d1df/Makefile	2011-05-12 16:16:07.841309263 -0400
+@@ -0,0 +1,16 @@
++MCS = mcs
++KEY_FILE = Mono.Reflection.snk
++MCS_FLAGS = -keyfile:$(KEY_FILE)
++BUILD.DIR = bin
++
++all: init
++	$(MCS) $(MCS_FLAGS) @Mono.Reflection.sources /target:library /out:$(BUILD.DIR)/Mono.Reflection.dll
++
++init:
++	mkdir -p $(BUILD.DIR)
++	find Mono.Reflection -name "*.cs" > Mono.Reflection.sources
++
++clean:
++	rm -fr $(BUILD.DIR)
++
++rebuild: clean all
diff --git a/mono-reflection-make-git-snapshot.sh b/mono-reflection-make-git-snapshot.sh
new file mode 100755
index 0000000..8e82d44
--- /dev/null
+++ b/mono-reflection-make-git-snapshot.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# Usage: ./mono-reflection-make-git-snapshot.sh [COMMIT] [DATE]
+#
+# to make a snapshot of the given tag/branch.  Defaults to HEAD.
+# Point env var REF to a local banshee repo to reduce clone time.
+
+if [ -z $2 ]; then
+  DATE=`date +%Y%m%d`
+else
+  DATE=$2
+fi
+
+export DIRNAME="mono-reflection-${DATE}"
+
+echo REF ${REF:+--reference $REF}
+echo DIRNAME ${DIRNAME}
+echo HEAD ${1:-HEAD}
+
+rm -rf ${DIRNAME}
+
+git clone ${REF:+--reference $REF} \
+        https://github.com/jbevain/mono.reflection.git ${DIRNAME}
+
+GITREV=`GIT_DIR=$DIRNAME/.git git rev-parse HEAD| cut -c1-6`
+
+FILENAME=${DIRNAME}git${GITREV}
+
+GIT_DIR=${DIRNAME}/.git git archive --format=tar --prefix=${DIRNAME}/ ${1:-HEAD} \
+        | bzip2 > ${FILENAME}.tar.bz2
+
+rm -rf ${DIRNAME}
+
+echo Generated ${FILENAME}.tar.bz2
+
diff --git a/mono-reflection.pc b/mono-reflection.pc
new file mode 100644
index 0000000..d3f129e
--- /dev/null
+++ b/mono-reflection.pc
@@ -0,0 +1,8 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=@libdir@
+
+Name: mono-reflection
+Description: mono-reflection - Helper Library for Mono Reflection support
+Version: 0.1
+Libs: -r:${libdir}/mono/Mono.Reflection/Mono.Reflection.dll
diff --git a/mono-reflection.spec b/mono-reflection.spec
new file mode 100644
index 0000000..b5f2e5d
--- /dev/null
+++ b/mono-reflection.spec
@@ -0,0 +1,73 @@
+%global debug_package %{nil}
+%global gitrev 304d1d
+%global gitdate 20110613
+
+Name:		mono-reflection
+Version:	0.1
+Release:	0.2.%{gitdate}git%{gitrev}%{?dist}
+Summary:	Helper library for Mono Reflection support
+URL:		https://github.com/jbevain/mono.reflection
+License:	MIT
+Group:		System Environment/Libraries
+# No source tarball, source from git:
+# git clone https://github.com/jbevain/mono.reflection.git
+# Use ./mono-reflection-make-git-snapshot.sh script to reproduce
+Source0:	mono-reflection-%{gitdate}git%{gitrev}.tar.bz2
+Source1:	mono-reflection.pc
+Source2:	mono-reflection-make-git-snapshot.sh
+Patch0:		mono-reflection-build.patch
+BuildRequires:	mono-devel
+
+# Mono only available on these:
+ExclusiveArch: %ix86 x86_64 ppc ppc64 ia64 %{arm} sparcv9 alpha s390x
+
+%description
+Helper library for Mono Reflection support.
+
+%package devel
+Summary:	Development files for Mono.Reflection library
+Group:		Development/Libraries
+Requires:	%{name}%{?_isa} = %{version}-%{release}
+Requires:	pkgconfig
+
+%description devel
+Development files for Mono.Reflection library.
+
+%prep
+%setup -q -n mono-reflection-%{gitdate}
+%patch0 -p1
+chmod -x README
+sed -i 's/\r//' README
+
+# Delete bundled DLL
+rm -rf Test/target.dll
+
+%build
+# Use the mono system key instead of generating our own here.
+cp -a /etc/pki/mono/mono.snk Mono.Reflection.snk
+make LIBDIR=%{_libdir}
+
+%install
+mkdir -p %{buildroot}%{_libdir}/pkgconfig
+cp -p %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig
+sed -i -e 's!@libdir@!%{_libdir}!' $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/mono-reflection.pc
+mkdir -p %{buildroot}%{_libdir}/mono/gac/
+gacutil -i bin/Mono.Reflection.dll -f -package Mono.Reflection -root %{buildroot}%{_libdir}
+
+%files
+%doc README
+%{_libdir}/mono/gac/Mono.Reflection/
+%{_libdir}/mono/Mono.Reflection/
+
+%files devel
+%{_libdir}/pkgconfig/mono-reflection.pc
+
+%changelog
+* Mon Jun 13 2011 Tom Callaway <spot at fedoraproject.org> - 0.1-0.2.20110613git304d1d
+- add script to generate tarball
+- correct git revision
+- add fully versioned Requires for base package in subpackage
+- delete prebuilt DLL during prep
+
+* Thu May 12 2011 Tom Callaway <spot at fedoraproject.org> - 0.1-0.1.201105123git04d1df
+- Initial package creation
diff --git a/sources b/sources
index e69de29..f245a5d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+03a957c77d90d6c737c3a60400f84b25  mono-reflection-20110613git304d1d.tar.bz2


More information about the scm-commits mailing list