blob: 1d43d81e59fb9c2c6bed6b4ee913053e35440170 (
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
|
%{!?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 DEV_VERSION beta-001
Name: elm-sharp
Summary: C# Binding for Elementary
Version: 1.1.0
Release: 1
Group: Development/Libraries
License: Apache-2.0
URL: https://www.tizen.org
Source0: %{name}-%{version}.tar.gz
Source1: %{name}.manifest
AutoReqProv: no
BuildRequires: mono-compiler
BuildRequires: mono-devel
BuildRequires: dotnet-build-tools
BuildRequires: edje-tools
%description
C# Binding for Elementary
%prep
%setup -q
cp %{SOURCE1} .
%define Assemblies ElmSharp
%build
for ASM in %{Assemblies}; do
# 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}%{?DEV_VERSION:-%{DEV_VERSION}} -Properties Configuration=%{BUILDCONF}
done
edje_cc -id ElmSharp/theme/%{profile}/HD/images/ \
-id ElmSharp/theme/%{profile}/HD/images/User_Input_Elements \
ElmSharp/theme/%{profile}/elm-sharp-theme-%{profile}.edc ElmSharp/theme/elm-sharp-theme.edj
%install
# Runtime Binary
mkdir -p %{buildroot}%{dotnet_assembly_path}
for ASM in %{Assemblies}; do
%if 0%{?_with_corefx}
install -p -m 644 $ASM/bin/%{BUILDCONF}/$ASM.dll %{buildroot}%{dotnet_assembly_path}
%else
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
# Theme
mkdir %{buildroot}%{_datadir}/edje/elm-sharp -p
install -m 644 ElmSharp/theme/elm-sharp-theme.edj %{buildroot}%{_datadir}/edje/elm-sharp/
%files
%manifest %{name}.manifest
%license LICENSE
%attr(644,root,root) %{dotnet_assembly_path}/*.dll
%attr(644,root,root) %{_datadir}/edje/elm-sharp/*.edj
%package nuget
Summary: NuGet package for %{name}
Group: Development/Libraries
%description nuget
NuGet package for %{name}
%files nuget
/nuget/*.nupkg
|