[packages/nuget] - new, partially inspired by Fedora packaging
qboosh
qboosh at pld-linux.org
Tue Feb 2 18:47:16 CET 2016
commit e23030bbf9f4d4e6f8a9dd196a9f27d28045bd91
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Feb 2 18:49:38 2016 +0100
- new, partially inspired by Fedora packaging
nuget-core.pc | 11 ++++++
nuget-fix_xdt_hintpath | 26 +++++++++++++
nuget.sh | 2 +
nuget.spec | 101 +++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 140 insertions(+)
---
diff --git a/nuget.spec b/nuget.spec
new file mode 100644
index 0000000..848bdec
--- /dev/null
+++ b/nuget.spec
@@ -0,0 +1,101 @@
+Summary: Package manager for .NET/Mono development platform
+Summary(pl.UTF-8): Zarządca pakietów dla platformy programistycznej .NET/Mono
+Name: nuget
+Version: 2.8.7
+Release: 1
+License: Apache v2.0
+Group: Development/Tools
+%define veradd md510+dhx1
+#Source0: http://download.mono-project.com/sources/nuget/%{name}_%{version}+%{veradd}.orig.tar.bz2
+Source0: https://launchpad.net/ubuntu/+archive/primary/+files/%{name}_%{version}+%{veradd}.orig.tar.bz2
+# Source0-md5: 0fe8090470bf35f44f705c94d7150037
+Source1: %{name}-core.pc
+Source2: %{name}.sh
+Patch0: %{name}-fix_xdt_hintpath
+URL: http://nuget.org/
+BuildRequires: mono-devel >= 4.0
+BuildRequires: sed >= 4.0
+Requires: dotnet-nuget = %{version}-%{release}
+ExclusiveArch: %{ix86} %{x8664} arm aarch64 ia64 mips ppc ppc64 s390x sparc sparcv9 sparc64
+ExcludeArch: i386
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+NuGet is the package manager for the Microsoft development platform
+including .NET. The NuGet client tools provide the ability to produce
+and consume packages. The NuGet Gallery is the central package
+repository used by all package authors and consumers.
+
+%description -l pl.UTF-8
+NuGet to zarządca pakietów dla platformy programistycznej platformy
+Microsoft, w tym .NET. Narzędzia klienckie NuGet pozwalają produkować
+i konsumować pakiety. NuGet Gallery to centralne repozytorium pakietów
+używane przez wszystkich autorów i konsumentów pakietów.
+
+%package -n dotnet-nuget
+Summary: NuGet package manager library for .NET
+Summary(pl.UTF-8): Biblioteka zarządców pakietów NuGet dla .NET
+Group: Libraries
+Requires: mono >= 4.0
+
+%description -n dotnet-nuget
+NuGet package manager library for .NET.
+
+%description -n dotnet-nuget -l pl.UTF-8
+Biblioteka zarządców pakietów NuGet dla .NET.
+
+%package -n dotnet-nuget-devel
+Summary: Development files for NuGet .NET library
+Summary(pl.UTF-8): Pliki programistyczne biblioteki .NET NuGet
+Group: Development/Libraries
+Requires: dotnet-nuget = %{version}-%{release}
+Obsoletes: nuget-devel
+
+%description -n dotnet-nuget-devel
+Development files for NuGet .NET library.
+
+%description -n dotnet-nuget-devel -l pl.UTF-8
+Pliki programistyczne biblioteki .NET NuGet.
+
+%prep
+%setup -qn %{name}-git
+%{__sed} -i "s/\r//g" src/Core/Core.csproj
+%patch0 -p1
+
+# fix compile with Mono4
+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 xdt/XmlTransform/Microsoft.Web.XmlTransform.csproj
+xbuild src/Core/Core.csproj /p:Configuration="Mono Release"
+xbuild src/CommandLine/CommandLine.csproj /p:Configuration="Mono Release"
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_pkgconfigdir},%{_prefix}/lib/mono/nuget}
+
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_pkgconfigdir}/nuget-core.pc
+cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/nuget
+
+cp -p src/CommandLine/bin/Release/NuGet.Core.dll $RPM_BUILD_ROOT%{_prefix}/lib/mono/nuget
+cp -p xdt/XmlTransform/bin/Debug/Microsoft.Web.XmlTransform.dll $RPM_BUILD_ROOT%{_prefix}/lib/mono/nuget
+cp -p src/CommandLine/bin/Release/NuGet.exe $RPM_BUILD_ROOT%{_prefix}/lib/mono/nuget
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc COPYRIGHT.txt CREDITS.txt acknowledgements.md changelog.md
+%attr(755,root,root) %{_bindir}/nuget
+%{_prefix}/lib/mono/nuget/NuGet.exe
+
+%files -n dotnet-nuget
+%defattr(644,root,root,755)
+%dir %{_prefix}/lib/mono/nuget
+%{_prefix}/lib/mono/nuget/Microsoft.Web.XmlTransform.dll
+%{_prefix}/lib/mono/nuget/NuGet.Core.dll
+
+%files -n dotnet-nuget-devel
+%defattr(644,root,root,755)
+%{_pkgconfigdir}/nuget-core.pc
diff --git a/nuget-core.pc b/nuget-core.pc
new file mode 100644
index 0000000..cdf50e9
--- /dev/null
+++ b/nuget-core.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include
+Libraries=${prefix}/lib/mono/nuget/NuGet.Core.dll ${prefix}/lib/mono/nuget/Microsoft.Web.XmlTransform.dll
+
+Name: nuget-core
+Description: nuget-core - Library for acessing Microsoft NuGet repositories
+Version: 2.8.7
+Libs: -r:${prefix}/lib/mono/nuget/NuGet.Core.dll -r:${prefix}/lib/mono/nuget/Microsoft.Web.XmlTransform.dll
+
diff --git a/nuget-fix_xdt_hintpath b/nuget-fix_xdt_hintpath
new file mode 100644
index 0000000..58461dc
--- /dev/null
+++ b/nuget-fix_xdt_hintpath
@@ -0,0 +1,26 @@
+Index: xamarin-pkg-nuget/src/CommandLine/CommandLine.csproj
+===================================================================
+--- xamarin-pkg-nuget.orig/src/CommandLine/CommandLine.csproj 2015-01-15 19:30:44.346864746 +0000
++++ xamarin-pkg-nuget/src/CommandLine/CommandLine.csproj 2015-02-26 11:10:38.114087193 +0000
+@@ -32,7 +32,7 @@
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="Microsoft.Web.XmlTransform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+- <HintPath>..\..\lib\Microsoft.Web.XmlTransform.dll</HintPath>
++ <HintPath>..\..\xdt\XmlTransform\bin\Debug\Microsoft.Web.XmlTransform.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition" />
+Index: xamarin-pkg-nuget/src/Core/Core.csproj
+===================================================================
+--- xamarin-pkg-nuget.orig/src/Core/Core.csproj 2015-02-26 11:01:59.642076980 +0000
++++ xamarin-pkg-nuget/src/Core/Core.csproj 2015-02-26 11:10:26.654086967 +0000
+@@ -220,7 +220,7 @@
+ <Compile Include="Utility\WebRequestEventArgs.cs" />
+ <Compile Include="FileModifiers\XdtTransformer.cs" />
+ <Reference Include="Microsoft.Web.XmlTransform">
+- <HintPath>..\..\lib\Microsoft.Web.XmlTransform.dll</HintPath>
++ <HintPath>..\..\xdt\XmlTransform\bin\Debug\Microsoft.Web.XmlTransform.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.DataAnnotations" />
diff --git a/nuget.sh b/nuget.sh
new file mode 100644
index 0000000..2903498
--- /dev/null
+++ b/nuget.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/mono /usr/lib/mono/nuget/NuGet.exe "$@"
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nuget.git/commitdiff/e23030bbf9f4d4e6f8a9dd196a9f27d28045bd91
More information about the pld-cvs-commit
mailing list