30186c8822d42749bc39b3640884383bcc4bce30
[platform/core/appfw/vconf-buxton.git] / packaging / vconf-buxton.spec
1 # set overwrite_vconf by default
2 %bcond_without overwrite_vconf
3
4 %if %{with overwrite_vconf}
5 %define libname vconf
6 %define toolname vconftool
7 %else
8 %define libname vconf-buxton
9 %define toolname vconf-buxton-tool
10 %endif
11
12 Name:       vconf-buxton
13 Summary:    Configuration system library
14 Version:    0.3
15 Release:    1
16 Group:      System/Libraries
17 License:    Apache-2.0
18 Source0:    %{name}-%{version}.tar.gz
19 Source1001:     vconf-buxton.manifest
20 Requires(post): /sbin/ldconfig
21 Requires(postun): /sbin/ldconfig
22 BuildRequires:  cmake
23 BuildRequires:  pkgconfig(glib-2.0)
24 BuildRequires:  pkgconfig(buxton)
25 BuildRequires:  pkgconfig(vconf-internal-keys)
26 Obsoletes: vconf
27 Obsoletes:  vconf-devel
28 Obsoletes:  vconf-keys-devel
29 Provides: vconf
30
31 %description 
32 Configuration system library having vconf API and buxton backend
33
34 %package devel
35 Summary:    Vconf-buxton (devel)
36 Requires:   %{name} = %{version}-%{release}
37 Requires:   %{name}-keys-devel = %{version}-%{release}
38 Obsoletes:  vconf-devel
39 Provides:  vconf-devel
40
41 %description devel
42 Vconf library (devel)
43
44 %package keys-devel
45 Summary:    Vconf-buxton (devel)
46 Requires:   %{name} = %{version}-%{release}
47 Requires:   vconf-internal-keys-devel
48 Obsoletes:  vconf-keys-devel
49 Obsoletes:  vconf-devel
50 Provides:  vconf-keys-devel
51
52 %description keys-devel
53 Vconf key management header files
54
55 %prep
56 %setup -q -n %{name}-%{version}
57 cp %{SOURCE1001} .
58
59 %build
60 %cmake -DLIBNAME:STRING=%{libname} -DTOOLNAME:STRING=%{toolname} .
61 make %{?jobs:-j%jobs}
62
63 %install
64 %make_install
65 mv %{buildroot}%{_unitdir}/vconf-buxton-setup.service %{buildroot}%{_unitdir}/%{libname}-setup.service
66 mkdir -p %{buildroot}%{_unitdir}/basic.target.wants
67 ln -sf ../%{libname}-setup.service %{buildroot}%{_unitdir}/basic.target.wants/
68
69 %post
70 /sbin/ldconfig
71 vconf-buxton-init-from-vconf.sh
72
73 %postun
74 /sbin/ldconfig
75
76 %files
77 %manifest %{name}.manifest
78 %license LICENSE.APLv2
79 %{_bindir}/%{toolname}
80 %{_bindir}/vconf-buxton-init-from-vconf.sh
81 %{_bindir}/vconf-buxton-restore-mem-layer.sh
82 %{_bindir}/vconf-buxton-backup-mem-layer.sh
83 %{_libdir}/lib%{libname}.so.*
84 %{_unitdir}/basic.target.wants/%{libname}-setup.service
85 %{_unitdir}/%{libname}-setup.service
86
87 %files devel
88 %manifest %{name}.manifest
89 %{_includedir}/vconf/vconf.h
90 %{_includedir}/vconf/vconf-buxton.h
91 %{_libdir}/pkgconfig/%{libname}.pc
92 %{_libdir}/lib%{libname}.so
93
94 %files keys-devel
95 %manifest %{name}.manifest
96 %{_includedir}/vconf/vconf-keys.h
97 %{_includedir}/vconf/vconf-buxton-keys.h
98