1 # TODO: PLDify init script
4 %bcond_with db # BerkeleyDB backend [slightly outdated]
5 %bcond_with gconf # GConf backend [same as above]
6 %bcond_with python # Python binding [same as above]
8 Summary: A key/value pair database to store software configurations
9 Summary(pl.UTF-8): Baza kluczy/wartości do przechowywania konfiguracji oprogramowania
14 Group: Applications/System
15 Source0: http://www.libelektra.org/ftp/elektra/releases/%{name}-%{version}.tar.gz
16 # Source0-md5: 29f14be7693ae627fb8cc30a079b10c9
17 Patch0: %{name}-elektraenv.patch
18 Patch1: %{name}-am.patch
19 URL: http://www.libelektra.org/
20 %{?with_gconf:BuildRequires: GConf2-devel}
21 BuildRequires: autoconf >= 2.59
22 BuildRequires: automake
23 %{?with_db:BuildRequires: db-devel}
24 BuildRequires: doxygen
25 BuildRequires: gettext-devel
26 BuildRequires: libstdc++-devel
27 BuildRequires: libltdl-devel
28 BuildRequires: libtool
29 BuildRequires: libxml2-devel
30 BuildRequires: libxslt-progs
31 BuildRequires: pkgconfig
32 %{?with_python:BuildRequires: python-devel}
33 Requires: %{name}-libs = %{version}-%{release}
35 # for /usr/share/sgml dir
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 %define _sbindir /sbin
44 The Elektra Project provides a framework to store generic
45 configuration data in an hierarchical key-value pair database, instead
46 of a human-readable only text file.
48 This way any software can read/save his configuration using a
49 consistent API. Also, applications can be aware of other applications
50 configurations, leveraging easy application integration.
52 %description -l pl.UTF-8
53 Projekt Elektra dostarcza szkielet do przechowywania typowych danych
54 konfiguracyjnych w postaci klucz-wartość w hierarchicznej bazie
55 danych, zamiast w pliku tekstowym czytelnym tylko dla człowieka.
57 W ten sposób oprogramowanie może odczytywać/zapisywać konfigurację za
58 pomocą spójnego API. Dodatkowo aplikacje mogą być zorientowane w
59 konfiguracji innych aplikacji, ułatwiając ich integrację.
62 Summary: Elektra Project libraries
63 Summary(pl.UTF-8): Biblioteki projektu Elektra
65 Conflicts: elektra < 0.7
68 The Elektra Project provides a framework to store generic
69 configuration data in an hierarchical key-value pair database, instead
70 of a human-readable only text file.
72 This way any software can read/save his configuration using a
73 consistent API. Also, applications can be aware of other applications
74 configurations, leveraging easy application integration.
76 This package contains Elektra shared libraries.
78 %description libs -l pl.UTF-8
79 Projekt Elektra dostarcza szkielet do przechowywania typowych danych
80 konfiguracyjnych w postaci klucz-wartość w hierarchicznej bazie
81 danych, zamiast w pliku tekstowym czytelnym tylko dla człowieka.
83 W ten sposób oprogramowanie może odczytywać/zapisywać konfigurację za
84 pomocą spójnego API. Dodatkowo aplikacje mogą być zorientowane w
85 konfiguracji innych aplikacji, ułatwiając ich integrację.
87 Ten pakiet zawiera biblioteki współdzielone Elektry.
90 Summary: Include files and API documentation for Elektra Project
91 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja API projektu Elektra
92 Group: Development/Libraries
93 Requires: %{name}-libs = %{version}-%{release}
96 This package contains the include files and API manual pages to use
99 %description devel -l pl.UTF-8
100 Ten pakiet zawiera pliki nagłówkowe oraz strony podręcznika
101 systemowego opisującego sposób użycia API Elektry w C.
104 Summary: Static libraries for Elektra Project
105 Summary(pl.UTF-8): Statyczne biblioteki projektu Elektra
106 Group: Development/Libraries
107 Requires: %{name}-devel = %{version}-%{release}
110 This package contains static libraries for Elektra Project.
112 %description static -l pl.UTF-8
113 Ten pakiet zawiera statyczne biblioteki projektu Elektra.
116 Summary: C++ interface for Elektra library
117 Summary(pl.UTF-8): Interfejs C++ do biblioteki Elektra
119 Requires: %{name}-libs = %{version}-%{release}
122 C++ interface for Elektra library.
124 %description cpp -l pl.UTF-8
125 Interfejs C++ do biblioteki Elektra.
128 Summary: Header files of C++ interface for Elektra library
129 Summary(pl.UTF-8): Pliki nagłówkowe interfejsu C++ do biblioteki Elektra
130 Group: Development/Libraries
131 Requires: %{name}-cpp = %{version}-%{release}
132 Requires: %{name}-libs = %{version}-%{release}
133 Requires: libstdc++-devel
135 %description cpp-devel
136 Header files of C++ interface for Elektra library.
138 %description cpp-devel -l pl.UTF-8
139 Pliki nagłówkowe interfejsu C++ do biblioteki Elektra.
142 Summary: Static library of C++ interface for Elektra library
143 Summary(pl.UTF-8): Biblioteka statyczna interfejsu C++ do biblioteki Elektra
144 Group: Development/Libraries
145 Requires: %{name}-cpp-devel = %{version}-%{release}
147 %description cpp-static
148 Static library of C++ interface for Elektra library.
150 %description cpp-static -l pl.UTF-8
151 Biblioteka statyczna interfejsu C++ do biblioteki Elektra.
159 cp -f /usr/share/gettext/config.rpath .
167 --disable-ltdl-install \
168 %{?with_db:--enable-berkeleydb} \
169 %{?with_gconf:--enable-gconf} \
171 %{?with_python:--enable-python}
172 # also outdated (as of 0.7.2): daemon, fstab
176 rm -rf $RPM_BUILD_ROOT
177 install -d $RPM_BUILD_ROOT/etc/sysconfig
180 DESTDIR=$RPM_BUILD_ROOT \
181 elektrainitdir=/etc/rc.d/init.d
183 %{!?with_berkeleydb:%{__rm} $RPM_BUILD_ROOT/%{_lib}/elektra/libelektra-ddefault.so}
187 install -d installed-doc
188 mv $RPM_BUILD_ROOT%{_docdir}/%{name}-devel installed-doc/elektra-api
189 mv $RPM_BUILD_ROOT%{_docdir}/%{name}/scripts installed-doc/scripts
190 rmdir $RPM_BUILD_ROOT%{_docdir}/%{name}
192 echo 'RUN="no"' > $RPM_BUILD_ROOT/etc/sysconfig/elektra
194 # move devel files to /usr
195 %{__mv} $RPM_BUILD_ROOT/%{_lib}/libelektra.a $RPM_BUILD_ROOT%{_libdir}
196 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libelektra.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libelektra.so
197 %{__rm} $RPM_BUILD_ROOT/%{_lib}/libelektra.so
200 %{__rm} $RPM_BUILD_ROOT/%{_lib}/elektra/*.{la,a}
201 # obsoleted by pkg-config
202 %{__rm} $RPM_BUILD_ROOT/%{_lib}/lib*.la \
203 $RPM_BUILD_ROOT%{_libdir}/lib*.la
206 rm -rf $RPM_BUILD_ROOT
209 # Create basic key structure for apps
210 kdb set -t dir system/sw || :
211 kdb set system/sw/kdb/schemapath "%{_datadir}/sgml/elektra-0.7.1/elektra.xsd"
213 %post libs -p /sbin/ldconfig
214 %postun libs -p /sbin/ldconfig
216 %post cpp -p /sbin/ldconfig
217 %postun cpp -p /sbin/ldconfig
220 %defattr(644,root,root,755)
221 %doc AUTHORS COPYING ChangeLog NEWS README TODO doc/standards installed-doc/scripts
222 %attr(755,root,root) /bin/kdb
223 %attr(755,root,root) /bin/kdb_static
224 %attr(755,root,root) /bin/preload
225 %attr(755,root,root) /bin/preload_static
226 %dir /%{_lib}/elektra
227 %attr(755,root,root) /%{_lib}/elektra/libelektra-default.so
228 %attr(755,root,root) /%{_lib}/elektra/libelektra-filesys.so*
229 %attr(755,root,root) /%{_lib}/elektra/libelektra-hosts.so*
230 %attr(755,root,root) /%{_lib}/elektra/libelektra-passwd.so*
232 %attr(755,root,root) /%{_lib}/elektra/libelektra-berkeleydb.so*
233 %attr(755,root,root) /%{_lib}/elektra/libelektra-ddefault.so
236 %attr(755,root,root) /%{_lib}/elektra/libelektra-gconf.so*
238 %attr(754,root,root) /etc/rc.d/init.d/kdbd
239 %attr(755,root,root) /etc/profile.d/elektraenv.sh
240 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/elektra
241 %{_datadir}/sgml/elektra-0.7.1
242 %{_mandir}/man1/kdb.1*
243 %{_mandir}/man5/elektra.5*
244 %{_mandir}/man7/elektra.7*
247 %defattr(644,root,root,755)
248 %attr(755,root,root) /%{_lib}/libelektra.so.*.*.*
249 %attr(755,root,root) %ghost /%{_lib}/libelektra.so.3
250 %attr(755,root,root) %{_libdir}/libelektratools.so.*.*.*
251 %attr(755,root,root) %ghost %{_libdir}/libelektratools.so.2
254 %defattr(644,root,root,755)
255 %doc installed-doc/elektra-api/*
256 %attr(755,root,root) %{_libdir}/libelektra.so
257 %attr(755,root,root) %{_libdir}/libelektratools.so
258 %{_includedir}/kdb*.h
259 %{_pkgconfigdir}/elektra.pc
260 %{_pkgconfigdir}/elektratools.pc
261 %{_mandir}/man3/kdb*.3*
262 # too generic name, conflicting with e.g. allegro
263 #%{_mandir}/man3/key.3*
264 %{_mandir}/man3/keymeta.3*
265 %{_mandir}/man3/keyname.3*
266 %{_mandir}/man3/keyset.3*
267 %{_mandir}/man3/keytest.3*
268 %{_mandir}/man3/keyvalue.3*
271 %defattr(644,root,root,755)
272 %{_libdir}/libelektra.a
273 %{_libdir}/libelektratools.a
276 %defattr(644,root,root,755)
277 %attr(755,root,root) %{_libdir}/libelektra-cpp.so.*.*.*
278 %attr(755,root,root) %ghost %{_libdir}/libelektra-cpp.so.0
281 %defattr(644,root,root,755)
282 %attr(755,root,root) %{_libdir}/libelektra-cpp.so
285 %{_includedir}/keyset
286 %{_pkgconfigdir}/elektracpp.pc
289 %defattr(644,root,root,755)
290 %{_libdir}/libelektra-cpp.a