summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorWonYoung Choi <wy80.choi@samsung.com>2016-10-04 15:39:10 +0900
committerWonYoung Choi <wy80.choi@samsung.com>2016-10-04 21:36:47 +0900
commitd2a9771966885feeb8c598950ec8b6096931fd5a (patch)
tree2de68ac7d230a4c9ae9688e04c47ea926685dde3 /packaging
parent18daf5abd8174576a51be70205b7966fbbd32685 (diff)
downloadelm-sharp-d2a9771966885feeb8c598950ec8b6096931fd5a.tar.gz
elm-sharp-d2a9771966885feeb8c598950ec8b6096931fd5a.tar.bz2
elm-sharp-d2a9771966885feeb8c598950ec8b6096931fd5a.zip
Use nuget restore to solve dependencies
Change-Id: I9541707be648a37c493dc2715b67dbe45611b888
Diffstat (limited to 'packaging')
-rw-r--r--packaging/elm-sharp.spec61
1 files changed, 12 insertions, 49 deletions
diff --git a/packaging/elm-sharp.spec b/packaging/elm-sharp.spec
index e909818..34f2202 100644
--- a/packaging/elm-sharp.spec
+++ b/packaging/elm-sharp.spec
@@ -1,5 +1,4 @@
%{!?dotnet_assembly_path: %define dotnet_assembly_path /opt/usr/share/dotnet.tizen/framework}
-%{!?dotnet_core_path: %define dotnet_core_path %{_datadir}/tizen.net/ref}
%if 0%{?tizen_build_devel_mode}
%define BUILDCONF Debug
@@ -9,7 +8,7 @@
Name: elm-sharp
Summary: C# Binding for Elementary
-Version: 1.0.4
+Version: 1.0.5
Release: 1
Group: Development/Libraries
License: Apache-2.0
@@ -17,16 +16,9 @@ URL: https://www.tizen.org
Source0: %{name}-%{version}.tar.gz
Source1: %{name}.manifest
-# Mono
BuildRequires: mono-compiler
BuildRequires: mono-devel
-# .NETCore
-%if 0%{?_with_corefx}
-AutoReqProv: no
-BuildRequires: corefx-managed-32b-ref
-%endif
-
BuildRequires: dotnet-build-tools
%description
@@ -39,42 +31,26 @@ cp %{SOURCE1} .
%define Assemblies ElmSharp
%build
-# Build for Net45
for ASM in %{Assemblies}; do
-if [ -e $ASM/$ASM.Net45.csproj ]; then
- xbuild $ASM/$ASM.Net45.csproj \
- /p:Configuration=%{BUILDCONF} \
- /p:DotnetAssemblyPath=%{dotnet_assembly_path}/devel/net45 \
- /p:OutputPath=bin/net45
-fi
-
-# Build for Dotnet
-%if 0%{?_with_corefx}
-if [ -e $ASM/$ASM.csproj ]; then
- xbuild $ASM/$ASM.csproj \
- /p:Configuration=%{BUILDCONF} \
- /p:DotnetAssemblyPath=%{dotnet_assembly_path}/devel/netstandard1.6 \
- /p:CoreFxPath=%{dotnet_core_path} \
- /p:OutputPath=bin/netstandard1.6
-fi
-%endif
-
-# Make NuGet package
-dotnet-gbs pack $ASM/$ASM.nuspec --PackageVersion=%{version} --PackageFiles=$ASM/bin
-
+# NuGet Restore
+find $ASM/*.project.json -exec nuget restore {} \;
+# Build
+find $ASM/*.csproj -exec xbuild {} /p:Configuration=%{BUILDCONF} \;
+# NuGet Pack
+nuget pack $ASM/$ASM.nuspec -Version %{version} -Properties Configuration=%{BUILDCONF}
done
%install
-mkdir -p %{buildroot}%{dotnet_assembly_path}/devel
+# Runtime Binary
+mkdir -p %{buildroot}%{dotnet_assembly_path}
for ASM in %{Assemblies}; do
- cp -fr $ASM/bin/* %{buildroot}%{dotnet_assembly_path}/devel
%if 0%{?_with_corefx}
- install -p -m 644 $ASM/bin/netstandard1.6/$ASM.dll %{buildroot}%{dotnet_assembly_path}
+ install -p -m 644 $ASM/bin/%{BUILDCONF}/$ASM.dll %{buildroot}%{dotnet_assembly_path}
%else
- install -p -m 644 $ASM/bin/net45/$ASM.dll %{buildroot}%{dotnet_assembly_path}
+ install -p -m 644 $ASM/bin/%{BUILDCONF}/Net45/$ASM.dll %{buildroot}%{dotnet_assembly_path}
%endif
done
-
+# NuGet
mkdir -p %{buildroot}/nuget
install -p -m 644 *.nupkg %{buildroot}/nuget
@@ -83,22 +59,9 @@ install -p -m 644 *.nupkg %{buildroot}/nuget
%license LICENSE
%attr(644,root,root) %{dotnet_assembly_path}/*.dll
-%package devel
-Summary: Development package for %{name}
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
-AutoReqProv: no
-
-%description devel
-Development package for %{name}
-
-%files devel
-%{dotnet_assembly_path}/devel/*
-
%package nuget
Summary: NuGet package for %{name}
Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
%description nuget
NuGet package for %{name}