File nuget.spec of Package nuget

# spec file for package nuget
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           nuget
Version:        2.8.3
Release:        0
Summary:        DotNet package manager
Group:          Development/Languages/Mono
License:        Apache-2.0
Source0:        %{name}-%{version}.tar.bz2
Source1:        %{name}.sh
Source3:        xdt.tar.gz
# Prevent build process from fetching external packages
Source4:        packages.tgz
BuildArch:      noarch
BuildRequires:  dos2unix
BuildRequires:  mono-devel
# The post install will fail on OBS due to missing network connectivity.
BuildRequires:	-post-build-checks
Requires:       mono-core
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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.

%package devel
Summary:        Development files for NuGet
Group:          Development/Languages/Mono
Requires:       nuget = %{version}

%description devel
This package contains development files for NuGet integration.

%setup -q -n %{name}-%{version} -a 3 -a 4
dos2unix LICENSE.txt
dos2unix COPYRIGHT.txt
dos2unix CREDITS.txt

xbuild /p:Configuration=Release xdt/XmlTransform/Microsoft.Web.XmlTransform.csproj
cp xdt/XmlTransform/obj/Release/Microsoft.Web.XmlTransform.dll* lib/
xbuild Build/Build.proj /p:Configuration=Release /p:TreatWarningsAsErrors=false /tv:4.0 /p:TargetFrameworkVersion=v4.5 /p:Configuration="Mono Release" /t:GoMono

install -d %{buildroot}%{_prefix}/lib/nuget
install -m 0644 src/CommandLine/obj/Mono\ Release/NuGet.exe %{buildroot}%{_prefix}/lib/nuget/
install -m 0644 src/Core/obj/Mono\ Release/NuGet.Core.dll %{buildroot}%{_prefix}/lib/nuget/
install -m 0644 lib/Microsoft.Web.XmlTransform.dll %{buildroot}%{_prefix}/lib/nuget/

install -d %{buildroot}%{_bindir}
install -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/nuget

mkdir -p %{buildroot}%{_datadir}/pkgconfig
cat <<EOF > %{buildroot}%{_datadir}/pkgconfig/nuget-core.pc
Libraries=\${prefix}/lib/nuget/NuGet.Core.dll \${prefix}/lib/nuget/Microsoft.Web.XmlTransform.dll

Name: nuget-core
Description: Library for acessing Microsoft NuGet repositories
Version: %{version}
Libs: -r:\${libdir}/nuget/NuGet.Core.dll -r:\${libdir}/nuget/Microsoft.Web.XmlTransform.dll

mozroots --import --machine --sync
certmgr -ssl -m
certmgr -ssl -m
certmgr -ssl -m

%defattr(-, root, root)
%doc *.txt

%files devel
%defattr(-, root, root)