summaryrefslogtreecommitdiff
path: root/packaging/org.tizen.smartsearch.spec
blob: 9f1da15f4c7d3f13021fe81a6477f4bb340f846b (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
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(calendar)
BuildRequires: pkgconfig(contacts-service)
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:  cmake
BuildRequires:  edje-tools
BuildRequires:  gettext-devel
%description
Smartsearch Application.

%prep
%setup -q

%build

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

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

%install
%make_install

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

%post
SEARCHPKG="org.tizen.smartsearch"

# create db
if [ ! -s /opt/apps/$SEARCHPKG/data/.search.db ]
then   
	sqlite3 /opt/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/apps/$SEARCHPKG/data
chown -R 5000:5000 /opt/apps/$SEARCHPKG/data/.search.db
chown -R 5000:5000 /opt/apps/$SEARCHPKG/data/.search.db-journal

chmod 660 /opt/apps/$SEARCHPKG/data/.search.db
chmod 660 /opt/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
/opt/share/packages/*
/opt/share/icons/default/small/*
/opt/apps/org.tizen.smartsearch/bin/*
/opt/apps/org.tizen.smartsearch/res/*
%attr(-,inhouse,inhouse) /opt/apps/org.tizen.smartsearch/data/
%config(noreplace,missingok) /opt/apps/org.tizen.smartsearch/data/.search.db
%config(noreplace,missingok) /opt/apps/org.tizen.smartsearch/data/.search.db-journal
/opt/apps/org.tizen.smartsearch/share/process-info/smartsearch.ini