Remove unused vconf key
[platform/core/appfw/ail.git] / packaging / ail.spec
index 6bb442f..d74b145 100755 (executable)
@@ -7,7 +7,6 @@ Group:          Application Framework/Libraries
 Source0:        %{name}-%{version}.tar.gz
 Source1001:     ail.manifest
 BuildRequires:  cmake
-BuildRequires:  vconf-keys-devel
 BuildRequires:  pkgconfig(db-util)
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(libsmack)
@@ -16,7 +15,6 @@ BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(xdgmime)
 BuildRequires:  pkgconfig(libtzplatform-config)
 Provides:       libail = %{version}-%{release}
-Requires:              libcap-tools
 
 %description
 Application Information Library package
@@ -25,17 +23,27 @@ Application Information Library package
 Summary:        Application Information Library Development files
 Requires:       libail = %{version}-%{release}
 Requires:       pkgconfig(libtzplatform-config)
-Requires:              pkgconfig(libsmack)
+Requires:       pkgconfig(libsmack)
 
 %description devel
 Application Information Library Development files package
 
+%package vconf-devel
+Summary:        Application Information Library Development files
+Requires:       libail = %{version}-%{release}
+
+%description vconf-devel
+Application Information Library Development files package
+This developement file purpose concerns the issue TC-2399
+https://bugs.tizen.org/jira/browse/TC-2399
+
+
 %prep
 %setup -q
 cp %{SOURCE1001} .
 
 %build
-CFLAGS+=" -fpic"
+CFLAGS="$CFLAGS -fpic"
 
 %if 0%{?tizen_build_binary_release_type_eng}
 export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
@@ -44,8 +52,7 @@ export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
 %endif
 
 %cmake .  -DTZ_SYS_RW_DESKTOP_APP=%TZ_SYS_RW_DESKTOP_APP \
-          -DBUILD_PKGTYPE=rpm \
-                 -DSMACK=Off
+          -DBUILD_PKGTYPE=rpm
 
 %__make %{?_smp_mflags}
 
@@ -53,33 +60,28 @@ export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
 %make_install
 
 %post
-/sbin/ldconfig
+ldconfig
 # Create tizenglobalapp user needed for global installation
-%{_sbindir}/useradd -d %TZ_SYS_RW_APP -m %TZ_SYS_GLOBALAPP_USER -r -c "system user for common applications" -g root
+useradd -d %TZ_SYS_RW_APP -m %TZ_SYS_GLOBALAPP_USER -r -c "system user for common applications" -g root
 
-#mkdir -p %TZ_SYS_RW_APP/.config/xwalk-service/applications
-#cd %TZ_SYS_RW_APP/
+#mkdir -p %%TZ_SYS_RW_APP/.config/xwalk-service/applications
+#cd %%TZ_SYS_RW_APP/
 #ln -s .config/xwalk-service/applications/
 
-vconftool set -t string db/ail/ail_info "0" -f -s system::vconf_inhouse
-vconftool set -t string db/menuscreen/desktop "0" -f -s system::vconf_inhouse
-vconftool set -t string db/menu_widget/language "en_US.utf8" -f -s system::vconf_inhouse
-chsmack -a User %TZ_SYS_CONFIG/db/ail
-chsmack -a User %TZ_SYS_CONFIG/db/ail/ail_info
-chsmack -a User %TZ_SYS_CONFIG/db/menuscreen
-chsmack -a User %TZ_SYS_CONFIG/db/menuscreen/desktop
-chsmack -a User %TZ_SYS_CONFIG/db/menu_widget
-chsmack -a User %TZ_SYS_CONFIG/db/menu_widget/language
 
 mkdir -p %{TZ_SYS_RO_DESKTOP_APP}
 mkdir -p %{TZ_SYS_RW_DESKTOP_APP}
 mkdir -p %{TZ_SYS_RW_APP}
 mkdir -p %{TZ_SYS_DB}
+mkdir -p %{TZ_SYS_RW_ICONS}/default/small
 
 chsmack -a '*' %{TZ_SYS_DB}
 chsmack -a '*' %{TZ_SYS_RW_APP}
 chsmack -a '*' %{TZ_SYS_RW_DESKTOP_APP}
 chsmack -a '*' %{TZ_SYS_RO_DESKTOP_APP}
+chsmack -a '*' %{TZ_SYS_RW_ICONS}
+chsmack -a '*' %{TZ_SYS_RW_ICONS}/default
+chsmack -a '*' %{TZ_SYS_RW_ICONS}/default/small/
 
 chmod g+w %{TZ_SYS_RW_DESKTOP_APP}
 chmod g+w %{TZ_SYS_RO_DESKTOP_APP}
@@ -87,8 +89,11 @@ chown %TZ_SYS_GLOBALAPP_USER:root %{TZ_SYS_RW_DESKTOP_APP}
 chown %TZ_SYS_GLOBALAPP_USER:root %{TZ_SYS_RO_DESKTOP_APP}
 chown %TZ_SYS_GLOBALAPP_USER:root %{TZ_SYS_RW_APP}
 chown %TZ_SYS_GLOBALAPP_USER:root %{TZ_SYS_DB}
+chown %TZ_SYS_GLOBALAPP_USER:root %{TZ_SYS_DB}
+chown %TZ_SYS_GLOBALAPP_USER:root -R %{TZ_SYS_RW_ICONS}
 
-ail_initdb 2>/dev/null
+ail_createdb 2>/dev/null
+ail_syncdb 2>/dev/null
 chsmack -a '*' %{TZ_SYS_DB}/.app_info.db*
  
 %postun
@@ -100,6 +105,11 @@ fi
 %files
 %manifest %{name}.manifest
 %license LICENSE
+%attr(06775,root,root) %{_bindir}/ail_createdb
+%attr(0775,root,root) %{_bindir}/ail_createdb_user
+%attr(06775,root,root) %{_bindir}/ail_syncdb
+%attr(0775,root,root) %{_bindir}/ail_syncdb_user
+#obsolete tools
 %attr(06775,root,root) %{_bindir}/ail_initdb
 %attr(0775,root,root) %{_bindir}/ail_initdb_user
 %{_bindir}/ail_fota
@@ -116,3 +126,6 @@ fi
 %{_includedir}/ail.h
 %{_libdir}/libail.so
 %{_libdir}/pkgconfig/ail.pc
+
+%files vconf-devel
+%{_includedir}/ail_vconf.h