nunit-vl.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. Name: nunit
  2. Version: 2.6.4
  3. Release: 2%{?_dist_release}
  4. Summary: Unit-testing framework for all .NET languages
  5. Summary(ja): .NET 向けのユニットテストフレームワーク
  6. License: Zlib
  7. Url: http://www.nunit.org/
  8. Group: Development/Tools
  9. Source0: https://github.com/nunit/nunitv2/archive/%{version}.tar.gz
  10. Source10: mono-find-requires
  11. BuildRoot: %{_tmppath}/%{name}-%{version}-build
  12. BuildArch: noarch
  13. BuildRequires: mono-devel dos2unix libgdiplus-devel
  14. #%if 0%{?fedora_version} strace
  15. #BuildRequires: xorg-x11-fonts-truetype
  16. #%endif
  17. %global __mono_requires %{SOURCE10}
  18. %description
  19. NUnit is a unit testing framework for all .NET languages. It serves the
  20. same purpose as JUnit does in the Java world. It supports test
  21. categories, testing for exceptions and writing test results in plain
  22. text or XML.
  23. %package devel
  24. Summary: Development files for NUnit
  25. Summary(ja): NUnit の開発用ファイル
  26. Group: Development/Libraries
  27. Requires: nunit = %{version}-%{release}
  28. %description devel
  29. This package contains development files for NUnit integration.
  30. %prep
  31. %setup -q -n nunitv2-%{version}
  32. chmod +x %{SOURCE10}
  33. %build
  34. xbuild nunit.sln /t:Build /p:Configuration=Debug
  35. %install
  36. rm -rf %{buildroot}
  37. mkdir -p "%{buildroot}%{_prefix}/lib/nunit"
  38. cp -a bin/Debug/* "%{buildroot}%{_prefix}/lib/nunit"
  39. #mkdir -p "%{buildroot}%{_docdir}/%{name}"
  40. #cp -a license.txt "%{buildroot}%{_docdir}/%{name}/"
  41. #cp -a doc "%{buildroot}%{_docdir}/%{name}/"
  42. #cp -a samples "%{buildroot}%{_docdir}/%{name}/"
  43. rm -rf docs_to_include
  44. mkdir -p docs_to_include
  45. cp -a license.txt docs_to_include
  46. cp -a doc docs_to_include
  47. cp -a samples docs_to_include
  48. pushd docs_to_include
  49. find . -type f -exec dos2unix {} \;
  50. popd
  51. mkdir -p "%{buildroot}%{_bindir}"
  52. echo '#!/bin/sh
  53. exec /usr/bin/mono %{_prefix}/lib/nunit/nunit.exe "$@"' > "%{buildroot}%{_bindir}/nunit"
  54. chmod +x "%{buildroot}%{_bindir}/nunit"
  55. #cd %{buildroot}%{_docdir}/%{name}/
  56. #find . -type f -exec dos2unix {} \;
  57. for i in nunit.core.dll nunit.core.interfaces.dll nunit.framework.dll nunit.util.dll lib/nunit-console-runner.dll lib/nunit-gui-runner.dll lib/nunit.uiexception.dll lib/nunit.uikit.dll framework/nunit.mocks.dll ; do
  58. gacutil -i %{buildroot}%{_prefix}/lib/nunit/$i -package nunit -root %{buildroot}%{_prefix}/lib
  59. rm -f %{buildroot}%{_prefix}/lib/nunit/$i
  60. done
  61. mkdir -p %{buildroot}%{_datadir}/pkgconfig
  62. cat <<EOF > %{buildroot}%{_datadir}/pkgconfig/nunit.pc
  63. prefix=%{_prefix}
  64. exec_prefix=\${prefix}
  65. libdir=\${exec_prefix}/lib
  66. pkglibdir=\${prefix}/lib/mono/nunit
  67. Name: NUnit
  68. Description: Testing framework for .NET
  69. Version: %{version}
  70. Libs: -r:\${pkglibdir}/nunit.core.dll -r:\${pkglibdir}/nunit.core.interfaces.dll -r:\${pkglibdir}/nunit.framework.dll -r:\${pkglibdir}/nunit.util.dll r:\${pkglibdir}/nunit-console-runner.dll r:\${pkglibdir}/nunit-gui-runner.dll r:\${pkglibdir}/nunit.uiexception.dll r:\${pkglibdir}/nunit.uikit.dll r:\${pkglibdir}/nunit.mocks.dll
  71. EOF
  72. #fdupes %{buildroot}%{_prefix}
  73. %clean
  74. rm -rf %{buildroot}
  75. %files
  76. %defattr(-,root,root)
  77. %doc docs_to_include/*
  78. %{_bindir}/nunit
  79. %{_prefix}/lib/nunit
  80. %{_prefix}/lib/mono/nunit
  81. %{_prefix}/lib/mono/gac/nunit*
  82. #{_docdir}/nunit
  83. %files devel
  84. %defattr(-, root, root)
  85. %{_datadir}/pkgconfig/nunit.pc
  86. %changelog
  87. * Tue May 26 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 2.6.4-2
  88. - initial build for VineLinux
  89. * Mon Dec 22 2014 mailaender@opensuse.org
  90. - avoid the broken release ZIP file https://github.com/nunit/nunitv2/issues/35
  91. - fix the pkgconfig file for MonoDevelop
  92. - build with Debug symbols
  93. - place copies into the global assembly cache
  94. * Sun Dec 21 2014 mailaender@opensuse.org
  95. - initial packaging