Add AArch64-specific build options to cflags
[apps/core/preloaded/clock.git] / packaging / org.tizen.clock.spec
old mode 100644 (file)
new mode 100755 (executable)
index f205b67..2624eee
@@ -1,10 +1,12 @@
-#sbs-git:slp/apps/c/clock clock 0.1.2 f249a81b4bd40dc2ce4fb0efce04cdcb287df65f
+%bcond_with mesa
+
 Name:      org.tizen.clock
 Summary:    background image library
 Version:    0.2.57
 Release:    1
 License:    TBD
 Source0:    %{name}-%{version}.tar.gz
+Source1:       %{name}.manifest
 BuildRequires:  cmake
 BuildRequires:  edje-bin
 BuildRequires:  embryo-bin
@@ -25,7 +27,11 @@ BuildRequires:  pkgconfig(xext)
 BuildRequires:  pkgconfig(xcomposite)
 BuildRequires:  pkgconfig(icu-i18n)
 BuildRequires:  pkgconfig(devman)
-BuildRequires:  pkgconfig(opengl-es-20)
+%if %{with mesa}
+BuildRequires:  pkgconfig(glesv2)
+%else
+BuildRequires: pkgconfig(gles20)
+%endif
 BuildRequires:  pkgconfig(capi-appfw-application)
 BuildRequires:  gettext-tools
 BuildRequires: pkgconfig(feedback)
@@ -52,13 +58,19 @@ clock application
 
 %build
 
+cp %{SOURCE1} .
+
 export LDFLAGS="${LDFLAGS} -Wl,--rpath,/usr/lib -Wl,--rpath,%{PREFIX}/lib -Wl,--hash-style=both -Wl,--as-needed"
 export CFLAGS="${CFLAGS} -fPIC"
 export CXXFLAGS="${CXXFLAGS} -fPIC"
 
 %ifarch %{arm}
+%ifarch aarch64
+CXXFLAGS+=" -D_ARCH_ARM  -march=armv8-a+fp+simd"
+%else
 CXXFLAGS+=" -D_ARCH_ARM_ -mfpu=neon -mfloat-abi=softfp"
 %endif
+%endif
 
 cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX}
 
@@ -415,11 +427,12 @@ chown :6015 /opt/dbspace/.worldclock.db-journal
 chmod 660 /opt/dbspace/.worldclock.db
 chmod 660 /opt/dbspace/.worldclock.db-journal
 
+chsmack -a 'User' /opt/dbspace/.worldclock.db*
+
 %postun -p /sbin/ldconfig
 
 %files
-%manifest org.tizen.clock.manifest
-/opt/etc/smack/accesses.d/org.tizen.clock.rule
+%manifest %{name}.manifest
 %defattr(-,root,root,-)
 /usr/apps/org.tizen.clock/bin/clock
 /usr/apps/org.tizen.clock/res/edje/*.edj