1 #git:framework/web/wrt-commons wrt-commons 0.2.99
3 Summary: Wrt common library
6 Group: Development/Libraries
7 License: Apache License, Version 2.0
9 Source0: %{name}-%{version}.tar.gz
11 BuildRequires: pkgconfig(ecore)
12 BuildRequires: pkgconfig(appcore-efl)
13 BuildRequires: pkgconfig(libssl)
14 BuildRequires: pkgconfig(sqlite3)
15 BuildRequires: pkgconfig(dlog)
16 BuildRequires: pkgconfig(glib-2.0)
17 BuildRequires: pkgconfig(gio-2.0)
18 BuildRequires: pkgconfig(db-util)
19 BuildRequires: pkgconfig(zlib)
20 BuildRequires: pkgconfig(libpcrecpp)
21 BuildRequires: pkgconfig(icu-i18n)
22 BuildRequires: pkgconfig(libxml-2.0)
23 BuildRequires: pkgconfig(openssl)
24 BuildRequires: pkgconfig(libiri)
25 BuildRequires: pkgconfig(libidn)
26 BuildRequires: libcryptsvc-devel
27 BuildRequires: dukgenerator-devel
34 Summary: Wrt common library development headers
35 Group: Development/Libraries
36 Requires: %{name} = %{version}
39 Wrt common library development headers
45 %if "%{WITH_TESTS}" == "ON" || "%{WITH_TESTS}" == "Y" || "%{WITH_TESTS}" == "YES" || "%{WITH_TESTS}" == "TRUE" || "%{WITH_TESTS}" == "1"
51 export LDFLAGS+="-Wl,--rpath=%{_libdir} -Wl,--hash-style=both -Wl,--as-needed"
53 cmake . -DVERSION=%{version} \
55 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
56 -DCMAKE_BUILD_TYPE=%{?build_type:%build_type} \
57 %{?WITH_TESTS:-DWITH_TESTS=%WITH_TESTS}
61 mkdir -p %{buildroot}/usr/share/license
62 cp %{name} %{buildroot}/usr/share/license/
69 mkdir -p /opt/share/widget/system
70 mkdir -p /opt/share/widget/user
71 mkdir -p /opt/share/widget/exec
72 mkdir -p /opt/share/widget/data/Public
73 mkdir -p /usr/lib/wrt-plugins
76 echo "This is new install of wrt-commons"
77 echo "Calling /usr/bin/wrt_commons_reset_db.sh"
78 /usr/bin/wrt_commons_reset_db.sh
80 # Find out old and new version of databases
81 WRT_OLD_DB_VERSION=`sqlite3 /opt/dbspace/.wrt.db ".tables" | grep "DB_VERSION_"`
82 WRT_NEW_DB_VERSION=`cat /usr/share/wrt-engine/wrt_db.sql | tr '[:blank:]' '\n' | grep DB_VERSION_`
83 echo "OLD wrt database version ${WRT_OLD_DB_VERSION}"
84 echo "NEW wrt database version ${WRT_NEW_DB_VERSION}"
86 if [ ${WRT_OLD_DB_VERSION} -a ${WRT_NEW_DB_VERSION} ]
88 if [ ${WRT_NEW_DB_VERSION} = ${WRT_OLD_DB_VERSION} ]
90 echo "Equal database detected so db installation ignored"
92 echo "Calling /usr/bin/wrt_commons_reset_db.sh"
93 /usr/bin/wrt_commons_reset_db.sh
96 echo "Calling /usr/bin/wrt_commons_reset_db.sh"
97 /usr/bin/wrt_commons_reset_db.sh
101 mkdir -p /usr/etc/ace
102 mkdir -p /usr/apps/org.tizen.policy
105 # WARNING: THIS IS TEMPORARY SOLUTION, AS THIS SHOULD NOT BE OUR
106 # RESPONSIBILITY!!! WE HAVE TO CONTACT TO DBUS MAINAINERS
108 if [ -f /var/lib/dbus/machine-id ]; then
109 echo "machine-id exists"
111 if [ -f /usr/var/lib/dbus/machine-id ]; then
112 echo "machine-id exists"
114 echo "Creating machine-id"
115 mkdir -p /usr/var/lib/dbus/
116 dbus-uuidgen > /usr/var/lib/dbus/machine-id
117 dbus-uuidgen --ensure=/usr/var/lib/dbus/machine-id
119 mkdir -p /var/lib/dbus/
120 cp /usr/var/lib/dbus/machine-id /var/lib/dbus/
123 # Set Smack label for db files
124 chsmack -a 'wrt-commons::db_wrt' /opt/dbspace/.wrt.db
125 chsmack -a 'wrt-commons::db_wrt' /opt/dbspace/.wrt.db-journal
126 chsmack -a 'wrt-commons::db_wrt_autosave' /opt/dbspace/.wrt_autosave.db
127 chsmack -a 'wrt-commons::db_wrt_autosave' /opt/dbspace/.wrt_autosave.db-journal
128 chsmack -a 'wrt-commons::db_wrt_custom_handler' /opt/dbspace/.wrt_custom_handler.db
129 chsmack -a 'wrt-commons::db_wrt_custom_handler' /opt/dbspace/.wrt_custom_handler.db-journal
131 echo "[WRT] wrt-commons postinst done ..."
134 %manifest wrt-commons.manifest
137 %{_datadir}/wrt-engine/*
138 %{_datadir}/license/%{name}
139 %attr(755,root,root) %{_bindir}/wrt_commons_create_clean_db.sh
140 %attr(755,root,root) %{_bindir}/wrt_commons_reset_db.sh
142 %attr(755,root,root) %{_bindir}/wrt-commons-tests-*
143 %attr(755,root,root) %{_bindir}/wrt_dao_tests_prepare_db.sh
144 %{_datadir}/dbus-1/services/org.tizen.DBusTestService.service
145 /opt/share/wrt/wrt-commons/tests/*
149 %{_includedir}/dpl-efl/*
150 %{_libdir}/pkgconfig/*.pc