Release version 0.21.3
[platform/core/appfw/aul-1.git] / packaging / aul.spec
1 Name:       aul
2 Summary:    App utility library
3 Version:    0.21.3
4 Release:    1
5 Group:      Application Framework/Libraries
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1001: %{name}.manifest
9
10 Requires(post):   /sbin/ldconfig
11 Requires(post):   /usr/bin/systemctl
12 Requires(postun): /sbin/ldconfig
13 Requires(postun): /usr/bin/systemctl
14 Requires(preun):  /usr/bin/systemctl
15 Requires:   tizen-platform-config
16
17 BuildRequires:  cmake
18 BuildRequires:  pkgconfig(gio-2.0)
19 BuildRequires:  pkgconfig(glib-2.0)
20 BuildRequires:  pkgconfig(bundle)
21 BuildRequires:  pkgconfig(dlog)
22 BuildRequires:  xdgmime-devel, pkgconfig(xdgmime)
23 BuildRequires:  pkgconfig(vconf)
24 BuildRequires:  pkgconfig(pkgmgr-info)
25 BuildRequires:  libattr-devel
26 BuildRequires:  pkgconfig(libtzplatform-config)
27 BuildRequires:  pkgconfig(capi-system-info)
28 BuildRequires:  pkgconfig(iniparser)
29 BuildRequires:  pkgconfig(sqlite3)
30 BuildRequires:  pkgconfig(storage)
31 BuildRequires:  pkgconfig(ttrace)
32 BuildRequires:  pkgconfig(pkgmgr-installer)
33 BuildRequires:  pkgconfig(libxml-2.0)
34 BuildRequires:  pkgconfig(uuid)
35 BuildRequires:  pkgconfig(libsmack)
36
37 Recommends: amd
38 Recommends: amd-mod-component-manager
39 Recommends: amd-mod-watchdog
40
41 %description
42 Application utility library
43
44 %package devel
45 Summary:    App utility library (devel)
46 Group:      Development/Libraries
47 Requires:   %{name} = %{version}-%{release}
48
49 %description devel
50 Application utility library (devel)
51
52 %package test
53 Summary:    App utility test tools
54 Group:      Development/Libraries
55 Requires:   %{name} = %{version}-%{release}
56
57 %description test
58 Application utility library (test tools)
59
60 %if "%{?_prelink_enable}" == "y"
61 %define tizen_feature_prelink 1
62 %else
63 %define tizen_feature_prelink 0
64 %endif
65
66 %prep
67 %setup -q
68 sed -i 's|TZ_SYS_DB|%{TZ_SYS_DB}|g' %{SOURCE1001}
69 cp %{SOURCE1001} .
70
71 %build
72 %if 0%{?simulator}
73 CFLAGS="%{optflags} -D__emul__"; export CFLAGS
74 %endif
75
76 %if 0%{?tizen_feature_prelink}
77 _TIZEN_FEATURE_PRELINK=ON
78 %else
79 _TIZEN_FEATURE_DEBUG_MODE=ON
80 %endif
81
82 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
83 %cmake -DFULLVER=%{version} \
84         -DMAJORVER=${MAJORVER} \
85         -D_TIZEN_FEATURE_PRELINK:BOOL=${_TIZEN_FEATURE_PRELINK} \
86         -D_TIZEN_FEATURE_DEBUG_MODE:BOOL=${_TIZEN_FEATURE_DEBUG_MODE} \
87         .
88
89 %__make %{?_smp_mflags}
90
91 sqlite3 .appsvc.db < ./data/appsvc_db.sql
92 sqlite3 .component.db < ./parser/component/data/component_db.sql
93
94 %install
95 rm -rf %{buildroot}
96 %make_install
97
98 mkdir -p %{buildroot}%{_tmpfilesdir}
99 mkdir -p %{buildroot}%{TZ_SYS_DB}
100 install -m 0644 .appsvc.db %{buildroot}%{TZ_SYS_DB}
101 install -m 0644 .appsvc.db-journal %{buildroot}%{TZ_SYS_DB}
102 install -m 0644 .component.db %{buildroot}%{TZ_SYS_DB}
103 install -m 0644 .component.db-journal %{buildroot}%{TZ_SYS_DB}
104
105 mkdir -p %{buildroot}%{_datadir}/appsvc
106 cp -R %{_builddir}/%{name}-%{version}/alias/* %{buildroot}%{_datadir}/appsvc
107
108 mkdir -p %{buildroot}%{_sysconfdir}/gumd/useradd.d
109 cp -f scripts/12_appsvc-add.post %{buildroot}%{_sysconfdir}/gumd/useradd.d/12_appsvc-add.post
110
111 %preun
112
113 %post
114 /sbin/ldconfig
115
116 chmod 666 %{TZ_SYS_DB}/.appsvc.db
117 chmod 666 %{TZ_SYS_DB}/.appsvc.db-journal
118 chsmack -a 'User::Home' %{TZ_SYS_DB}/.appsvc.db
119 chsmack -a 'User::Home' %{TZ_SYS_DB}/.appsvc.db-journal
120 chmod 666 %{TZ_SYS_DB}/.component.db
121 chmod 666 %{TZ_SYS_DB}/.component.db-journal
122 chsmack -a 'User::Home' %{TZ_SYS_DB}/.component.db
123 chsmack -a 'User::Home' %{TZ_SYS_DB}/.component.db-journal
124
125
126 %postun
127 /sbin/ldconfig
128
129 %files
130 %license LICENSE
131 %manifest %{name}.manifest
132 %attr(0644,root,root) %{_libdir}/libaul.so.*
133 %config %{_sysconfdir}/dbus-1/system.d/aul.conf
134 %{_bindir}/aul_test
135 %{_bindir}/app_launcher
136 %{_bindir}/appgroup_info
137 %{_bindir}/app_com_tool
138 %{_bindir}/launch_app
139 %{_bindir}/appid2pid
140 %{_bindir}/launch_debug
141 %{_bindir}/compmgr_tool
142 %{_bindir}/appsvc-db-recovery
143 %{_bindir}/component-db-recovery
144 %{_datadir}/aul/miregex/*
145 %{_datadir}/aul/preexec_list.txt
146 %{_datadir}/appsvc/*
147 %{_datadir}/parser-plugins/*
148 %{TZ_SYS_DB}/.appsvc.db*
149 %{TZ_SYS_DB}/.component.db*
150 %{_sysconfdir}/package-manager/parserlib/metadata/libaul-parser.so
151 %{_sysconfdir}/package-manager/parserlib/libcomponent-based-application.so
152 %attr(0755,root,root) %{_sysconfdir}/gumd/useradd.d/*
153 %attr(0755,root,root) %{_datadir}/upgrade/scripts/501.component_upgrade.sh
154
155 %files test
156 %{_bindir}/open_app
157
158 %files devel
159 %{_includedir}/aul/*.h
160 %{_libdir}/*.so
161 %{_libdir}/pkgconfig/*.pc