Update package/nuget version to 1.1.0-beta-001
[platform/core/csapi/tizenfx.git] / packaging / elm-sharp.spec
1 %{!?dotnet_assembly_path: %define dotnet_assembly_path /opt/usr/share/dotnet.tizen/framework}
2
3 %if 0%{?tizen_build_devel_mode}
4 %define BUILDCONF Debug
5 %else
6 %define BUILDCONF Release
7 %endif
8
9 %define DEV_VERSION beta-001
10
11 Name:       elm-sharp
12 Summary:    C# Binding for Elementary
13 Version:    1.1.0
14 Release:    1
15 Group:      Development/Libraries
16 License:    Apache-2.0
17 URL:        https://www.tizen.org
18 Source0:    %{name}-%{version}.tar.gz
19 Source1:    %{name}.manifest
20
21 AutoReqProv: no
22
23 BuildRequires: mono-compiler
24 BuildRequires: mono-devel
25
26 BuildRequires: dotnet-build-tools
27 BuildRequires: edje-tools
28
29 %description
30 C# Binding for Elementary
31
32 %prep
33 %setup -q
34 cp %{SOURCE1} .
35
36 %define Assemblies ElmSharp
37
38 %build
39 for ASM in %{Assemblies}; do
40 # NuGet Restore
41 find $ASM/*.project.json -exec nuget restore {} \;
42 # Build
43 find $ASM/*.csproj -exec xbuild {} /p:Configuration=%{BUILDCONF} \;
44 # NuGet Pack
45 nuget pack $ASM/$ASM.nuspec -Version %{version}%{?DEV_VERSION:-%{DEV_VERSION}} -Properties Configuration=%{BUILDCONF}
46 done
47
48 edje_cc -id ElmSharp/theme/%{profile}/HD/images/ \
49         -id ElmSharp/theme/%{profile}/HD/images/User_Input_Elements \
50         ElmSharp/theme/%{profile}/elm-sharp-theme-%{profile}.edc ElmSharp/theme/elm-sharp-theme.edj
51
52 %install
53 # Runtime Binary
54 mkdir -p %{buildroot}%{dotnet_assembly_path}
55 for ASM in %{Assemblies}; do
56 %if 0%{?_with_corefx}
57   install -p -m 644 $ASM/bin/%{BUILDCONF}/$ASM.dll %{buildroot}%{dotnet_assembly_path}
58 %else
59   install -p -m 644 $ASM/bin/%{BUILDCONF}/Net45/$ASM.dll %{buildroot}%{dotnet_assembly_path}
60 %endif
61 done
62 # NuGet
63 mkdir -p %{buildroot}/nuget
64 install -p -m 644 *.nupkg %{buildroot}/nuget
65 # Theme
66 mkdir %{buildroot}%{_datadir}/edje/elm-sharp -p
67 install -m 644 ElmSharp/theme/elm-sharp-theme.edj %{buildroot}%{_datadir}/edje/elm-sharp/
68
69 %files
70 %manifest %{name}.manifest
71 %license LICENSE
72 %attr(644,root,root) %{dotnet_assembly_path}/*.dll
73 %attr(644,root,root) %{_datadir}/edje/elm-sharp/*.edj
74
75 %package nuget
76 Summary:   NuGet package for %{name}
77 Group:     Development/Libraries
78
79 %description nuget
80 NuGet package for %{name}
81
82 %files nuget
83 /nuget/*.nupkg