Fix a SupportedCodecs issue causing application abortion
[platform/core/csapi/tizenfx.git] / packaging / csapi-multimedia.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 Name:       csapi-multimedia
10 Summary:    Tizen Multimedia API for C#
11 Version:    1.0.14
12 Release:    0
13 Group:      Development/Libraries
14 License:    Apache-2.0
15 URL:        https://www.tizen.org
16 Source0:    %{name}-%{version}.tar.gz
17 Source1:    %{name}.manifest
18
19 AutoReqProv: no
20
21 BuildRequires: mono-compiler
22 BuildRequires: mono-devel
23
24 BuildRequires: dotnet-build-tools
25
26 # C# API Requries
27 BuildRequires: csapi-tizen-nuget
28 BuildRequires: elm-sharp-nuget
29
30 %description
31 Tizen Multimedia API for C#
32
33 %prep
34 %setup -q
35 cp %{SOURCE1} .
36
37 %define Assemblies Tizen.Multimedia
38
39 %build
40 for ASM in %{Assemblies}; do
41 # NuGet Restore
42 find $ASM/*.project.json -exec nuget restore {} \;
43 # Build
44 find $ASM/*.csproj -exec xbuild {} /p:Configuration=%{BUILDCONF} \;
45 # NuGet Pack
46 nuget pack $ASM/$ASM.nuspec -Version %{version} -Properties Configuration=%{BUILDCONF}
47 done
48
49 %install
50 # Runtime Binary
51 mkdir -p %{buildroot}%{dotnet_assembly_path}
52 for ASM in %{Assemblies}; do
53 %if 0%{?_with_corefx}
54   install -p -m 644 $ASM/bin/%{BUILDCONF}/$ASM.dll %{buildroot}%{dotnet_assembly_path}
55 %else
56   install -p -m 644 $ASM/bin/%{BUILDCONF}/Net45/$ASM.dll %{buildroot}%{dotnet_assembly_path}
57 %endif
58 done
59 # NuGet
60 mkdir -p %{buildroot}/nuget
61 install -p -m 644 *.nupkg %{buildroot}/nuget
62
63 %files
64 %manifest %{name}.manifest
65 %license LICENSE
66 %attr(644,root,root) %{dotnet_assembly_path}/*.dll
67
68 %package nuget
69 Summary:   NuGet package for %{name}
70 Group:     Development/Libraries
71
72 %description nuget
73 NuGet package for %{name}
74
75 %files nuget
76 /nuget/*.nupkg