Release version 0.23.7
[platform/core/appfw/aul-1.git] / packaging / aul.spec
1 Name:       aul
2 Summary:    App utility library
3 Version:    0.23.7
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 %endif
79
80 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
81 %cmake -DFULLVER=%{version} \
82         -DMAJORVER=${MAJORVER} \
83         -D_TIZEN_FEATURE_PRELINK:BOOL=${_TIZEN_FEATURE_PRELINK} \
84         .
85
86 %__make %{?_smp_mflags}
87
88 sqlite3 .appsvc.db < ./data/appsvc_db.sql
89 sqlite3 .component.db < ./parser/component/data/component_db.sql
90
91 %install
92 rm -rf %{buildroot}
93 %make_install
94
95 mkdir -p %{buildroot}%{_tmpfilesdir}
96 mkdir -p %{buildroot}%{TZ_SYS_DB}
97 install -m 0644 .appsvc.db %{buildroot}%{TZ_SYS_DB}
98 install -m 0644 .appsvc.db-journal %{buildroot}%{TZ_SYS_DB}
99 install -m 0644 .component.db %{buildroot}%{TZ_SYS_DB}
100 install -m 0644 .component.db-journal %{buildroot}%{TZ_SYS_DB}
101
102 mkdir -p %{buildroot}%{_datadir}/appsvc
103 cp -R %{_builddir}/%{name}-%{version}/alias/* %{buildroot}%{_datadir}/appsvc
104
105 mkdir -p %{buildroot}%{_sysconfdir}/gumd/useradd.d
106 cp -f scripts/12_appsvc-add.post %{buildroot}%{_sysconfdir}/gumd/useradd.d/12_appsvc-add.post
107
108 %preun
109
110 %post
111 /sbin/ldconfig
112
113 chmod 666 %{TZ_SYS_DB}/.appsvc.db
114 chmod 666 %{TZ_SYS_DB}/.appsvc.db-journal
115 chsmack -a 'User::Home' %{TZ_SYS_DB}/.appsvc.db
116 chsmack -a 'User::Home' %{TZ_SYS_DB}/.appsvc.db-journal
117 chmod 666 %{TZ_SYS_DB}/.component.db
118 chmod 666 %{TZ_SYS_DB}/.component.db-journal
119 chsmack -a 'User::Home' %{TZ_SYS_DB}/.component.db
120 chsmack -a 'User::Home' %{TZ_SYS_DB}/.component.db-journal
121
122
123 %postun
124 /sbin/ldconfig
125
126 %files
127 %license LICENSE
128 %manifest %{name}.manifest
129 %attr(0644,root,root) %{_libdir}/libaul.so.*
130 %config %{_sysconfdir}/dbus-1/system.d/aul.conf
131 %{_bindir}/aul_test
132 %{_bindir}/app_launcher
133 %{_bindir}/appgroup_info
134 %{_bindir}/app_com_tool
135 %{_bindir}/launch_app
136 %{_bindir}/appid2pid
137 %{_bindir}/launch_debug
138 %{_bindir}/compmgr_tool
139 %{_bindir}/appsvc-db-recovery
140 %{_bindir}/component-db-recovery
141 %{_datadir}/aul/miregex/*
142 %{_datadir}/aul/preexec_list.txt
143 %{_datadir}/appsvc/*
144 %{_datadir}/parser-plugins/*
145 %{TZ_SYS_DB}/.appsvc.db*
146 %{TZ_SYS_DB}/.component.db*
147 %{_sysconfdir}/package-manager/parserlib/metadata/libaul-parser.so
148 %{_sysconfdir}/package-manager/parserlib/libcomponent-based-application.so
149 %attr(0755,root,root) %{_sysconfdir}/gumd/useradd.d/*
150 %attr(0755,root,root) %{_datadir}/upgrade/scripts/501.component_upgrade.sh
151
152 %files test
153 %{_bindir}/open_app
154
155 %files devel
156 %{_includedir}/aul/*.h
157 %{_libdir}/*.so
158 %{_libdir}/pkgconfig/*.pc