Release version 0.3.1
[platform/core/base/syspopup.git] / packaging / syspopup.spec
1 Name:           syspopup
2 Summary:        Syspopup package
3 Version:        0.3.1
4 Release:        0
5 Group:          System/Libraries
6 License:        Apache-2.0
7 Source0:        syspopup-%{version}.tar.gz
8 Source1001:     %{name}.manifest
9 Source1002:     %{name}-devel.manifest
10 Source1003:     %{name}-caller.manifest
11 Source1004:     %{name}-caller-devel.manifest
12
13 BuildRequires:  cmake
14 BuildRequires:  pkgconfig(sqlite3)
15 BuildRequires:  pkgconfig(bundle)
16 BuildRequires:  pkgconfig(dlog)
17 BuildRequires:  pkgconfig(glib-2.0)
18 BuildRequires:  pkgconfig(gio-2.0)
19 BuildRequires:  pkgconfig(ecore-wl2)
20 BuildRequires:  pkgconfig(capi-ui-efl-util)
21 BuildRequires:  pkgconfig(evas)
22 BuildRequires:  pkgconfig(elementary)
23 BuildRequires:  pkgconfig(libtzplatform-config)
24 BuildRequires:  pkgconfig(aul)
25 BuildRequires:  pkgconfig(capi-system-info)
26 BuildRequires:  pkgconfig(libsmack)
27 BuildRequires:  pkgconfig(libxml-2.0)
28
29 Requires(posttrans): /usr/bin/rm
30
31 %define upgrade_script_path /usr/share/upgrade/scripts
32
33 %description
34 syspopup package for popup
35
36 %package devel
37 Summary:    Syspopup development package
38 Group:      System/Libraries
39 Requires:   %{name} = %{version}-%{release}
40
41 %description devel
42 syspopup development package popup
43
44 %package caller
45 Summary:          Syspopup-caller package
46 Group:            System/Libraries
47 Requires:         %{name} = %{version}-%{release}
48 Requires(post):   /sbin/ldconfig
49 Requires(postun): /sbin/ldconfig
50
51 %description caller
52 syspopup-caller package for popup
53
54 %package caller-devel
55 Summary:    Syspopup-caller development package
56 Group:      System/Development
57 Requires:   %{name} = %{version}-%{release}
58
59 %description caller-devel
60 syspopup-caller development package for popup
61
62 %prep
63 %setup -q
64 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} .
65
66 %build
67 export CFLAGS+=" -DEFL_BETA_API_SUPPORT "
68 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
69 %cmake -DTZ_SYS_RO_PACKAGES=%{TZ_SYS_RO_PACKAGES} \
70         -DTZ_SYS_RO_SHARE=%{TZ_SYS_RO_SHARE} \
71         -DEXTRA_CFLAGS=-fPIC \
72         -DFULLVER=%{version} \
73         -DMAJORVER=${MAJORVER} \
74         -DSYSCONFDIR=%{_sysconfdir} \
75         .
76
77 make %{?jobs:-j%jobs}
78
79 %install
80 %make_install
81 mkdir -p %{buildroot}%{_datadir}
82 touch %{buildroot}%{_datadir}/popup_noti_term
83
84 mkdir -p %{buildroot}%{upgrade_script_path}
85 cp -f scripts/502.syspopup_upgrade.sh %{buildroot}%{upgrade_script_path}
86
87 %post -p /sbin/ldconfig
88
89 %postun -p /sbin/ldconfig
90
91 %post caller -p /sbin/ldconfig
92
93 %postun caller -p /sbin/ldconfig
94
95 %posttrans
96 /usr/bin/sp_initdb
97
98 if [ -e %{_sysconfdir}/config/model-config.xml ]; then
99         PROFILE=`grep "feature\/profile" %{_sysconfdir}/config/model-config.xml`
100         if [[ "${PROFILE}" == *"mobile"* ]]; then
101                 rm -rf %{_datarootdir}/syspopup/wearable
102                 rm -rf %{_datarootdir}/syspopup/tv
103                 rm -rf %{_datarootdir}/syspopup/common
104                 rm -rf %{_datarootdir}/syspopup/ivi
105         elif [[ "${PROFILE}" == *"wearable"* ]]; then
106                 rm -rf %{_datarootdir}/syspopup/mobile
107                 rm -rf %{_datarootdir}/syspopup/tv
108                 rm -rf %{_datarootdir}/syspopup/common
109                 rm -rf %{_datarootdir}/syspopup/ivi
110         elif [[ "${PROFILE}" == *"tv"* ]]; then
111                 rm -rf %{_datarootdir}/syspopup/mobile
112                 rm -rf %{_datarootdir}/syspopup/wearable
113                 rm -rf %{_datarootdir}/syspopup/common
114                 rm -rf %{_datarootdir}/syspopup/ivi
115         elif [[ "${PROFILE}" == *"common"* ]]; then
116                 rm -rf %{_datarootdir}/syspopup/mobile
117                 rm -rf %{_datarootdir}/syspopup/wearable
118                 rm -rf %{_datarootdir}/syspopup/tv
119                 rm -rf %{_datarootdir}/syspopup/ivi
120         elif [[ "${PROFILE}" == *"ivi"* ]]; then
121                 rm -rf %{_datarootdir}/syspopup/mobile
122                 rm -rf %{_datarootdir}/syspopup/wearable
123                 rm -rf %{_datarootdir}/syspopup/tv
124                 rm -rf %{_datarootdir}/syspopup/common
125         else
126                 rm -rf %{_datarootdir}/syspopup/mobile
127                 rm -rf %{_datarootdir}/syspopup/wearable
128                 rm -rf %{_datarootdir}/syspopup/tv
129                 rm -rf %{_datarootdir}/syspopup/common
130                 rm -rf %{_datarootdir}/syspopup/ivi
131
132         fi
133 else
134         rm -rf %{_datarootdir}/syspopup/mobile
135         rm -rf %{_datarootdir}/syspopup/wearable
136         rm -rf %{_datarootdir}/syspopup/tv
137         rm -rf %{_datarootdir}/syspopup/common
138         rm -rf %{_datarootdir}/syspopup/ivi
139 fi
140
141 %files
142 %manifest %{name}.manifest
143 %defattr(-,root,root,-)
144 %{_bindir}/sp_test
145 %{_bindir}/sp_initdb
146 %{_libdir}/libsyspopup.so.*
147 %{_datadir}/popup_noti_term
148 %license LICENSE
149 %{upgrade_script_path}/502.syspopup_upgrade.sh
150 %{_sysconfdir}/syspopup/preload/*
151 %{_prefix}/share/syspopup/*
152
153 %files devel
154 %manifest %{name}-devel.manifest
155 %defattr(-,root,root,-)
156 %{_includedir}/SLP_SYSPOPUP_PG.h
157 %{_includedir}/syspopup.h
158 %{_libdir}/libsyspopup.so
159 %{_libdir}/pkgconfig/syspopup.pc
160
161 %files caller
162 %manifest %{name}-caller.manifest
163 %defattr(-,root,root,-)
164 %{_libdir}/libsyspopup_caller.so.*
165 %license LICENSE
166
167 %files caller-devel
168 %manifest %{name}-caller-devel.manifest
169 %defattr(-,root,root,-)
170 %{_libdir}/libsyspopup_caller.so
171 %{_includedir}/syspopup_caller.h
172 %{_libdir}/pkgconfig/syspopup-caller.pc