Add default Smack manifest for elektra.spec
[pkgs/e/elektra.git] / elektra.mandriva.spec
1 %define name    elektra 
2 %define version 0.6.3
3 %define release %mkrel 1 
4
5 Name:          %{name}
6 Version:       %{version}
7 Release:       %{release}
8 Source:        http://aleron.dl.sourceforge.net/sourceforge/elektra/%{name}-%{version}.tar.bz2
9 Group:         System Environment/Libraries
10 License:       BSD
11 URL:           http://elektra.sourceforge.net
12 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-buildroot
13 BuildRequires: doxygen docbook-style-xsl db4-devel libGConf1-devel libxml2-devel libtool libxslt-proc
14 Summary:       A key/value pair database to store software configurations
15
16 %define DTDVERSION 0.1.1
17
18 %description
19 The Elektra Project provides a framework to store generic configuration data
20 in an hierarchical key-value pair database, instead of a human-readable only
21 text file.
22
23 This way any software can read/save his configuration using a consistent API.
24 Also, applications can be aware of other applications configurations,
25 leveraging easy application integration.
26
27
28 %package devel
29 Summary:      Include files and API documentation for Elektra Project
30 Group:        Development/System
31 Requires:     elektra = %{version}-%{release}
32
33 %description devel
34 The Elektra Project provides a framework to store generic configuration data
35 in an hierarchical key-value pair database, instead of a human-readable only
36 text file.
37
38 This way any software can read/save his configuration using a consistent API.
39 Also, applications can be aware of other applications configurations,
40 leveraging easy application integration.
41
42 This package contains the include files and API manual pages to use the Elektra
43 API in C.
44
45 It also provides the framework to create storage backends to libelektra.so
46
47
48 %package backend-gconf
49 Summary:      A GConf backend for Elektra
50 Group:        System Environment/Libraries
51 Requires:     elektra
52
53 %description backend-gconf
54 The Elektra Project provides a framework to store generic configuration data
55 in an hierarchical key-value pair database, instead of a human-readable only
56 text file.
57
58 This way any software can read/save his configuration using a consistent API.
59 Also, applications can be aware of other applications configurations,
60 leveraging easy application integration.
61
62 This package contains a GConf backend for Elektra, to let Elektra use a GConf
63 daemon to store its keys.
64
65 %package backend-berkeleydb
66 Summary:      Include files and API documentation for Elektra Project
67 Group:        System Environment/Libraries
68 Requires:     elektra
69
70
71 %description backend-berkeleydb
72 The Elektra Project provides a framework to store generic configuration data
73 in an hierarchical key-value pair database, instead of a human-readable only
74 text file.
75
76 This way any software can read/save his configuration using a consistent API.
77 Also, applications can be aware of other applications configurations,
78 leveraging easy application integration.
79
80 This package contains a Berkeley DB backend for Elektra, to let Elektra use
81 Berkeley DB databases to store its keys.
82
83 %debug_package
84
85 %prep
86 %setup
87
88 %build
89 %configure \
90      --bindir=/bin \
91      --sbindir=/sbin \
92      --libdir=/%{_lib} \
93      --with-docdir=%{_defaultdocdir}/elektra-%{version} \
94      --with-develdocdir=%{_defaultdocdir}/elektra-devel-%{version} \
95      --disable-xmltest \
96      --with-docbook=%{_datadir}/sgml/docbook/xsl-stylesheets
97 %make
98
99 %install
100 rm -rf $RPM_BUILD_ROOT
101 make DESTDIR=$RPM_BUILD_ROOT install
102 # Move .a files to -devel package
103 mv $RPM_BUILD_ROOT/%{_lib}/libelektra.a $RPM_BUILD_ROOT/%{_libdir}
104
105 # Prepare devel files
106 rm $RPM_BUILD_ROOT/%{_lib}/libelektra.so
107 ln -sf ../../%{_lib}/libelektra.so.2 $RPM_BUILD_ROOT/%{_libdir}/libelektra.so
108
109 # Remove old .la files
110 #rm $RPM_BUILD_ROOT/usr/lib/libelektra-*.a
111 rm $RPM_BUILD_ROOT/%{_lib}/*.la
112 rm $RPM_BUILD_ROOT/%{_lib}/elektra/*.la
113 rm $RPM_BUILD_ROOT/%{_libdir}/*.la
114
115 # Remove a file that conflicts with other packages
116 rm $RPM_BUILD_ROOT/%{_mandir}/man3/key.3*
117
118 # Remove documentation from 'make install', to let RPM package it allone
119 rm -rf $RPM_BUILD_ROOT/%{_defaultdocdir}
120 rm -rf scripts/Makefile*
121 rm -rf examples/Makefile*
122 rm -rf examples/.deps
123 rm -rf doc/standards/Makefile*
124 mv doc/elektra-api/html doc/elektra-api/api-html
125
126 %clean
127 rm -rf $RPM_BUILD_ROOT
128
129 %post
130 /sbin/ldconfig
131 # Backwards compatibility, from the Linux Registry days
132 # if [ -d /etc/registry -a ! -d /etc/kdb ]; then
133 #       mv /etc/registry /etc/kdb
134 #       ln -s kdb /etc/registry
135 # fi
136
137 # Create basic key structure for apps
138 kdb set -t dir system/sw
139 kdb set system/sw/kdb/current/schemapath "%{_datadir}/sgml/elektra-0.1.1/elektra.xsd"
140
141
142 %postun -p /sbin/ldconfig
143
144
145
146 %files
147 %defattr(-,root,root,-)
148 /bin/*
149 /sbin/*
150 /%{_lib}/*elektra.so*
151 %dir /%{_lib}/elektra
152 /%{_lib}/elektra/*elektra-daemon.so*
153 /%{_lib}/elektra/*elektra-filesys.so*
154 /%{_lib}/elektra/*elektra-default.so*
155 /%{_lib}/elektra/*elektra-ddefault.so*
156 /%{_lib}/elektra/*elektra-fstab.so*
157 #/%{_lib}/elektra/*elektra-ini.so*
158 %{_libdir}/*elektratools.so.*
159 %{_libdir}/elektra/*elektratools.so
160 %{_sysconfdir}/profile.d/*
161 %doc AUTHORS COPYING ChangeLog README INSTALL
162 %doc scripts doc/standards
163 %{_mandir}/man1/*
164 %{_mandir}/man7/*
165 %{_mandir}/man5/*
166 %{_datadir}/sgml/*
167
168 %files devel
169 %defattr(-,root,root,-)
170 %{_includedir}/*
171 %{_libdir}/*.a
172 %{_libdir}/libelektra.so
173 %{_libdir}/libelektratools.so
174 %{_libdir}/pkgconfig/*
175 %doc examples doc/elektra-api/api-html
176 %{_mandir}/man3/*
177
178 # %files backend-gconf
179 # %defattr(-,root,root,0755)
180 # %{_prefix}/%{_libdir}/*gconf.so*
181
182 %files backend-berkeleydb
183 %defattr(-,root,root,0755)
184 /%{_lib}/elektra/*berkeleydb.so*
185
186
187 %changelog
188 * Sat Aug 6 2006 Yannick Lecaillez <sizon5@gmail.com> 0.6.3
189 - Adapted to Mandriva from the spec for Fedora made by Avi Alkalay