1 #git:slp/pkgs/w/wrt-commons wrt-commons 0.2.68
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)
31 Summary: Wrt common library development headers
32 Group: Development/Libraries
33 Requires: %{name} = %{version}
36 Wrt common library development headers
42 export LDFLAGS+="-Wl,--rpath=%{_libdir} -Wl,--hash-style=both -Wl,--as-needed"
44 cmake . -DVERSION=%{version} \
46 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
47 -DCMAKE_BUILD_TYPE=%{?build_type:%build_type}
51 mkdir -p %{buildroot}/usr/share/license
52 cp %{name} %{buildroot}/usr/share/license/
59 mkdir -p /opt/share/widget/system
60 mkdir -p /opt/share/widget/user
61 mkdir -p /opt/share/widget/exec
62 mkdir -p /opt/share/widget/data/Public
63 mkdir -p /usr/lib/wrt-plugins
66 echo "This is new install of wrt-commons"
67 echo "Calling /usr/bin/wrt_commons_reset_db.sh"
68 /usr/bin/wrt_commons_reset_db.sh
70 # Find out old and new version of databases
71 WRT_OLD_DB_VERSION=`sqlite3 /opt/dbspace/.wrt.db ".tables" | grep "DB_VERSION_"`
72 WRT_NEW_DB_VERSION=`cat /usr/share/wrt-engine/wrt_db.sql | tr '[:blank:]' '\n' | grep DB_VERSION_`
73 echo "OLD wrt database version ${WRT_OLD_DB_VERSION}"
74 echo "NEW wrt database version ${WRT_NEW_DB_VERSION}"
76 if [ ${WRT_OLD_DB_VERSION} -a ${WRT_NEW_DB_VERSION} ]
78 if [ ${WRT_NEW_DB_VERSION} = ${WRT_OLD_DB_VERSION} ]
80 echo "Equal database detected so db installation ignored"
82 echo "Calling /usr/bin/wrt_commons_reset_db.sh"
83 /usr/bin/wrt_commons_reset_db.sh
86 echo "Calling /usr/bin/wrt_commons_reset_db.sh"
87 /usr/bin/wrt_commons_reset_db.sh
92 mkdir -p /usr/apps/org.tizen.policy
95 # WARNING: THIS IS TEMPORARY SOLUTION, AS THIS SHOULD NOT BE OUR
96 # RESPONSIBILITY!!! WE HAVE TO CONTACT TO DBUS MAINAINERS
98 if [ -f /var/lib/dbus/machine-id ]; then
99 echo "machine-id exists"
101 if [ -f /usr/var/lib/dbus/machine-id ]; then
102 echo "machine-id exists"
104 echo "Creating machine-id"
105 mkdir -p /usr/var/lib/dbus/
106 dbus-uuidgen > /usr/var/lib/dbus/machine-id
107 dbus-uuidgen --ensure=/usr/var/lib/dbus/machine-id
109 mkdir -p /var/lib/dbus/
110 cp /usr/var/lib/dbus/machine-id /var/lib/dbus/
113 # Set Smack label for db files
114 chsmack -a 'wrt-commons::db_wrt' /opt/dbspace/.wrt.db
115 chsmack -a 'wrt-commons::db_wrt' /opt/dbspace/.wrt.db-journal
116 chsmack -a 'wrt-commons::db_wrt_autosave' /opt/dbspace/.wrt_autosave.db
117 chsmack -a 'wrt-commons::db_wrt_autosave' /opt/dbspace/.wrt_autosave.db-journal
119 echo "[WRT] wrt-commons postinst done ..."
122 %manifest wrt-commons.manifest
125 /usr/share/wrt-engine/*
126 %attr(775,root,root) %{_bindir}/wrt_commons_reset_db.sh
127 %attr(775,root,root) %{_bindir}/wrt_commons_create_clean_db.sh
128 %{_datadir}/license/%{name}
131 %{_includedir}/dpl-efl/*
132 %{_libdir}/pkgconfig/*.pc