Updating project to use xbuild
[platform/core/csapi/tizenfx.git] / packaging / csapi-location.spec
1 %define BUILDCONF Debug
2
3 Name:       csapi-location
4 Summary:    Tizen Location API's for C#
5 Version:    1.0.0
6 Release:    1
7 Group:      Development/Libraries
8 License:    Apache-2.0
9 URL:        https://www.tizen.org
10 Source0:    %{name}-%{version}.tar.gz
11 Source1:    %{name}.manifest
12 Source2:    %{name}.pc.in
13
14 BuildRequires: mono-compiler
15 BuildRequires: mono-devel
16 BuildRequires: pkgconfig(glib-2.0)
17 BuildRequires: pkgconfig(csapi-tizen)
18
19 Requires: glib-2.0
20 BuildRequires: pkgconfig(capi-location-manager)
21
22 %description
23 Tizen API for C#
24
25 %package devel
26 Summary:    Development package for %{name}
27 Group:      Development/Libraries
28 Requires:   %{name} = %{version}-%{release}
29
30 %description devel
31 Development package for %{name}
32
33 %prep
34 %setup -q
35
36 cp %{SOURCE1} .
37
38 %build
39 # build dll
40 xbuild Tizen.Location/Tizen.Location.csproj /p:Configuration=%{BUILDCONF}
41
42 %install
43 gacutil -i Tizen.Location/bin/%{BUILDCONF}/Tizen.Location.dll -root "%{buildroot}%{_libdir}" -package tizen
44
45 # generate pkgconfig
46 mkdir -p %{buildroot}%{_libdir}/pkgconfig
47 sed -e "s#@version@#%{version}#g" \
48     -e "s#@dllpath@#%{dllpath}#g" \
49     -e "s#@dllname@#%{dllname}#g" \
50     %{SOURCE2} > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
51
52 %post
53 gacutil -i %{dllpath}/%{dllname}
54
55 %files
56 %manifest %{name}.manifest
57 %{_libdir}/mono/
58
59 %files devel
60 %{_libdir}/pkgconfig/%{name}.pc