summaryrefslogtreecommitdiff
path: root/packaging/org.tizen.smartsearch.spec
blob: 106ede1708553e14ed14dd6a105a6ec430eddd48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Name:       org.tizen.smartsearch
Summary:    Smartsearch Application
Version:    0.3.16
Release:    1
Group:      main
License:    Flora Software License
Source0:    %{name}-%{version}.tar.gz
Requires:   elementary-bin
BuildRequires: pkgconfig(appcore-efl)
BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(db-util)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(ecore)
BuildRequires: pkgconfig(ecore-imf)
BuildRequires: pkgconfig(ecore-input)
BuildRequires: pkgconfig(ecore-x)
BuildRequires: pkgconfig(elementary)
BuildRequires: pkgconfig(email-service)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(icu-i18n)
BuildRequires: pkgconfig(json-glib-1.0)
BuildRequires: pkgconfig(libsoup-2.4)
BuildRequires: pkgconfig(memo)
BuildRequires: pkgconfig(msg-service)
BuildRequires: pkgconfig(ui-gadget-1)
BuildRequires: pkgconfig(utilX)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(capi-content-media-content)
BuildRequires: pkgconfig(capi-appfw-application)
BuildRequires: pkgconfig(capi-appfw-app-manager)
BuildRequires: pkgconfig(capi-web-favorites)
BuildRequires: libug-contacts-devel
BuildRequires: pkgconfig(cert-svc)
BuildRequires: pkgconfig(cert-svc-vcore)
BuildRequires:  pkgconfig(contacts-service2)
BuildRequires:  pkgconfig(calendar-service2)

BuildRequires:  cmake
BuildRequires:  edje-tools
BuildRequires:  gettext-devel

Requires: libug-worldclock-efl libug-phone-efl org.tizen.browser

%description
Smartsearch Application.

%prep
%setup -q

%build

%define PREFIX    "/usr/apps/org.tizen.smartsearch"
%define RESDIR    "/usr/apps/org.tizen.smartsearch/res"
%define DATADIR    "/opt/usr/apps/org.tizen.smartsearch/data"

cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX}
make %{?jobs:-j%jobs}

%install
%make_install

touch %{buildroot}/opt/usr/apps/org.tizen.smartsearch/data/.search.db
touch %{buildroot}/opt/usr/apps/org.tizen.smartsearch/data/.search.db-journal

%post
SEARCHPKG="org.tizen.smartsearch"

# create db
if [ ! -s /opt/usr/apps/$SEARCHPKG/data/.search.db ]
then   
	sqlite3 /opt/usr/apps/org.tizen.smartsearch/data/.search.db 'PRAGMA journal_mode = PERSIST;
                       CREATE TABLE IF NOT EXISTS search_category (item_name text not null, item_string int, item_visible int, item_order int, item_contents_type int, item_object_type int, def_pkg_name text);'

fi

# owner & permission
chown -R 5000:5000 /opt/usr/apps/$SEARCHPKG/data
chown -R 5000:5000 /opt/usr/apps/$SEARCHPKG/data/.search.db
chown -R 5000:5000 /opt/usr/apps/$SEARCHPKG/data/.search.db-journal

chmod 660 /opt/usr/apps/$SEARCHPKG/data/.search.db
chmod 660 /opt/usr/apps/$SEARCHPKG/data/.search.db-journal

vconftool set -t int file/private/org.tizen.smartsearch/category 0 -u 5000 -g 5000  2> /dev/null
vconftool set -t string file/private/org.tizen.smartsearch/keyword '' -u 5000 -g 5000  2> /dev/null

%files
%manifest org.tizen.smartsearch.manifest
/usr/share/packages/*
/usr/share/icons/default/small/*
/usr/apps/org.tizen.smartsearch/bin/*
/usr/apps/org.tizen.smartsearch/res/*
%attr(-,inhouse,inhouse) /opt/usr/apps/org.tizen.smartsearch/data/
%config(noreplace,missingok) /opt/usr/apps/org.tizen.smartsearch/data/.search.db
%config(noreplace,missingok) /opt/usr/apps/org.tizen.smartsearch/data/.search.db-journal