1 %define dllpath %{_libdir}/mono/tizen
2 %define dllname Tizen.dll
5 Summary: Tizen 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(dlog)
26 # P/Invoke Runtime Dependencies
27 # TODO: It should be removed after fix tizen-rpm-config
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/Tizen.snk \
51 Tizen/Properties/AssemblyInfo.cs \
56 if [ -x %{dllname} ]; then
57 RET=`mono-shlib-cop %{dllname}`; \
58 CNT=`echo $RET | grep -E "^error:" | wc -l`; \
59 if [ $CNT -gt 0 ]; then exit 1; fi
64 mkdir -p %{buildroot}%{dllpath}
65 install -p -m 644 %{dllname} %{buildroot}%{dllpath}
68 mkdir -p %{buildroot}%{_libdir}/pkgconfig
69 sed -e "s#@version@#%{version}#g" \
70 -e "s#@dllpath@#%{dllpath}#g" \
71 -e "s#@dllname@#%{dllname}#g" \
72 %{SOURCE2} > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
75 gacutil -i %{dllpath}/%{dllname}
81 %{_libdir}/pkgconfig/%{name}.pc