[packages/nunit2] - new, partially inspired by Fedora packaging (but suffixed by 2)

qboosh qboosh at pld-linux.org
Mon Feb 1 20:56:32 CET 2016


commit dd1a2744b47c61e58f51c74362b529536a38b2d7
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Feb 1 20:58:45 2016 +0100

    - new, partially inspired by Fedora packaging (but suffixed by 2)

 nunit2-console.sh |   3 ++
 nunit2-gui.sh     |   3 ++
 nunit2.desktop    |  16 ++++++
 nunit2.pc         |   8 +++
 nunit2.spec       | 150 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 180 insertions(+)
---
diff --git a/nunit2.spec b/nunit2.spec
new file mode 100644
index 0000000..9fb4d37
--- /dev/null
+++ b/nunit2.spec
@@ -0,0 +1,150 @@
+Summary:	Unit test framework for CLI
+Summary(pl.UTF-8):	Szkielet testów jednostkowych dla CLI
+Name:		nunit2
+Version:	2.6.4
+Release:	1
+License:	BSD-like
+Group:		Development/Tools
+Source0:	https://github.com/nunit/nunitv2/archive/%{version}/nunitv2-%{version}.tar.gz
+# Source0-md5:	d029438f8e497eabee41c2f8f282fe0b
+Source1:	%{name}.pc
+Source2:	%{name}-gui.sh
+Source3:	%{name}-console.sh
+Source4:	%{name}.desktop
+URL:		http://www.nunit.org/
+BuildRequires:	libgdiplus
+BuildRequires:	mono-devel
+Obsoletes:	nunit-runner
+ExclusiveArch:	%{ix86} %{x8664} arm aarch64 ia64 mips ppc ppc64 s390x sparc sparcv9 sparc64
+ExcludeArch:	i386
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+NUnit is a unit testing framework for all .NET languages. It serves
+the same purpose as JUnit does in the Java world. It supports test
+categories, testing for exceptions and writing test results in plain
+text or XML.
+
+NUnit targets the CLI (Common Language Infrastructure) and supports
+Mono and the Microsoft .NET Framework.
+
+%description -l pl.UTF-8
+NUnit to szkielet do testów jednostkowych dla wszystkich języków .NET.
+Służy do tego samego celu, co JUnit w świecie Javy. Obsługuje
+kategorie testów, testy pod kątem wyjątków oraz zapis wyników testów w
+pliku tekstowym lub XML.
+
+NUnit jest przeznaczony dla CLI (Common Language Infrastructure),
+obsługuje Mono oraz Microsoft .NET Framework.
+
+%package gui
+Summary:	Tools for run NUnit test
+Summary(pl.UTF-8):	Narzędzia do uruchamiania testów jednostkowych NUnit
+Group:		Development/Tools
+Requires:	%{name} = %{version}-%{release}
+
+%description gui
+Desktop application for run NUnit test.
+
+%description gui -l pl.UTF-8
+Graficzna aplikacja do uruchamiania testów NUnit.
+
+%package devel
+Summary:	Development files for NUnit 2.x
+Summary(pl.UTF-8):	Pliki programistyczne pakietu NUnit 2.x
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Development files for NUnit 2.x.
+
+%description devel -l pl.UTF-8
+Pliki programistyczne pakietu NUnit 2.x.
+
+%package doc
+Summary:	Documentation for NUnit 2.x
+Summary(pl.UTF-8):	Dokumentacja do pakietu NUnit 2.x
+Group:		Documentation
+Requires:	%{name} = %{version}-%{release}
+
+%description doc
+Documentation for NUnit 2.x.
+
+%description doc -l pl.UTF-8
+Dokumentacja do pakietu NUnit 2.x.
+
+%prep
+%setup -q -n nunitv2-%{version}
+
+# force .NET 4 to avoid warnings with mono 4
+find . -name "*.csproj" -print -exec sed -i 's#ToolsVersion="3.5"#ToolsVersion="4.0"#g; s#<TargetFrameworkVersion>.*</TargetFrameworkVersion>##g; s#<PropertyGroup>#<PropertyGroup><TargetFrameworkVersion>v4.5</TargetFrameworkVersion>#g' {} \;
+
+%build
+xbuild /property:Configuration=Debug ./src/NUnitCore/core/nunit.core.dll.csproj
+xbuild /property:Configuration=Debug ./src/NUnitCore/interfaces/nunit.core.interfaces.dll.csproj
+xbuild /property:Configuration=Debug ./src/NUnitFramework/framework/nunit.framework.dll.csproj
+xbuild /property:Configuration=Debug ./src/NUnitMocks/mocks/nunit.mocks.csproj
+xbuild /property:Configuration=Debug ./src/ClientUtilities/util/nunit.util.dll.csproj
+xbuild /property:Configuration=Debug ./src/ConsoleRunner/nunit-console/nunit-console.csproj
+xbuild /property:Configuration=Debug ./src/ConsoleRunner/nunit-console-exe/nunit-console.exe.csproj
+xbuild /property:Configuration=Debug ./src/GuiRunner/nunit-gui/nunit-gui.csproj
+xbuild /property:Configuration=Debug ./src/GuiComponents/UiKit/nunit.uikit.dll.csproj
+xbuild /property:Configuration=Debug ./src/GuiException/UiException/nunit.uiexception.dll.csproj
+xbuild /property:Configuration=Debug ./src/GuiRunner/nunit-gui-exe/nunit-gui.exe.csproj
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_prefix}/lib/mono/nunit2,%{_pkgconfigdir},%{_desktopdir},%{_pixmapsdir}}
+
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_pkgconfigdir}/nunit2.pc
+cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/nunit-gui26
+cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/nunit-console26
+cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/nunit2.desktop
+cp src/GuiRunner/nunit-gui-exe/App.ico $RPM_BUILD_ROOT%{_pixmapsdir}/nunit2.ico
+cp -p src/ConsoleRunner/nunit-console-exe/App.config $RPM_BUILD_ROOT%{_prefix}/lib/mono/nunit2/nunit-console.exe.config
+cp -p src/GuiRunner/nunit-gui-exe/App.config $RPM_BUILD_ROOT%{_prefix}/lib/mono/nunit2/nunit.exe.config
+find bin -name \*.dll -exec install "{}" "$RPM_BUILD_ROOT%{_prefix}/lib/mono/nunit2" \;
+find bin -name \*.exe -exec install "{}" "$RPM_BUILD_ROOT%{_prefix}/lib/mono/nunit2" \;
+for i in nunit-console-runner.dll nunit.core.dll nunit.core.interfaces.dll nunit.framework.dll nunit.mocks.dll nunit.util.dll ; do
+	gacutil -i $RPM_BUILD_ROOT%{_prefix}/lib/mono/nunit2/$i -package nunit2 -root $RPM_BUILD_ROOT%{_prefix}/lib
+done
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post gui
+%update_desktop_database
+
+%postun gui
+%update_desktop_database
+
+%files
+%defattr(644,root,root,755)
+%doc README.md license.txt 
+%attr(755,root,root) %{_bindir}/nunit-console26
+%dir %{_prefix}/lib/mono/nunit2
+%{_prefix}/lib/mono/nunit2/nunit-console.exe
+%{_prefix}/lib/mono/nunit2/nunit-console.exe.config
+%{_prefix}/lib/mono/nunit2/*.dll
+%{_prefix}/lib/mono/gac/nunit-console-runner
+%{_prefix}/lib/mono/gac/nunit.core
+%{_prefix}/lib/mono/gac/nunit.core.interfaces
+%{_prefix}/lib/mono/gac/nunit.framework
+%{_prefix}/lib/mono/gac/nunit.mocks
+%{_prefix}/lib/mono/gac/nunit.util
+
+%files gui
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/nunit-gui26
+%{_prefix}/lib/mono/nunit2/nunit.exe
+%{_prefix}/lib/mono/nunit2/nunit.exe.config
+%{_desktopdir}/nunit2.desktop
+%{_pixmapsdir}/nunit2.ico
+
+%files devel
+%defattr(644,root,root,755)
+%{_pkgconfigdir}/nunit2.pc
+
+%files doc
+%defattr(644,root,root,755)
+%doc doc/*
diff --git a/nunit2-console.sh b/nunit2-console.sh
new file mode 100644
index 0000000..23151c8
--- /dev/null
+++ b/nunit2-console.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec /usr/bin/mono /usr/lib/mono/nunit2/nunit-console.exe "$@"
diff --git a/nunit2-gui.sh b/nunit2-gui.sh
new file mode 100644
index 0000000..0f84698
--- /dev/null
+++ b/nunit2-gui.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec /usr/bin/mono /usr/lib/mono/nunit2/nunit.exe "$@"
diff --git a/nunit2.desktop b/nunit2.desktop
new file mode 100644
index 0000000..a636398
--- /dev/null
+++ b/nunit2.desktop
@@ -0,0 +1,16 @@
+[Desktop Entry]
+Version=1.0
+Encoding=UTF-8
+Name=NUnit
+GenericName=GUI for Unit tests
+Comment=A unit-testing framework for all .Net languages
+Exec=nunit-gui26 %F
+TryExec=nunit-gui26
+Icon=nunit.ico
+StartupNotify=true
+Terminal=false
+Type=Application
+MimeType=application/octet-stream;
+Categories=Development;IDE;
+X-Desktop-File-Install-Version=0.22
+
diff --git a/nunit2.pc b/nunit2.pc
new file mode 100644
index 0000000..de42b4f
--- /dev/null
+++ b/nunit2.pc
@@ -0,0 +1,8 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+
+Name: NUnit
+Description: Testing framework for CLI
+Version: 2.6.4
+Libs: -r:${libdir}/mono/nunit2/nunit.core.dll -r:${libdir}/mono/nunit2/nunit.util.dll -r:${libdir}/mono/nunit2/nunit.framework.dll -r:${libdir}/mono/nunit2/nunit.core.interfaces.dll -r:${libdir}/mono/nunit2/nunit.mocks.dll -r:${libdir}/mono/nunit2/nunit-console-runner.dll
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nunit2.git/commitdiff/dd1a2744b47c61e58f51c74362b529536a38b2d7



More information about the pld-cvs-commit mailing list