8f51f8e6a578b1459c8ea9302e0ce64510319b5c
[framework/osp/social.git] / packaging / osp-social.spec
1 %define debug_package %{nil}
2 %define __strip /bin/true
3
4 Name:           osp-social
5 Summary:        osp social library
6 Version:        1.2.2.0
7 Release:        1
8 Group:          System/Libraries
9 License:        Apache License, Version 2.0
10 Source0:        %{name}-%{version}.tar.gz
11 BuildRequires:  cmake
12 BuildRequires:  pkgconfig(contacts-service2)
13 BuildRequires:  pkgconfig(calendar-service2)
14 BuildRequires:  pkgconfig(accounts-svc)
15 BuildRequires:  pkgconfig(libwbxml2)
16 BuildRequires:  pkgconfig(glib-2.0)
17 BuildRequires:  pkgconfig(db-util)
18 BuildRequires:  pkgconfig(osp-appfw)
19 BuildRequires:  osp-appfw-internal-devel
20 BuildRequires:  pkgconfig(osp-uifw)
21 BuildRequires:  osp-uifw-internal-devel
22 BuildRequires:  pkgconfig(osp-image)
23 BuildRequires:  osp-image-internal-devel
24 BuildRequires:  pkgconfig(osp-image-core)
25 BuildRequires:  osp-image-core-internal-devel
26
27 # runtime requires
28 Requires: osp-appfw 
29 Requires: osp-image
30
31 %description
32 osp social library
33
34 %package devel
35 Summary:    osp social library (Development)
36 Group:      TO_BE/FILLED_IN
37 Requires:   %{name} = %{version}-%{release}
38
39 %description devel
40 osp social library (DEV)
41
42 %package internal-devel
43 Summary:    osp social library (Internal)
44 Group:      TO_BE/FILLED_IN
45 Requires:   %{name} = %{version}-%{release}
46
47 %description internal-devel
48 osp social library (Internal-DEV)
49
50 %package debug
51 Summary:    osp social library (Development)
52 Group:      TO_BE/FILLED_IN
53 Requires:   %{name} = %{version}-%{release}
54
55 %description debug
56 osp social library (DEV)
57
58 %prep
59 %setup -q
60
61 %build
62 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
63
64 %ifarch %{ix86}
65         ARCH=x86
66         CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_"
67         %if 0%{?simulator}
68                 CXXFLAGS="$CXXFLAGS -D_OSP_EMUL_"
69         %endif
70 %else
71         ARCH=arm
72         CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_OSP_ARMEL_"
73 %endif
74
75 %if 0%{?tizen_build_binary_release_type_eng}
76         CXXFLAGS="$CXXFLAGS -D_SECURE_LOG"
77 %endif
78
79 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=${ARCH}
80
81 # Call make instruction with smp support
82 make %{?jobs:-j%jobs}
83
84 %install
85 rm -rf %{buildroot}
86 mkdir -p %{buildroot}/usr/share/license
87 cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2  %{buildroot}/usr/share/license/%{name}
88
89 %make_install
90
91 %post -p /sbin/ldconfig
92
93 %postun -p /sbin/ldconfig
94
95 %files
96 %manifest osp-social.manifest
97 /usr/share/license/%{name}
98 %{_libdir}/osp/*.so*
99 /usr/etc/package-manager/parserlib/libaccount.so
100
101 %files devel
102 %{_includedir}/osp/*.h
103 %{_libdir}/pkgconfig/osp-social.pc
104
105 %files internal-devel
106 %{_includedir}/osp/social/*.h
107
108 %files debug
109 %{_libdir}/osp/debug/*.so*