X-Git-Url: http://git.pld-linux.org/?p=packages%2Felektra.git;a=blobdiff_plain;f=elektra.spec;h=d7cfcd447c53c7f57e84e4f84ef4f7f04aed357a;hp=bbeaa828da39ea30d94fcea71ab69f2d1c63a6d3;hb=0c1752706eaf8ac11d05a6c3c09b6b6d4c41c680;hpb=7b654bce9ea2ed128f7f1dca403308c85fd3cfa9 diff --git a/elektra.spec b/elektra.spec index bbeaa82..d7cfcd4 100644 --- a/elektra.spec +++ b/elektra.spec @@ -1,212 +1,252 @@ -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 -Name: registry -Version: 0.1.6 -Release: 1.1 -License: LGPL -Vendor: Avi Alkalay -Group: Base -Source0: http://dl.sourceforge.net/%{name}/%{name}-%{version}.tar.gz -# Source0-md5: 04f05693c7be8da6db64f59129b92cf3 -Patch0: %{name}-misc_fixes.patch -URL: http://registry.sf.net -BuildRequires: docbook-style-xsl +# TODO: use system nickel (in src/plugins/ni) +# +# Conditonal build: +%bcond_with full # "full" variant (libelektra-full with all plugins linked in) +# +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.8.6 +Release: 1 +License: BSD +Group: Applications/System +Source0: http://www.libelektra.org/ftp/elektra/releases/%{name}-%{version}.tar.gz +# Source0-md5: 4a59824e70a29295e9ef9ae7605d9299 +Patch0: %{name}-elektraenv.patch +URL: http://www.libelektra.org/ +BuildRequires: cmake >= 2.6 +BuildRequires: dbus-devel +BuildRequires: doxygen +BuildRequires: gettext-tools +BuildRequires: libstdc++-devel +BuildRequires: libxml2-devel BuildRequires: libxslt-progs +BuildRequires: pkgconfig +%{?with_python:BuildRequires: python-devel} +BuildRequires: yajl-devel Requires: %{name}-libs = %{version}-%{release} +Requires: mktemp +Obsoletes: registry BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description -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. +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. - -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 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 -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. -%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} +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ę. -%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 +Obsoletes: elektra-cpp < 0.8 +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. - -%description devel -l pl -Rejestr Linux jest alternatyw± dla zaplecza w postaci tekstowych -plików konfiguracyjnych. +This package contains Elektra shared libraries. -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¶æ. +%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. -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. +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ę. -Ten pakiet zawiera pliki nag³ówkowe i strony podrêcznika API, aby -u¿ywaæ Rejestru z poziomu programów pisanych w jêzyku C. +Ten pakiet zawiera biblioteki współdzielone Elektry. -%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. - -This package contains the example source files for the Linux Registry. - -%description examples -l pl -Rejestr Linux jest alternatyw± dla zaplecza w postaci tekstowych -plików konfiguracyjnych. - -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 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 przyk³adowe pliki ¼ród³owe dla Rejestru Linux. - -%package libs -Summary: Library files for the Linux Registry -Summary(pl): Pliki biblioteki dla Rejestru Linux -Group: Base +Requires: %{name}-libs = %{version}-%{release} -%description libs -The Linux Registry is an alternative back-end for text configuration -files. +%description devel +This package contains the include files and API manual pages to use +the Elektra API in C. -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 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. -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 static +Summary: Static libraries for Elektra Project +Summary(pl.UTF-8): Statyczne biblioteki projektu Elektra +Group: Development/Libraries +Requires: %{name}-devel = %{version}-%{release} -This package contains the library files, which are necessary for the -applications to work with the Registry. +%description static +This package contains static libraries for Elektra Project. -%description libs -l pl -Rejestr Linux jest alternatyw± dla zaplecza w postaci tekstowych -plików konfiguracyjnych. +%description static -l pl.UTF-8 +Ten pakiet zawiera statyczne biblioteki projektu 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-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}-devel = %{version}-%{release} +Requires: libstdc++-devel +Obsoletes: elektra-cpp-static < 0.8 -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-devel +Header files of C++ interface for Elektra library. -Ten pakiet zawiera pliki biblioteczne konieczne do dzia³ania -aplikacji wraz z Rejestrem. +%description cpp-devel -l pl.UTF-8 +Pliki nagłówkowe interfejsu C++ do biblioteki Elektra. %prep -%setup -q -n registry +%setup -q %patch0 -p1 %build -%{__make} all CC="%{__cc}" CFLAGS="%{rpmcflags}" +install -d build +cd build +%cmake .. \ + %{!?with_full:-DBUILD_FULL=OFF} \ + -DPLUGINS=ALL \ + -DTARGET_CMAKE_FOLDER=%{_datadir}/cmake/Modules + +%{__make} -j1 %install rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT/etc/sysconfig -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} - -%{__make} install \ +%{__make} -C build install \ DESTDIR=$RPM_BUILD_ROOT -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} +echo 'RUN="no"' > $RPM_BUILD_ROOT/etc/sysconfig/elektra +install -D scripts/elektraenv.sh $RPM_BUILD_ROOT/etc/profile.d/elektraenv.sh +install -D src/plugins/xmltool/xmlschema/elektra.xsd $RPM_BUILD_ROOT%{_datadir}/sgml/elektra/elektra.xsd + +# just tests +%{__rm} -r $RPM_BUILD_ROOT%{_prefix}/lib/elektra/tool_exec \ + $RPM_BUILD_ROOT%{_datadir}/elektra/test_data + +# prepare docs +%{__rm} -rf installed-doc +install -d installed-doc +%{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}-api installed-doc/elektra-api + +# "static" variant (with libelektra-static and thus all plugins linked in); +# we don't need it +%{__rm} $RPM_BUILD_ROOT%{_bindir}/kdb-static %clean rm -rf $RPM_BUILD_ROOT -%post -/bin/rg set -t dir system.sw - %post libs -p /sbin/ldconfig %postun libs -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 doc/{AUTHORS,CHANGES,COPYING,DESIGN,GOALS,NEWS,README,SECURITY,SPECIFICATION,todo} +# doc/standards installed-doc/scripts +%attr(755,root,root) %{_bindir}/kdb +%if %{with full} +%attr(755,root,root) %{_bindir}/kdb-full +%endif +%dir %{_libdir}/elektra +%attr(755,root,root) %{_libdir}/elektra/libelektra-ccode.so +# R: dbus +%attr(755,root,root) %{_libdir}/elektra/libelektra-dbus.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-doc.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-dump.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-error.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-fstab.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-glob.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-hexcode.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-hidden.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-hosts.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-iconv.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-network.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-ni.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-null.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-path.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-resolver.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-simpleini.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-struct.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-success.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-syslog.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-tcl.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-template.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-timeofday.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-tracer.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-type.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-uname.so +%attr(755,root,root) %{_libdir}/elektra/libelektra-validation.so +# R: libxml2 +%attr(755,root,root) %{_libdir}/elektra/libelektra-xmltool.so +# R: yajl +%attr(755,root,root) %{_libdir}/elektra/libelektra-yajl.so +%attr(755,root,root) /etc/profile.d/elektraenv.sh +%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/elektra +%{_datadir}/sgml/elektra -%files devel +%files libs %defattr(644,root,root,755) -%{_includedir}/* -%{_mandir}/man3/* +%attr(755,root,root) %{_libdir}/libelektra.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libelektra.so.4 +%attr(755,root,root) %{_libdir}/libelektratools.so +%if %{with full} +%attr(755,root,root) %{_libdir}/libelektra-full.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libelektra-full.so.4 +%endif -%files examples +%files devel +%defattr(644,root,root,755) +%doc installed-doc/elektra-api/* +%attr(755,root,root) %{_libdir}/libelektra.so +%if %{with full} +%attr(755,root,root) %{_libdir}/libelektra-full.so +%endif +%dir %{_includedir}/elektra +%{_includedir}/elektra/*.h +%{_pkgconfigdir}/elektra.pc +%{_datadir}/cmake/Modules/FindElektra.cmake +%{_mandir}/man3/deprecated.3elektra* +%{_mandir}/man3/kdb*.3elektra* +%{_mandir}/man3/key*.3elektra* +%{_mandir}/man3/plugin.3elektra* + +%files static %defattr(644,root,root,755) -%doc %{_examplesdir}/%{name}-%{version}/* +%{_libdir}/libelektra-static.a +%{_libdir}/libelektratools-static.a -%files libs +%files cpp-devel %defattr(644,root,root,755) -%attr(755,root,root) /%{_lib}/* +%{_includedir}/elektra/*.hpp +# libelektratools API man pages +%{_mandir}/man3/backend.hpp.3elektra* +%{_mandir}/man3/backends.hpp.3elektra* +%{_mandir}/man3/modules.cpp.3elektra* +%{_mandir}/man3/modules.hpp.3elektra* +%{_mandir}/man3/plugin.cpp.3elektra* +%{_mandir}/man3/plugin.hpp.3elektra* +%{_mandir}/man3/plugins.cpp.3elektra* +%{_mandir}/man3/plugins.hpp.3elektra* +%{_mandir}/man3/src_backend.cpp.3elektra* +%{_mandir}/man3/toolexcept.hpp.3elektra*