9bc8341e8ae7f45739118fc05f3d61591d1d7dc4
[apps/native/starter.git] / packaging / starter.spec
1 %bcond_with wayland
2 %define __usrdir /usr/lib/systemd/user
3
4 Name:       starter
5 Summary:    starter
6 Version: 0.5.52
7 Release:    1
8 Group:      TO_BE/FILLED_IN
9 License:    Apache-2.0
10 Source0:    starter-%{version}.tar.gz
11 Source1:    starter.service
12 Source2:    starter.path
13 Source3:    starter-pre.service
14 Source4:    starter-pre.path
15
16 %if "%{profile}" == "tv"
17 ExcludeArch: %{arm} %ix86 x86_64
18 %endif
19
20 BuildRequires:  cmake
21 BuildRequires:  pkgconfig(appcore-efl)
22 BuildRequires:  pkgconfig(aul)
23 BuildRequires:  pkgconfig(capi-appfw-application)
24 BuildRequires:  pkgconfig(capi-appfw-app-manager)
25 BuildRequires:  pkgconfig(capi-system-media-key)
26 BuildRequires:  pkgconfig(capi-network-bluetooth)
27 BuildRequires:  pkgconfig(capi-system-system-settings)
28
29 %if "%{profile}" == "common"
30 BuildRequires:  tts
31 BuildRequires:  tts-devel
32 BuildRequires:  pkgconfig(capi-message-port)
33 BuildRequires:  pkgconfig(security-manager)
34 BuildRequires:  pkgconfig(efl-extension)
35 %else if "%{profile}" == "mobile"
36 BuildRequires:  tts
37 BuildRequires:  tts-devel
38 BuildRequires:  pkgconfig(capi-message-port)
39 BuildRequires:  pkgconfig(security-manager)
40 BuildRequires:  pkgconfig(efl-extension)
41 %else if "%{profile}" == "ivi"
42 BuildRequires:  tts
43 BuildRequires:  tts-devel
44 BuildRequires:  pkgconfig(capi-message-port)
45 BuildRequires:  pkgconfig(security-manager)
46 BuildRequires:  pkgconfig(efl-extension)
47 %endif
48
49 BuildRequires:  pkgconfig(feedback)
50 BuildRequires:  pkgconfig(db-util)
51 BuildRequires:  pkgconfig(dlog)
52 BuildRequires:  pkgconfig(ecore)
53 BuildRequires:  pkgconfig(ecore-wayland)
54 BuildRequires:  pkgconfig(edje)
55 BuildRequires:  pkgconfig(edbus)
56 BuildRequires:  pkgconfig(eina)
57 BuildRequires:  pkgconfig(elementary)
58 BuildRequires:  pkgconfig(evas)
59 BuildRequires:  pkgconfig(glib-2.0)
60 BuildRequires:  pkgconfig(syspopup-caller)
61 BuildRequires:  pkgconfig(ui-gadget-1)
62 BuildRequires:  pkgconfig(vconf)
63 BuildRequires:  pkgconfig(alarm-service)
64 BuildRequires:  pkgconfig(pkgmgr-info)
65 BuildRequires:  pkgconfig(deviced)
66 BuildRequires:  pkgconfig(edbus)
67 BuildRequires:  pkgconfig(dbus-1)
68 BuildRequires:  pkgconfig(dbus-glib-1)
69 BuildRequires:  cmake
70 BuildRequires:  edje-bin
71 BuildRequires:  gettext
72 BuildRequires:  gettext-tools
73 Requires(post): /usr/bin/vconftool
74
75 %if !%{with wayland}
76 BuildRequires:  pkgconfig(utilX)
77 %endif
78
79 %description
80 Description: Starter
81
82
83 %prep
84 %setup -q
85
86 %build
87 %if 0%{?sec_build_binary_debug_enable}
88 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
89 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
90 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
91 %endif
92
93 %if "%{profile}" == "common"
94 %define TIZEN_PROFILE_NAME "COMMON"
95 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_COMMON"
96 export CXXFLAGS="$CXXFLAGS -DTIZEN_PROFILE_COMMON"
97 %endif
98
99 %if "%{profile}" == "mobile"
100 %define TIZEN_PROFILE_NAME "MOBILE"
101 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_MOBILE"
102 export CXXFLAGS="$CXXFLAGS -DTIZEN_PROFILE_MOBILE"
103 %endif
104
105 %if "%{profile}" == "wearable"
106 %define TIZEN_PROFILE_NAME "WEARABLE"
107 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_WEARABLE"
108 export CXXFLAGS="$CXXFLAGS -DTIZEN_PROFILE_WEARABLE"
109 %endif
110
111 %if "%{profile}" == "ivi"
112 %define TIZEN_PROFILE_NAME "IVI"
113 export CFLAGS="$CFLAGS -DTIZEN_PROFILE_IVI"
114 export CXXFLAGS="$CXXFLAGS -DTIZEN_PROFILE_IVI"
115 %endif
116
117
118 %ifarch %{arm}
119 export CFLAGS="$CFLAGS -DTIZEN_BUILD_TARGET"
120 export CXXFLAGS="$CXXFLAGS -DTIZEN_BUILD_TARGET"
121 %else
122 export CFLAGS="$CFLAGS -DTIZEN_BUILD_EMULATOR"
123 export CXXFLAGS="$CXXFLAGS -DTIZEN_BUILD_EMULATOR"
124 %endif
125
126 %if %{with wayland}
127 export WAYLAND_SUPPORT=On
128 export X11_SUPPORT=Off
129 %else
130 export WAYLAND_SUPPORT=Off
131 export X11_SUPPORT=On
132 %endif
133
134 cmake . -DTIZEN_PROFILE_NAME=%{TIZEN_PROFILE_NAME} -DCMAKE_INSTALL_PREFIX=%{_prefix} -DWAYLAND_SUPPORT=${WAYLAND_SUPPORT} -DX11_SUPPORT=${X11_SUPPORT}
135
136 make
137 make -j1
138 %install
139 rm -rf %{buildroot}
140 %make_install
141
142 mkdir -p %{buildroot}%{__usrdir}/default.target.wants
143 mkdir -p %{buildroot}%{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
144
145 install -m 0644 %SOURCE1 %{buildroot}%{__usrdir}/starter.service
146 ln -s ../starter.service %{buildroot}%{__usrdir}/default.target.wants/starter.service
147
148 install -m 0644 %SOURCE2 %{buildroot}%{__usrdir}/starter.path
149 ln -s ../starter.path %{buildroot}%{__usrdir}/default.target.wants/starter.path
150
151 install -m 0644 %SOURCE3 %{buildroot}%{__usrdir}/starter-pre.service
152 ln -s ../starter-pre.service %{buildroot}%{__usrdir}/default.target.wants/starter-pre.service
153
154 install -m 0644 %SOURCE4 %{buildroot}%{__usrdir}/starter-pre.path
155 ln -s ../starter-pre.path %{buildroot}%{__usrdir}/default.target.wants/starter-pre.path
156
157 mkdir -p %{buildroot}/usr/share/license
158 cp -f LICENSE %{buildroot}/usr/share/license/%{name}
159 mkdir -p %{buildroot}/opt/data/home-daemon
160
161 %post
162 change_file_executable()
163 {
164     chmod +x $@ 2>/dev/null
165     if [ $? -ne 0 ]; then
166         echo "Failed to change the perms of $@"
167     fi
168 }
169
170 mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
171
172 #ln -sf /etc/init.d/rd4starter /etc/rc.d/rc4.d/S81starter
173 #ln -sf /etc/init.d/rd4starter /etc/rc.d/rc3.d/S81starter
174
175 sync
176
177 %files
178 %manifest starter.manifest
179 %defattr(-,root,root,-)
180 %{_sysconfdir}/init.d/rd4starter
181 %{_sysconfdir}/init.d/rd3starter
182 %{_bindir}/starter
183 %{__usrdir}/starter.service
184 %{__usrdir}/starter.path
185 %{__usrdir}/starter-pre.service
186 %{__usrdir}/starter-pre.path
187 %{__usrdir}/default.target.wants/starter.service
188 %{__usrdir}/default.target.wants/starter.path
189 %{__usrdir}/default.target.wants/starter-pre.service
190 %{__usrdir}/default.target.wants/starter-pre.path
191 /usr/share/license/%{name}
192 /opt/data/home-daemon
193 /usr/share/locale/*/LC_MESSAGES/*
194
195 %if "%{profile}" == "mobile"
196 /usr/share/starter/res/edje/*
197 %endif