summaryrefslogtreecommitdiff
path: root/packaging/xamarin-forms-tizen.spec
blob: 671b400cd97e892b3ed169c333b8c6c36495e3f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
%{!?dotnet_assembly_path: %define dotnet_assembly_path /opt/usr/share/dotnet.tizen/framework}

%if 0%{?tizen_build_devel_mode}
%define BUILDCONF Debug
%else
%define BUILDCONF Release
%endif

%define XF_VERSION 2.3.3.168
#%define XF_PRETAG pre3

# Increase this XF_TIZEN_VERSION when any public APIs of Xamarin.Forms.Platform.Tizen are changed.
%define XF_TIZEN_VERSION b01

Name: xamarin-forms-tizen
Summary: Xamarin.Forms for Tizen platform
Version: %{XF_VERSION}
Release: %{XF_TIZEN_VERSION}
License: MIT
Group: Graphics & UI Framework/Libraries
Source0: %{name}-%{version}.tar.gz
Source1: %{name}.manifest

%define NUPKG_VERSION %{XF_VERSION}%{?XF_PRETAG:-%{XF_PRETAG}}-%{XF_TIZEN_VERSION}

# Instead of disabling Automatic Dependencies completely with `AutoReqProv: no'
# let's override Mono provided portion
%define __mono_requires %{_builddir}/%name-%version/packaging/custom-find-requires

ExcludeArch: aarch64 %ix86

BuildRequires: mono-compiler
BuildRequires: mono-devel
BuildRequires: referenceassemblies-pcl

BuildRequires: dotnet-build-tools

# C# API Requires
BuildRequires: csapi-tizen-nuget
BuildRequires: csapi-application-nuget
BuildRequires: elm-sharp-nuget

%description
Allows one to use portable controls subsets that are mapped to native
controls of Android, iOS, Windows Phone, and Tizen.

%prep
%setup -q
cp %{SOURCE1} .

%build
# Restore NuGet Dependencies
find . -name *.Tizen.project.json -print0 | xargs -n1 -0 nuget restore

# Build
xbuild Xamarin.Forms.Tizen.sln \
    /p:Configuration=%{BUILDCONF} \
    /p:PackageSources=/nuget

# Create NuGet Packages
nuget pack .nuspec/Xamarin.Forms.Platform.Tizen.nuspec \
    -BasePath ./.nuspec -Version %{NUPKG_VERSION} \
    -Properties "Configuration=%{BUILDCONF}"

%install
function install_asm()
{
  mkdir -p %{buildroot}%{dotnet_assembly_path}
  install -p -m 644 $1/bin/%{BUILDCONF}/$1.dll %{buildroot}%{dotnet_assembly_path}
}

install_asm Xamarin.Forms.Core
install_asm Xamarin.Forms.Xaml
install_asm Xamarin.Forms.Platform
install_asm Xamarin.Forms.Platform.Tizen

mkdir -p %{buildroot}/nuget
install -p -m 644 *.nupkg %{buildroot}/nuget

%files
%manifest %{name}.manifest
%license LICENSE
%attr(644,root,root) %{dotnet_assembly_path}/*.dll

%package nuget
Summary:   NuGet package for %{name}
Group:     Development/Libraries
Requires:  %{name} = %{version}-%{release}

%description nuget
NuGet package for %{name}

%files nuget
/nuget/*.nupkg