summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorKangho Hur <kangho.hur@samsung.com>2016-12-16 02:00:07 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 04:34:24 (GMT)
commita2e67107402bc5a49d73cee9062bcd7dbe4069e7 (patch)
treeea6c6606567e8440397de192d47195194c0266dd /packaging
parent509954d0a013acdf7508644c1fb394bea626e587 (diff)
downloadxamarin-forms-a2e67107402bc5a49d73cee9062bcd7dbe4069e7.zip
xamarin-forms-a2e67107402bc5a49d73cee9062bcd7dbe4069e7.tar.gz
xamarin-forms-a2e67107402bc5a49d73cee9062bcd7dbe4069e7.tar.bz2
Add Tizen backend renderer
- Xamarin.Forms.Platform.Tizen has been added - Xamarin.Forms.Maps.Tizen has been added - RPM build spec has been added Change-Id: I0021e0f040d97345affc87512ee0f6ce437f4e6d
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/custom-find-requires12
-rwxr-xr-xpackaging/xamarin-forms-tizen.manifest5
-rw-r--r--packaging/xamarin-forms-tizen.spec94
3 files changed, 111 insertions, 0 deletions
diff --git a/packaging/custom-find-requires b/packaging/custom-find-requires
new file mode 100755
index 0000000..ebd22cb
--- /dev/null
+++ b/packaging/custom-find-requires
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+if [ -z "$RPM_BUILD_ROOT" ] ; then
+ echo "The $0 script is not intended to be executed directly." > /dev/stderr
+ exit 1
+fi
+
+# this grep will consume whole list of files from stdin
+if grep -qF /Xamarin.Forms.Platform.Tizen.dll ; then
+ # if it's a X.F.P.Tizen package, then find the version of elm-sharp (or elm-sharp-nuget) in use
+ rpm -qa --queryformat 'elm-sharp >= %{VERSION}\n' 'elm-sharp*' | head -n1
+fi
diff --git a/packaging/xamarin-forms-tizen.manifest b/packaging/xamarin-forms-tizen.manifest
new file mode 100755
index 0000000..75b0fa5
--- /dev/null
+++ b/packaging/xamarin-forms-tizen.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/xamarin-forms-tizen.spec b/packaging/xamarin-forms-tizen.spec
new file mode 100644
index 0000000..074629b
--- /dev/null
+++ b/packaging/xamarin-forms-tizen.spec
@@ -0,0 +1,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.175
+#%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