]> git.pld-linux.org Git - packages/elektra.git/blobdiff - elektra.spec
- updated to 0.7.2
[packages/elektra.git] / elektra.spec
index 248e44be480f0d1870b8ee6861d528066a8d256c..58df0149166ed66531f161832388ce34352715cd 100644 (file)
-Summary:       A registry to store general key-value pairs instead of text configuration files
-Summary(pl):   Rejestr do przechowywania par klucz-warto¶æ u¿ywany zamiast plików konfiguracyjnych
+# TODO: PLDify init script
+#
+# Conditonal build:
+%bcond_with    db      # BerkeleyDB backend [slightly outdated]
+%bcond_with    gconf   # GConf backend [same as above]
+%bcond_with    python  # Python binding [same as above]
+#
+Summary:       A key/value pair database to store software configurations
+Summary(pl.UTF-8):     Baza kluczy/wartości do przechowywania konfiguracji oprogramowania
 Name:          elektra
-Version:       0.4.6
-Release:       1
+Version:       0.7.2
+Release:       0.1
 License:       BSD
-Vendor:                Avi Alkalay <avi@unix.sh>
-Group:         Base
-Source0:       http://dl.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
-# Source0-md5: f032ec83ffe91f2e7c2a0d70f67749eb
-URL:           http://elektra.sf.net
-BuildRequires: docbook-style-xsl
+Group:         Applications/System
+Source0:       http://www.libelektra.org/ftp/elektra/releases/%{name}-%{version}.tar.gz
+# Source0-md5: 29f14be7693ae627fb8cc30a079b10c9
+Patch0:                %{name}-elektraenv.patch
+Patch1:                %{name}-am.patch
+URL:           http://www.libelektra.org/
+%{?with_gconf:BuildRequires:   GConf2-devel}
+BuildRequires: autoconf >= 2.59
+BuildRequires: automake
+%{?with_db:BuildRequires:      db-devel}
+BuildRequires: doxygen
+BuildRequires: gettext-devel
+BuildRequires: libstdc++-devel
+BuildRequires: libltdl-devel
+BuildRequires: libtool
+BuildRequires: libxml2-devel
 BuildRequires: libxslt-progs
-Obsoletes:     registry
+BuildRequires: pkgconfig
+%{?with_python:BuildRequires:  python-devel}
 Requires:      %{name}-libs = %{version}-%{release}
+Requires:      mktemp
+# for /usr/share/sgml dir
+Requires:      sgml-common
+Obsoletes:     registry
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%description
-The Linux Registry is an alternative back-end for text configuration
-files.
+%define                _bindir         /bin
+%define                _sbindir        /sbin
 
-Instead of each program to have its own text configuration files, the
-Registry tries to provide a universal, fast, consistent, robust,
-thread-safe and transactional infrastructure to store configuration
-parameters through a key-value pair mechanism.
+%description
+The Elektra Project provides a framework to store generic
+configuration data in an hierarchical key-value pair database, instead
+of a human-readable only text file.
 
 This way any software can read/save his configuration using a
 consistent API. Also, applications can be aware of other applications
 configurations, leveraging easy application integration.
 
-%description -l pl
-Rejestr Linux jest alternatyw± dla zaplecza w postaci tekstowych
-plików konfiguracyjnych.
+%description -l pl.UTF-8
+Projekt Elektra dostarcza szkielet do przechowywania typowych danych
+konfiguracyjnych w postaci klucz-wartość w hierarchicznej bazie
+danych, zamiast w pliku tekstowym czytelnym tylko dla człowieka.
 
-Ka¿dy program, zamiast przechowywaæ informacje konfiguracyjne w swoim
-w³asnym pliku mo¿e u¿yæ Rejestru, który udostêpnia uniwersaln±,
-szybk±, spójn±, niezawodn±, bezpieczn± dla aplikacji opartych na
-w±tkach i transakcyjn± infrastrukturê s³u¿±c± do przechowywania
-parametrów konfiguracyjnych poprzez mechanizm: klucz-warto¶æ.
+W ten sposób oprogramowanie może odczytywać/zapisywać konfigurację za
+pomocą spójnego API. Dodatkowo aplikacje mogą być zorientowane w
+konfiguracji innych aplikacji, ułatwiając ich integrację.
 
-W ten sposób ka¿da aplikacja mo¿e odczytaæ/zapisaæ swoj± konfiguracjê
-u¿ywaj±c spójnego API. Co wiêcej, aplikacje mog± w ten sposób
-wzajemnie zdawaæ sobie sprawê o swoich konfiguracjach co wspomaga
-ich integrowanie.
-
-%package devel
-Summary:       Include files and API documentation for the Linux Registry
-Summary(pl):   Pliki nag³ówkowe i dokumentacja API dla Rejestru Linux
-Group:         Development/Libraries
-Requires:      %{name}-libs = %{version}-%{release}
-
-%description devel
-The Linux Registry is an alternative back-end for text configuration
-files.
+%package libs
+Summary:       Elektra Project libraries
+Summary(pl.UTF-8):     Biblioteki projektu Elektra
+Group:         Libraries
+Conflicts:     elektra < 0.7
 
-Instead of each program to have its own text configuration files, the
-Registry tries to provide a universal, fast, consistent, robust,
-thread-safe and transactional infrastructure to store configuration
-parameters through a key-value pair mechanism.
+%description libs
+The Elektra Project provides a framework to store generic
+configuration data in an hierarchical key-value pair database, instead
+of a human-readable only text file.
 
 This way any software can read/save his configuration using a
 consistent API. Also, applications can be aware of other applications
 configurations, leveraging easy application integration.
 
-This package contains the include files and API manual pages to use
-the Registry API in C.
+This package contains Elektra shared libraries.
 
-%description devel -l pl
-Rejestr Linux jest alternatyw± dla zaplecza w postaci tekstowych
-plików konfiguracyjnych.
+%description libs -l pl.UTF-8
+Projekt Elektra dostarcza szkielet do przechowywania typowych danych
+konfiguracyjnych w postaci klucz-wartość w hierarchicznej bazie
+danych, zamiast w pliku tekstowym czytelnym tylko dla człowieka.
 
-Ka¿dy program, zamiast przechowywaæ informacje konfiguracyjne w swoim
-w³asnym pliku mo¿e u¿yæ Rejestru, który udostêpnia uniwersaln±,
-szybk±, spójn±, niezawodn±, bezpieczn± dla aplikacji opatrych na
-w±tkach i transakcyjn± infrastrukturê s³u¿±c± do przechowwania
-parametrów konfiguracyjnych poprzez mechanizm: klucz-warto¶æ.
+W ten sposób oprogramowanie może odczytywać/zapisywać konfigurację za
+pomocą spójnego API. Dodatkowo aplikacje mogą być zorientowane w
+konfiguracji innych aplikacji, ułatwiając ich integrację.
 
-W ten sposób ka¿da aplikacja mo¿e odczytaæ/zapisaæ swoj± konfiguracjê
-u¿ywaj±c spójnego API. Co wiêcej, aplikacje mog± w ten sposób
-wzajemnie zdawaæ sobie sprawê o swoich konfiguracjach co wspomaga
-ich integrowanie.
+Ten pakiet zawiera biblioteki współdzielone Elektry.
 
-Ten pakiet zawiera pliki nag³ówkowe i strony podrêcznika API, aby
-u¿ywaæ Rejestru z poziomu programów pisanych w jêzyku C.
-
-%package examples
-Summary:       Example source files for the Linux Registry
-Summary(pl):   Przyk³adowe pliki ¼ród³owe dla Rejestru Linux
+%package devel
+Summary:       Include files and API documentation for Elektra Project
+Summary(pl.UTF-8):     Pliki nagłówkowe i dokumentacja API projektu Elektra
 Group:         Development/Libraries
-Requires:      %{name}-devel = %{version}-%{release}
-
-%description examples
-The Linux Registry is an alternative back-end for text configuration
-files.
-
-Instead of each program to have its own text configuration files, the
-Registry tries to provide a universal, fast, consistent, robust,
-thread-safe and transactional infrastructure to store configuration
-parameters through a key-value pair mechanism.
-
-This way any software can read/save his configuration using a
-consistent API. Also, applications can be aware of other applications
-configurations, leveraging easy application integration.
+Requires:      %{name}-libs = %{version}-%{release}
 
-This package contains the example source files for the Linux Registry.
+%description devel
+This package contains the include files and API manual pages to use
+the Elektra API in C.
 
-%description examples -l pl
-Rejestr Linux jest alternatyw± dla zaplecza w postaci tekstowych
-plików konfiguracyjnych.
+%description devel -l pl.UTF-8
+Ten pakiet zawiera pliki nagłówkowe oraz strony podręcznika
+systemowego opisującego sposób użycia API Elektry w C.
 
-Ka¿dy program, zamiast przechowywaæ informacje konfiguracyjne w swoim
-w³asnym pliku mo¿e u¿yæ Rejestru, który udostêpnia uniwersaln±,
-szybk±, spójn±, niezawodn±, bezpieczn± dla aplikacji opatrych na
-w±tkach i transakcyjn± infrastrukturê s³u¿±c± do przechowwania
-parametrów konfiguracyjnych poprzez mechanizm: klucz-warto¶æ.
+%package static
+Summary:       Static libraries for Elektra Project
+Summary(pl.UTF-8):     Statyczne biblioteki projektu Elektra
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
 
-W ten sposób ka¿da aplikacja mo¿e odczytaæ/zapisaæ swoj± konfiguracjê
-u¿ywaj±c spójnego API. Co wiêcej, aplikacje mog± w ten sposób
-wzajemnie zdawaæ sobie sprawê o swoich konfiguracjach co wspomaga
-ich integrowanie.
+%description static
+This package contains static libraries for Elektra Project.
 
-Ten pakiet zawiera przyk³adowe pliki ¼ród³owe dla Rejestru Linux.
+%description static -l pl.UTF-8
+Ten pakiet zawiera statyczne biblioteki projektu Elektra.
 
-%package libs
-Summary:       Library files for the Linux Registry
-Summary(pl):   Pliki biblioteki dla Rejestru Linux
-Group:         Base
+%package cpp
+Summary:       C++ interface for Elektra library
+Summary(pl.UTF-8):     Interfejs C++ do biblioteki Elektra
+Group:         Libraries
+Requires:      %{name}-libs = %{version}-%{release}
 
-%description libs
-The Linux Registry is an alternative back-end for text configuration
-files.
+%description cpp
+C++ interface for Elektra library.
 
-Instead of each program to have its own text configuration files, the
-Registry tries to provide a universal, fast, consistent, robust,
-thread-safe and transactional infrastructure to store configuration
-parameters through a key-value pair mechanism.
+%description cpp -l pl.UTF-8
+Interfejs C++ do biblioteki Elektra.
 
-This way any software can read/save his configuration using a
-consistent API. Also, applications can be aware of other applications
-configurations, leveraging easy application integration.
+%package cpp-devel
+Summary:       Header files of C++ interface for Elektra library
+Summary(pl.UTF-8):     Pliki nagłówkowe interfejsu C++ do biblioteki Elektra
+Group:         Development/Libraries
+Requires:      %{name}-cpp = %{version}-%{release}
+Requires:      %{name}-libs = %{version}-%{release}
+Requires:      libstdc++-devel
 
-This package contains the library files, which are necessary for the
-applications to work with the Registry.
+%description cpp-devel
+Header files of C++ interface for Elektra library.
 
-%description libs -l pl
-Rejestr Linux jest alternatyw± dla zaplecza w postaci tekstowych
-plików konfiguracyjnych.
+%description cpp-devel -l pl.UTF-8
+Pliki nagłówkowe interfejsu C++ do biblioteki Elektra.
 
-Ka¿dy program, zamiast przechowywaæ informacje konfiguracyjne w swoim
-w³asnym pliku mo¿e u¿yæ Rejestru, który udostêpnia uniwersaln±,
-szybk±, spójn±, niezawodn±, bezpieczn± dla aplikacji opatrych na
-w±tkach i transakcyjn± infrastrukturê s³u¿±c± do przechowwania
-parametrów konfiguracyjnych poprzez mechanizm: klucz-warto¶æ.
+%package cpp-static
+Summary:       Static library of C++ interface for Elektra library
+Summary(pl.UTF-8):     Biblioteka statyczna interfejsu C++ do biblioteki Elektra
+Group:         Development/Libraries
+Requires:      %{name}-cpp-devel = %{version}-%{release}
 
-W ten sposób ka¿da aplikacja mo¿e odczytaæ/zapisaæ swoj± konfiguracjê
-u¿ywaj±c spójnego API. Co wiêcej, aplikacje mog± w ten sposób
-wzajemnie zdawaæ sobie sprawê o swoich konfiguracjach co wspomaga
-ich integrowanie.
+%description cpp-static
+Static library of C++ interface for Elektra library.
 
-Ten pakiet zawiera pliki biblioteczne konieczne do dzia³ania
-aplikacji wraz z Rejestrem.
+%description cpp-static -l pl.UTF-8
+Biblioteka statyczna interfejsu C++ do biblioteki Elektra.
 
 %prep
-%setup -q -n %{name}
+%setup -q
+%patch0 -p1
+%patch1 -p1
 
 %build
-%{__make} all CC="%{__cc}" CFLAGS="%{rpmcflags}" 
+cp -f /usr/share/gettext/config.rpath .
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+       --libdir=/%{_lib} \
+       %{?with_db:--enable-berkeleydb} \
+       %{?with_gconf:--enable-gconf} \
+       --enable-passwd \
+       %{?with_python:--enable-python}
+# also outdated (as of 0.7.2): daemon, fstab
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
-install -d $RPM_BUILD_ROOT{/bin,/%{_lib},%{_includedir},%{_examplesdir}} \
-       $RPM_BUILD_ROOT%{_docdir}/{%{name}-devel,%{name}} \
-       $RPM_BUILD_ROOT%{_mandir}/man{1,3,5,7}
+install -d $RPM_BUILD_ROOT/etc/sysconfig
 
 %{__make} install \
-       DESTDIR=$RPM_BUILD_ROOT
+       DESTDIR=$RPM_BUILD_ROOT \
+       elektrainitdir=/etc/rc.d/init.d
 
-mv -f $RPM_BUILD_ROOT%{_docdir}/%{name} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
-mv -f $RPM_BUILD_ROOT%{_docdir}/%{name}-devel $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-mv -f TODO VERSION ChangeLog $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+%{!?with_berkeleydb:%{__rm} $RPM_BUILD_ROOT/%{_lib}/elektra/libelektra-ddefault.so}
+
+# prepare docs
+rm -rf installed-doc
+install -d installed-doc
+mv $RPM_BUILD_ROOT%{_docdir}/%{name}-devel installed-doc/elektra-api
+mv $RPM_BUILD_ROOT%{_docdir}/%{name}/scripts installed-doc/scripts
+rmdir $RPM_BUILD_ROOT%{_docdir}/%{name}
+
+echo 'RUN="no"' > $RPM_BUILD_ROOT/etc/sysconfig/elektra
+
+# move devel files to /usr
+%{__mv} $RPM_BUILD_ROOT/%{_lib}/libelektra.a $RPM_BUILD_ROOT%{_libdir}
+ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libelektra.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libelektra.so
+%{__rm} $RPM_BUILD_ROOT/%{_lib}/libelektra.so
+
+# dlopened modules
+%{__rm} $RPM_BUILD_ROOT/%{_lib}/elektra/*.{la,a}
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT/%{_lib}/lib*.la \
+       $RPM_BUILD_ROOT%{_libdir}/lib*.la
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-/bin/rg set -t dir system.sw
+# Create basic key structure for apps
+kdb set -t dir system/sw || :
+kdb set system/sw/kdb/schemapath "%{_datadir}/sgml/elektra-0.7.1/elektra.xsd"
 
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
 
+%post  cpp -p /sbin/ldconfig
+%postun        cpp -p /sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
-%attr(755,root,root) /bin/*
-%doc %{_docdir}/%{name}-%{version}/*
-%{_mandir}/man1/*
-%{_mandir}/man5/*
-%{_mandir}/man7/*
+%doc AUTHORS COPYING ChangeLog NEWS README TODO doc/standards installed-doc/scripts
+%attr(755,root,root) /bin/kdb
+%attr(755,root,root) /bin/kdb_static
+%attr(755,root,root) /bin/preload
+%attr(755,root,root) /bin/preload_static
+%dir /%{_lib}/elektra
+%attr(755,root,root) /%{_lib}/elektra/libelektra-default.so
+%attr(755,root,root) /%{_lib}/elektra/libelektra-filesys.so*
+%attr(755,root,root) /%{_lib}/elektra/libelektra-hosts.so*
+%attr(755,root,root) /%{_lib}/elektra/libelektra-passwd.so*
+%if %{with db}
+%attr(755,root,root) /%{_lib}/elektra/libelektra-berkeleydb.so*
+%attr(755,root,root) /%{_lib}/elektra/libelektra-ddefault.so
+%endif
+%if %{with gconf}
+%attr(755,root,root) /%{_lib}/elektra/libelektra-gconf.so*
+%endif
+%attr(754,root,root) /etc/rc.d/init.d/kdbd
+%attr(755,root,root) /etc/profile.d/elektraenv.sh
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/elektra
+%{_datadir}/sgml/elektra-0.7.1
+%{_mandir}/man1/kdb.1*
+%{_mandir}/man5/elektra.5*
+%{_mandir}/man7/elektra.7*
+
+%files libs
+%defattr(644,root,root,755)
+%attr(755,root,root) /%{_lib}/libelektra.so.*.*.*
+%attr(755,root,root) %ghost /%{_lib}/libelektra.so.3
+%attr(755,root,root) %{_libdir}/libelektratools.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libelektratools.so.2
 
 %files devel
 %defattr(644,root,root,755)
-%{_includedir}/*
-%{_mandir}/man3/*
+%doc installed-doc/elektra-api/*
+%attr(755,root,root) %{_libdir}/libelektra.so
+%attr(755,root,root) %{_libdir}/libelektratools.so
+%{_includedir}/kdb*.h
+%{_pkgconfigdir}/elektra.pc
+%{_pkgconfigdir}/elektratools.pc
+%{_mandir}/man3/kdb*.3*
+%{_mandir}/man3/key*.3*
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libelektra.a
+%{_libdir}/libelektratools.a
 
-%files examples
+%files cpp
 %defattr(644,root,root,755)
-%doc %{_examplesdir}/%{name}-%{version}/*
+%attr(755,root,root) %{_libdir}/libelektra-cpp.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libelektra-cpp.so.0
 
-%files libs
+%files cpp-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libelektra-cpp.so
+%{_includedir}/kdb
+%{_includedir}/key
+%{_includedir}/keyset
+%{_pkgconfigdir}/elektracpp.pc
+
+%files cpp-static
 %defattr(644,root,root,755)
-%attr(755,root,root) /%{_lib}/*
+%{_libdir}/libelektra-cpp.a
This page took 0.126245 seconds and 4 git commands to generate.