Set display on after launching BT system popup
[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.3.2
9 Release:    0
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(dbus-glib-1)
33 BuildRequires:  pkgconfig(glib-2.0)
34 BuildRequires:  pkgconfig(dbus-1)
35 BuildRequires:  pkgconfig(gio-2.0)
36 BuildRequires:  pkgconfig(gio-unix-2.0)
37 BuildRequires:  pkgconfig(aul)
38 BuildRequires:  pkgconfig(edbus)
39 BuildRequires:  pkgconfig(feedback)
40 BuildRequires:  edje-tools
41 BuildRequires:  pkgconfig(libtzplatform-config)
42 BuildRequires:  pkgconfig(capi-appfw-application)
43 BuildRequires:  pkgconfig(capi-system-device)
44 BuildRequires:  pkgconfig(capi-media-player)
45 BuildRequires:  pkgconfig(deviced)
46 BuildRequires:  pkgconfig(capi-network-bluetooth)
47 BuildRequires:  pkgconfig(vconf)
48 BuildRequires:  pkgconfig(ecore-wayland)
49 BuildRequires:  pkgconfig(capi-ui-efl-util)
50
51 BuildRequires:  cmake
52 BuildRequires:  gettext-devel
53 Requires:       %{name}-compat = %{version}-%{release}
54 %if "%{?profile}" != "wearable"
55 Recommends:     %{name}-profile_common = %{version}-%{release}
56 %endif
57
58
59 %description
60 bluetooth system-popup application (bluetooth system popup).
61
62 %package profile_wearable
63 Summary:    bt-syspopup binary for wearable
64 Provides:   %{name}-compat = %{version}-%{release}
65 Conflicts:  %{name}-profile_common
66 %description profile_wearable
67 bluetooth system-popup application binary for Tizen wearable profile.
68
69 %package profile_common
70 Summary:    bt-syspopup binary for common
71 Provides:   %{name}-compat = %{version}-%{release}
72 Provides:   %{name}-profile_mobile = %{version}-%{release}
73 Provides:   %{name}-profile_tv = %{version}-%{release}
74 Provides:   %{name}-profile_ivi = %{version}-%{release}
75 Conflicts:  %{name}-profile_wearable
76 %description profile_common
77 bluetooth system-popup application binary for Tizen common profile.
78
79 %prep
80 %setup -q
81
82
83 %build
84 export CFLAGS+=" -fpie -fvisibility=hidden"
85 export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
86 export CFLAGS_BASE="$CFLAGS"
87 export CXXFLAGS_BASE="$CXXFLAGS"
88 export FFLAGS_BASE="$FFLAGS"
89
90 # For backward-compatibility and GBM build optimization
91 # if wearable, "unified". common may be added after efl-ext is unified/refactored.
92 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
93 mkdir -p build_wearable
94 pushd build_wearable
95 export CFLAGS="$CFLAGS_BASE -DTIZEN_ENGINEER_MODE -DTIZEN_PROFILE_WEARABLE"
96 export CXXFLAGS="$CXXFLAGS_BASE -DTIZEN_ENGINEER_MODE"
97 export FFLAGS="$FFLAGS_BASE -DTIZEN_ENGINEER_MODE"
98
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 cmake . \
125     -DCMAKE_INSTALL_PREFIX=%{TZ_SYS_RO_APP}/org.tizen.bt-syspopup \
126 %if %{with wayland}
127     -DWAYLAND_SUPPORT=On \
128 %else
129     -DWAYLAND_SUPPORT=Off \
130 %endif
131     #eol
132
133 make %{?jobs:-j%jobs}
134
135 %cmake . \
136         -DTZ_SYS_RO_APP=%{TZ_SYS_RO_APP} \
137         -DTZ_SYS_SHARE=%{TZ_SYS_SHARE}
138 make
139 %endif
140
141
142 %install
143 rm -rf %{buildroot}
144 # For backward-compatibility and GBM build optimization
145 # if wearable, "unified". common may be added after efl-ext is unified/refactored.
146 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
147 pushd build_wearable
148 %make_install
149 popd
150 pushd %{buildroot}%{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/bin
151 mv bt-syspopup bt-syspopup.wearable
152 popd
153 pushd %{buildroot}%{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/res/edje
154 mv custom_popup.edj custom_popup.edj.wearable
155 popd
156 %endif
157
158 # For backward-compatibility and GBM build optimization
159 # if mobile, tv, ivi, common, or "unified"
160 %if "%{?profile}" != "wearable"
161 %make_install
162 %endif
163
164
165 %files
166 %manifest org.tizen.bt-syspopup.manifest
167 %defattr(-,root,root,-)
168 %{TZ_SYS_RO_PACKAGES}/org.tizen.bt-syspopup.xml
169 %{TZ_SYS_SHARE}/icons/default/small/org.tizen.bt-syspopup.png
170
171 # For backward-compatibility and GBM build optimization
172 # if mobile, tv, ivi, common, or "unified"
173 %if "%{?profile}" != "wearable"
174 %files profile_common
175 %{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/bin/bt-syspopup
176 %{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/res/edje/custom_popup.edj
177 %endif
178
179 # For backward-compatibility and GBM build optimization
180 # if wearable, "unified". common may be added after efl-ext is unified/refactored.
181 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
182 %files profile_wearable
183 %{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/bin/bt-syspopup.wearable
184 %{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/res/edje/custom_popup.edj.wearable
185 %{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/shared/res/tables/org.tizen.bt-syspopup_ChangeableColorTable.xml
186 %{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/shared/res/tables/org.tizen.bt-syspopup_FontInfoTable.xml
187 %{TZ_SYS_RO_APP}/org.tizen.bt-syspopup/res/images/*
188 %endif