Initialize Tizen 2.3
[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 BuildRequires:  pkgconfig(pkgmgr)
27 BuildRequires:  pkgconfig(pkgmgr-info)
28
29 # runtime requires
30 Requires: osp-appfw
31 Requires: osp-image
32 Requires: capi-appfw-application
33 Requires: capi-appfw-package-manager
34
35 %description
36 osp social library
37
38 %package devel
39 Summary:    osp social library (Development)
40 Group:      TO_BE/FILLED_IN
41 Requires:   %{name} = %{version}-%{release}
42
43 %description devel
44 osp social library (DEV)
45
46 %package internal-devel
47 Summary:    osp social library (Internal)
48 Group:      TO_BE/FILLED_IN
49 Requires:   %{name} = %{version}-%{release}
50
51 %description internal-devel
52 osp social library (Internal-DEV)
53
54 %package debug
55 Summary:    osp social library (Development)
56 Group:      TO_BE/FILLED_IN
57 Requires:   %{name} = %{version}-%{release}
58
59 %description debug
60 osp social library (DEV)
61
62 %prep
63 %setup -q
64
65 %build
66 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
67
68 %ifarch %{ix86}
69         ARCH=x86
70         CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_"
71         %if 0%{?simulator}
72                 CXXFLAGS="$CXXFLAGS -D_OSP_EMUL_"
73         %endif
74 %else
75         ARCH=arm
76         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_"
77 %endif
78
79 %if 0%{?tizen_build_binary_release_type_eng}
80         CXXFLAGS="$CXXFLAGS -D_SECURE_LOG"
81 %endif
82
83 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=${ARCH}
84
85 # Call make instruction with smp support
86 make %{?jobs:-j%jobs}
87
88 %install
89 rm -rf %{buildroot}
90 mkdir -p %{buildroot}/usr/share/license
91 cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2  %{buildroot}/usr/share/license/%{name}
92
93 %make_install
94
95 %post -p /sbin/ldconfig
96
97 %postun -p /sbin/ldconfig
98
99 %files
100 %manifest osp-social.manifest
101 /usr/share/license/%{name}
102 %{_libdir}/osp/*.so*
103 /usr/etc/package-manager/parserlib/libaccount.so
104
105 %files devel
106 %{_includedir}/osp/*.h
107 %{_libdir}/pkgconfig/osp-social.pc
108
109 %files internal-devel
110 %{_includedir}/osp/social/*.h
111
112 %files debug
113 %{_libdir}/osp/debug/*.so*