Add uid attribute of ThemeInfo
[platform/core/appfw/tizen-theme-manager.git] / packaging / tizen-theme-manager.spec
1 Name:       tizen-theme-manager
2 Summary:    Tizen Theme Manager
3 Version:    0.0.1
4 Release:    1
5 Group:      Application Framework/Package Management
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1001: %{name}.manifest
9 BuildRequires:  cmake
10 BuildRequires:  pkgconfig(bundle)
11 BuildRequires:  pkgconfig(dlog)
12 BuildRequires:  pkgconfig(glib-2.0)
13 BuildRequires:  pkgconfig(gobject-2.0)
14 BuildRequires:  pkgconfig(gmock)
15 BuildRequires:  pkgconfig(jsoncpp)
16 BuildRequires:  pkgconfig(pkgmgr-parser)
17 BuildRequires:  pkgconfig(pkgmgr-info)
18 BuildRequires:  pkgconfig(pkgmgr-installer)
19 BuildRequires:  pkgconfig(sqlite3)
20
21 %if 0%{?gcov:1}
22 BuildRequires:  lcov
23 BuildRequires:  zip
24 %endif
25
26 %description
27 Tizen Theme Manager
28
29
30 %prep
31 %setup -q
32 cp %{SOURCE1001} .
33
34 %build
35 %if 0%{?gcov:1}
36 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
37 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
38 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
39 export LDFLAGS+=" -lgcov"
40 %endif
41
42 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
43 %cmake . -DCMAKE_VERBOSE_MAKEFILE:BOOL=%{?verbose_make:ON}%{!?verbose_make:OFF} \
44          -DUNITDIR=%{_unitdir} \
45          -DFULLVER=%{version} \
46          -DMAJORVER=${MAJORVER}
47
48 %__make %{?_smp_mflags}
49
50 %if 0%{?gcov:1}
51 mkdir -p gcov-obj
52 find . -name '*.gcno' ! -path './gcov-obj/*' -exec cp '{}' gcov-obj ';'
53 %endif
54
55 %check
56 export LD_LIBRARY_PATH=../../src/theme:../../src/theme_provider:../../src/theme_plugin
57 ctest -V
58 %if 0%{?gcov:1}
59 lcov -c --ignore-errors graph --no-external -q -d . -o tizen-theme-manager.info
60 genhtml tizen-theme-manager.info -o tizen-theme-manager.out
61 zip -r tizen-theme-manager.zip tizen-theme-manager.out
62 install -m 0644 tizen-theme-manager.zip %{buildroot}%{_datadir}/gcov/
63 %endif
64
65 %install
66 %make_install
67
68 %if 0%{?gcov:1}
69 mkdir -p %{buildroot}%{_datadir}/gcov/obj
70 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
71 %endif
72
73 %post
74 /sbin/ldconfig
75
76 %files
77 %defattr(-,root,root,-)
78 %manifest %{name}.manifest
79 %license LICENSE
80 %{_bindir}/*
81 %{_libdir}/libtizen-theme.so
82 %{_libdir}/libtizen-theme-provider.so
83 %{_sysconfdir}/package-manager/parserlib/metadata/libtizen-theme-plugin.so
84 %{_datarootdir}/parser-plugins/tizen-theme-plugin.info
85 %{_unitdir}/theme-manager.service
86 %config %{_sysconfdir}/dbus-1/system.d/*theme_manager*.conf
87
88 #################################################
89 # tizen-theme-manager-gcov
90 #################################################
91 %if 0%{?gcov:1}
92 %package gcov
93 Summary:    Simple string key-val dictionary ADT (gcov)
94 Group:      Application Framework/Testing
95
96 %description gcov
97 Simple string key-val dictionary ADT gcov objects
98 %endif
99
100 %if 0%{?gcov:1}
101 %files gcov
102 %defattr(-,root,root,-)
103 %{_datadir}/gcov/*
104 %endif