1 %define dllpath %{_libdir}/mono/tizen
2 %define dllname Tizen.Messaging.Push.dll
5 Summary: Tizen Push 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(glib-2.0)
25 BuildRequires: pkgconfig(csapi-tizen)
26 BuildRequires: libpush
27 BuildRequires: libpush-devel
33 Summary: Development package for %{name}
34 Group: Development/Libraries
35 Requires: %{name} = %{version}-%{release}
38 Development package for %{name}
47 mcs -target:library -out:%{dllname} -keyfile:Tizen.Messaging/Tizen.Messaging.Push.snk -pkg:'csapi-tizen'\
48 Tizen.Messaging/Properties/AssemblyInfo.cs \
49 Tizen.Messaging/Interop/*.cs \
50 Tizen.Messaging/Push/*.cs
53 if [ -x %{dllname} ]; then
54 RET=`mono-shlib-cop %{dllname}`; \
55 CNT=`echo $RET | grep -E "^error:" | wc -l`; \
56 if [ $CNT -gt 0 ]; then exit 1; fi
61 mkdir -p %{buildroot}%{dllpath}
62 install -p -m 644 %{dllname} %{buildroot}%{dllpath}
65 mkdir -p %{buildroot}%{_libdir}/pkgconfig
66 sed -e "s#@version@#%{version}#g" \
67 -e "s#@dllpath@#%{dllpath}#g" \
68 -e "s#@dllname@#%{dllname}#g" \
69 %{SOURCE2} > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
72 gacutil -i %{dllpath}/%{dllname}
78 %{_libdir}/pkgconfig/%{name}.pc