Increase the version to 9.0
[platform/core/connectivity/bt-syspopup.git] / packaging / org.tizen.bt-syspopup.spec
1 %define _usrdir /usr
2 %define _appdir %{_usrdir}/apps
3
4 %bcond_with wayland
5
6 Name:       org.tizen.bt-syspopup
7 Summary:    bluetooth system-popup application (bluetooth system popup)
8 Version:    0.9.0
9 Release:    1
10 Group:      main
11 License:    Flora-1.1
12 Source0:    %{name}-%{version}.tar.gz
13 BuildRequires:  pkgconfig(evas)
14 # For backward-compatibility and GBM build optimization
15 # if wearable, "unified". common may be added after efl-ext is unified/refactored.
16 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
17 BuildRequires:  pkgconfig(syspopup-caller)
18 %endif
19 # For backward-compatibility and GBM build optimization
20 # if mobile, tv, ivi, common, or "unified"
21 %if "%{?profile}" != "wearable"
22 BuildRequires:  pkgconfig(notification)
23 %endif
24 BuildRequires: pkgconfig(efl-extension)
25 BuildRequires:  pkgconfig(ecore-input)
26 BuildRequires:  pkgconfig(ethumb)
27 BuildRequires:  pkgconfig(elementary)
28 BuildRequires:  pkgconfig(efreet)
29 BuildRequires:  pkgconfig(sensor)
30 BuildRequires:  pkgconfig(syspopup)
31 BuildRequires:  pkgconfig(dlog)
32 BuildRequires:  pkgconfig(glib-2.0)
33 BuildRequires:  pkgconfig(dbus-1)
34 BuildRequires:  pkgconfig(gio-2.0)
35 BuildRequires:  pkgconfig(gio-unix-2.0)
36 BuildRequires:  pkgconfig(aul)
37 BuildRequires:  pkgconfig(edbus)
38 BuildRequires:  pkgconfig(feedback)
39 BuildRequires:  edje-tools
40 BuildRequires:  pkgconfig(libtzplatform-config)
41 BuildRequires:  pkgconfig(capi-appfw-application)
42 BuildRequires:  pkgconfig(capi-system-device)
43 BuildRequires:  pkgconfig(capi-media-player)
44 BuildRequires:  pkgconfig(deviced)
45 BuildRequires:  pkgconfig(capi-network-bluetooth)
46 BuildRequires:  pkgconfig(vconf)
47 BuildRequires:  pkgconfig(ecore-wl2)
48 BuildRequires:  pkgconfig(capi-ui-efl-util)
49
50 BuildRequires:  cmake
51 BuildRequires:  gettext-devel
52 Requires:       %{name}-compat = %{version}-%{release}
53 %if "%{?profile}" != "wearable"
54 Recommends:     %{name}-profile_common = %{version}-%{release}
55 %endif
56
57
58 %description
59 bluetooth system-popup application (bluetooth system popup).
60
61 %package profile_wearable
62 Summary:    bt-syspopup binary for wearable
63 Provides:   %{name}-compat = %{version}-%{release}
64 Conflicts:  %{name}-profile_common
65 %description profile_wearable
66 bluetooth system-popup application binary for Tizen wearable profile.
67
68 %package profile_common
69 Summary:    bt-syspopup binary for common
70 Provides:   %{name}-compat = %{version}-%{release}
71 Provides:   %{name}-profile_mobile = %{version}-%{release}
72 Provides:   %{name}-profile_tv = %{version}-%{release}
73 Provides:   %{name}-profile_ivi = %{version}-%{release}
74 Conflicts:  %{name}-profile_wearable
75 %description profile_common
76 bluetooth system-popup application binary for Tizen common profile.
77
78 %prep
79 %setup -q
80
81
82 %build
83 export CFLAGS+=" -fpie -fvisibility=hidden"
84 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
85 export CFLAGS_BASE="$CFLAGS"
86 export CXXFLAGS_BASE="$CXXFLAGS"
87 export FFLAGS_BASE="$FFLAGS"
88
89 # For backward-compatibility and GBM build optimization
90 # if wearable, "unified". common may be added after efl-ext is unified/refactored.
91 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
92 mkdir -p build_wearable
93 pushd build_wearable
94 export CFLAGS="$CFLAGS_BASE -DTIZEN_ENGINEER_MODE -DTIZEN_PROFILE_WEARABLE"
95 export CXXFLAGS="$CXXFLAGS_BASE -DTIZEN_ENGINEER_MODE"
96 export FFLAGS="$FFLAGS_BASE -DTIZEN_ENGINEER_MODE"
97
98 export CFLAGS+=" -DEFL_BETA_API_SUPPORT "
99 cmake .. \
100     -DCMAKE_INSTALL_PREFIX=%{TZ_SYS_RO_APP}/org.tizen.bt-syspopup \
101 %if %{with wayland}
102     -DWAYLAND_SUPPORT=On \
103 %else
104     -DWAYLAND_SUPPORT=Off \
105 %endif
106     #eol
107
108 make %{?jobs:-j%jobs}
109
110 %cmake .. \
111         -DTZ_SYS_RO_APP=%{TZ_SYS_RO_APP} \
112         -DTZ_SYS_SHARE=%{TZ_SYS_SHARE}
113 make
114 popd
115 %endif
116
117 # For backward-compatibility and GBM build optimization
118 # if mobile, tv, ivi, common, or "unified"
119 %if "%{?profile}" != "wearable"
120 export CFLAGS="$CFLAGS_BASE -DTIZEN_DEBUG_ENABLE -DTIZEN_PROFILE_MOBILE"
121 export CXXFLAGS="$CXXFLAGS_BASE -DTIZEN_DEBUG_ENABLE"
122 export FFLAGS="$FFLAGS_BASE -DTIZEN_DEBUG_ENABLE"
123
124 export CFLAGS+=" -DEFL_BETA_API_SUPPORT "
125 cmake . \
126     -DCMAKE_INSTALL_PREFIX=%{TZ_SYS_RO_APP}/org.tizen.bt-syspopup \
127 %if %{with wayland}
128     -DWAYLAND_SUPPORT=On \
129 %else
130     -DWAYLAND_SUPPORT=Off \
131 %endif
132     #eol
133
134 make %{?jobs:-j%jobs}
135
136 %cmake . \
137         -DTZ_SYS_RO_APP=%{TZ_SYS_RO_APP} \
138         -DTZ_SYS_SHARE=%{TZ_SYS_SHARE}
139 make
140 %endif
141
142
143 %install
144 rm -rf %{buildroot}
145 # For backward-compatibility and GBM build optimization
146 # if wearable, "unified". common may be added after efl-ext is unified/refactored.
147 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
148 pushd build_wearable
149 %make_install
150 popd
151 pushd %{buildroot}%{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/bin
152 mv bt-syspopup bt-syspopup.wearable
153 popd
154 pushd %{buildroot}%{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/res/edje
155 mv custom_popup.edj custom_popup.edj.wearable
156 popd
157 %endif
158
159 # For backward-compatibility and GBM build optimization
160 # if mobile, tv, ivi, common, or "unified"
161 %if "%{?profile}" != "wearable"
162 %make_install
163 %endif
164
165
166 %files
167 %manifest org.tizen.bt-syspopup.manifest
168 %license LICENSE
169 %defattr(-,root,root,-)
170 %{TZ_SYS_SHARE}/icons/default/small/org.tizen.bt-syspopup.png
171
172 # For backward-compatibility and GBM build optimization
173 # if mobile, tv, ivi, common, or "unified"
174 %if "%{?profile}" != "wearable"
175 %files profile_common
176 %license LICENSE
177 %{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/bin/bt-syspopup
178 %{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/res/edje/custom_popup.edj
179 %{TZ_SYS_RO_PACKAGES}/org.tizen.bt-syspopup.xml
180 %endif
181
182 # For backward-compatibility and GBM build optimization
183 # if wearable, "unified". common may be added after efl-ext is unified/refactored.
184 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
185 %post profile_wearable
186 mv %{TZ_SYS_RO_PACKAGES}/org.tizen.bt-syspopup_w.xml %{TZ_SYS_RO_PACKAGES}/org.tizen.bt-syspopup.xml
187 pushd %{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/bin
188 mv bt-syspopup.wearable bt-syspopup
189 popd
190 pushd %{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/res/edje
191 mv custom_popup.edj.wearable custom_popup.edj
192 popd
193 %preun profile_wearable
194 pushd %{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/bin
195 mv bt-syspopup bt-syspopup.wearable
196 popd
197 pushd %{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/res/edje
198 mv custom_popup.edj custom_popup.edj.wearable
199 popd
200 %files profile_wearable
201 %license LICENSE
202 %{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/bin/bt-syspopup.wearable
203 %{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/res/edje/custom_popup.edj.wearable
204 %{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/shared/res/tables/org.tizen.bt-syspopup_ChangeableColorTable.xml
205 %{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/shared/res/tables/org.tizen.bt-syspopup_FontInfoTable.xml
206 %{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/res/images/*
207 %{TZ_SYS_RO_PACKAGES}/org.tizen.bt-syspopup_w.xml
208 %endif