1 %define dllpath %{_libdir}/mono/tizen
2 %define dllname Tizen.System.dll
4 Name: csapi-tizen.system
5 Summary: Tizen System API for C#
8 Group: Development/Libraries
10 URL: https://www.tizen.org
11 Source0: %{name}-%{version}.tar.gz
12 Source1: %{name}.manifest
13 Source2: %{name}.pc.in
15 # TODO: replace mono-compiler, mono-devel to mcs, mono-shlib-cop
16 BuildRequires: mono-compiler
17 BuildRequires: mono-devel
18 # TODO: replace mono-core to gacutil.
19 # mono-core should provide the symbol 'gacutil'
20 Requires(post): mono-core
21 Requires(postun): mono-core
23 # P/Invoke Dependencies
24 BuildRequires: pkgconfig(capi-system-device)
26 # P/Invoke Runtime Dependencies
27 # TODO: It should be removed after fix tizen-rpm-config
28 Requires: capi-system-device
33 Tizen System Device API for C#
36 Summary: Development package for %{name}
37 Group: Development/Libraries
38 Requires: %{name} = %{version}-%{release}
41 Development package for %{name}
50 mcs -target:library -out:%{dllname} -keyfile:Tizen.System/Tizen.System.snk \
51 Tizen.System/Properties/AssemblyInfo.cs \
52 Tizen.System/System.cs \
53 Tizen.System/Device/EventArgs.cs \
54 Tizen.System/Device/Battery.cs \
55 Tizen.System/Device/Display.cs \
56 Tizen.System/Device/Haptic.cs \
57 Tizen.System/Device/Led.cs \
58 Tizen.System/Device/Power.cs \
59 Tizen.System/Interop/Interop.Device.cs
62 if [ -x %{dllname} ]; then
63 RET=`mono-shlib-cop %{dllname}`; \
64 CNT=`echo $RET | grep -E "^error:" | wc -l`; \
65 if [ $CNT -gt 0 ]; then exit 1; fi
70 mkdir -p %{buildroot}%{dllpath}
71 install -p -m 644 %{dllname} %{buildroot}%{dllpath}
74 mkdir -p %{buildroot}%{_libdir}/pkgconfig
75 sed -e "s#@version@#%{version}#g" \
76 -e "s#@dllpath@#%{dllpath}#g" \
77 -e "s#@dllname@#%{dllname}#g" \
78 %{SOURCE2} > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
81 gacutil -i %{dllpath}/%{dllname}
87 %{_libdir}/pkgconfig/%{name}.pc