%define python_version 3 %if 0%{?rhel} <= 6 %define python_version 2 %endif %{!?_licensedir:%global license %%doc} Name: elektra Version: 0.8.12 Release: 7.1%{?dist} Summary: A key/value pair database to store software configurations Group: System Environment/Libraries License: BSD URL: http://www.libelektra.org/ Source0: http://www.libelektra.org/ftp/elektra/releases/elektra-%{version}.tar.gz BuildRequires: gcc gcc-c++ BuildRequires: boost-devel BuildRequires: cmake BuildRequires: db4-devel BuildRequires: docbook-style-xsl BuildRequires: doxygen BuildRequires: gawk BuildRequires: GConf2-devel BuildRequires: gettext-devel BuildRequires: libxml2-devel BuildRequires: libxslt BuildRequires: lua-devel %if 0%{python_version} == 3 BuildRequires: python%{python3_pkgversion}-devel %else BuildRequires: python2-devel %endif BuildRequires: swig BuildRequires: yajl-devel %description Elektra provides a universal and secure framework to store configuration parameters in a global, hierarchical key database. The core is a small library implemented in C. The plugin-based framework fulfills many configuration-related tasks to avoid any unnecessary code duplication across applications while it still allows the core to stay without any external dependency. Elektra abstracts from cross-platform-related issues with an consistent API, and allows applications to be aware of other applications' configurations, leveraging easy application integration. == Facts and Features == * Elektra uses the BSD licence. * Elektra implements an API to fully access a global key database. * Elektra supports mounting of existing configuration files into the global key database. * Elektra has dozens of Plugins that make it possible to have a tiny core, but still support all features. * Elektra can import and export configuration files in any supported format. * Elektra is able to log and notify other software on any configuration changes using Dbus and Journald. * Elektra can improve robustness by rejecting invalid configuration via type checking, regex and more. * Elektra provides different mechanisms to locate configuration files. * Elektra supports different ways to escape and encode content of configuration files. * Elektra is multi-process safe and can be used in multi-threaded programs. * Elektra (except for some plugins) is portable and completely written in Ansi-C99. * Elektra (except for some plugins) has no external dependency. * Elektra is suitable for embedded systems and early boot stage programs. * Elektra supports comments and other non-configuration information by meta data. * Elektra provides many powerful Bindings to avoid low-level access code. * Elektra provides powerful Code Generation Techniques for Configuration Access. This package also contains a Berkeley DB backend for Elektra, to let Elektra use Berkeley DB databases to store its keys and daemon which can be used as a proxy for access to the keys. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package contains libraries and header files for developing elektrified applications. %prep %autosetup %build %{__mkdir} build && cd $_ %cmake .. \ -DPLUGINS=ALL \ -DTOOLS=ALL \ -DBUILD_SHARED=ON \ -DBUILD_STATIC=OFF \ -DBUILD_TESTING=ON \ -DBUILD_SWIG=ON \ -DBUILD_SWIG_LUA=ON \ %if 0%{python_version} == 3 -DBUILD_SWIG_PYTHON3=ON \ -DPython_ADDITIONAL_VERSIONS=%{python3_version} \ %else -DBUILD_SWIG_PYTHON2=ON \ -DPython_ADDITIONAL_VERSIONS=%{python2_version} \ %endif -DBUILD_EXAMPLES=OFF \ -DTARGET_CMAKE_FOLDER=%{_libdir}/cmake \ -DTARGET_DOCUMENTATION_FOLDER=%{_datadir} # Parallel build seems to cause unpredictable failures? %{__make} #%{?_smp_mflags} %install %make_install -C build %{__mkdir} -p %{buildroot}%{_mandir}/man3/ %{buildroot}%{_sysconfdir}/profile.d/ # file in profile.d is sourced, remove shebang and execute bits. %{__install} -p scripts/elektraenv.sh %{buildroot}%{_sysconfdir}/profile.d/ %{__sed} -i -e 's;#!/bin/sh;;' %{buildroot}%{_sysconfdir}/profile.d/elektraenv.sh # This stuff is all for the test suite, which we aren't really interested in. %{__rm} -f %{buildroot}%{_libdir}/elektra/tool_exec/{run_all,check*,test*} %{__rm} -rf %{buildroot}%{_datadir}/elektra %{__rm} -f %{buildroot}%{_bindir}/kdb-full # per Debian package, libelektra-full is only used for the tests. %{__rm} -f %{buildroot}%{_libdir}/libelektra-full* %{__rm} -f %{buildroot}%{_libdir}/libelektratools-full* %{__rm} -frv %{buildroot}%{_datadir}/html %check # Test #36~42 failed because of lack of root permission. %{__make} test -C build || true %post /sbin/ldconfig # Create basic key structure for apps kdb set -t dir system/sw > /dev/null 2>&1 kdb set system/sw/kdb/schemapath "%{_datadir}/sgml/elektra/elektra.xsd" > /dev/null 2>&1 || : %postun -p /sbin/ldconfig %files %doc README.md %license doc/COPYING %{_bindir}/kdb %{_libdir}/elektra %{_libdir}/libelektra.so.4* %{_libdir}/libelektra.so.%{version} %{_libdir}/libelektratools.so # Do not use (noreplace) for this config file. %config %{_sysconfdir}/profile.d/*.sh %{_sysconfdir}/bash_completion.d %{_sysconfdir}/profile.d/kdb #{_datadir}/sgml/elektra/ %files devel %doc README.md %doc doc/AUTHORS doc/CODING.md doc/DESIGN.md doc/NEWS.md doc/SECURITY.md %doc examples/ %dir %{_libdir}/cmake %{_docdir}/elektra-api/ %{_libdir}/cmake/FindElektra.cmake %{_includedir}/elektra/ %{_libdir}/libelektra.so %{_libdir}/pkgconfig/elektra.pc %{_mandir}/man3/*.3* %changelog * Mon Oct 21 2019 Tomasz Tomasik - 0.8.12-7.1 - Rebuilt for EL7 * Wed Feb 03 2016 Fedora Release Engineering - 0.8.12-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Fri Jan 15 2016 Jonathan Wakely - 0.8.12-6 - Rebuilt for Boost 1.60 * Tue Nov 10 2015 Fedora Release Engineering - 0.8.12-5 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Thu Sep 03 2015 Jonathan Wakely - 0.8.12-4 - Rebuilt for Boost 1.59 * Tue Aug 18 2015 Jonathan Wakely 0.8.12-3 - drop kdb-full and move libelektratools.so to main package * Wed Jul 29 2015 Adam Williamson - 0.8.12-2 - drop libelektratools-full as well * Tue Jul 28 2015 Adam Williamson - 0.8.12-1 - update to 0.8.12 - don't build libelektra-full - drop some crap that looks to be only of interest for the test suite * Wed Jul 22 2015 David Tardon - 0.8.7-4 - rebuild for Boost 1.58 * Wed Jun 17 2015 Fedora Release Engineering - 0.8.7-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Tue Jan 27 2015 Petr Machata - 0.8.7-2 - Rebuild for boost 1.57.0 * Mon Aug 18 2014 Christopher Meng - 0.8.7-1 - Update to 0.8.7 * Sat Aug 16 2014 Fedora Release Engineering - 0.8.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Mon Jun 09 2014 Christopher Meng - 0.8.6-1 - Update to 0.8.6 * Sat Jun 07 2014 Fedora Release Engineering - 0.8.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Fri May 23 2014 Petr Machata - 0.8.5-2 - Rebuild for boost 1.55.0 * Fri Mar 21 2014 Christopher Meng - 0.8.5-1 - Update to 0.8.5 * Tue Jan 21 2014 Christopher Meng - 0.8.4-4 - Use kdb to setup the schemapath. * Mon Jan 20 2014 Rex Dieter - 0.8.4-3 - track soname,pkgconfig files closer, so changes aren't a surprise - -devel: own %%_libdir/cmake * Sun Jan 19 2014 Christopher Meng - 0.8.4-2 - Move C++ header to the correct path. - Remove futile manpages. * Mon Dec 30 2013 Christopher Meng - 0.8.4-1 - Update to 0.8.4(BZ#1053014) - Temporarily disable 2 previous trivial patches. - Hack some scripts to be installed correctly. * Tue Dec 03 2013 Christopher Meng - 0.8.3-1 - Update to 0.8.3 - SPEC cleanup, switching to CMake. - AArch64 support(BZ#925304) * Sat Aug 03 2013 Fedora Release Engineering - 0.7.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Wed Feb 13 2013 Fedora Release Engineering - 0.7.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Wed Jul 18 2012 Fedora Release Engineering - 0.7.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Fri Jan 13 2012 Fedora Release Engineering - 0.7.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Thu Mar 17 2011 Nicolas Chauvet - 0.7.0-6 - Remove local bash-ism in elektraenv.sh * Tue Feb 08 2011 Fedora Release Engineering - 0.7.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Fri Nov 05 2010 Nicolas Chauvet - 0.7.0-4 - Rebuilt for libxml2 * Sun Nov 08 2009 Nicolas Chauvet - 0.7.0-2 - Fix renamed elektra-kbd in scripts - rhbz#533286 * Fri Jul 24 2009 Fedora Release Engineering - 0.7.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Mar 05 2009 Nicolas Chauvet - 0.7.0-1 - Update to 0.7.0 * Tue Feb 24 2009 Fedora Release Engineering - 0.6.10-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Thu Sep 18 2008 Matt Domsch - 0.6.10-8 - add -D_GNU_SOURCE to CFLAGS, fixes FTBFS BZ#434364 * Tue Feb 19 2008 Fedora Release Engineering - 0.6.10-7 - Autorebuild for GCC 4.3 * Mon Dec 17 2007 Patrice Dumas 0.6.10-6 - keep some timestamps. Many are not kept since some files are generated, and install-sh is used for others (with nobase_) * Sat Aug 25 2007 Patrice Dumas 0.6.10-5 - protect ->open calls - add gawk BuildRequires * Mon Mar 12 2007 Nicolas Chauvet - 0.6.10-2 - Disable static packages * Sat Mar 10 2007 Patrice Dumas 0.6.10-1 - update to 0.6.10 - use canonical scriptlets - minor cleanups - fix kdbd initscript * Fri Feb 23 2007 Nicolas Chauvet - 0.6.8-1 - Update to 0.6.8 - Add init.d script elektra-kdbd change name to elektrad - Add chckconfig in pre and preun - Warning "segmentation error" on /usr/sbin/elektra-kdbd - TODO - PAM implementation if needed * Thu Feb 22 2007 Nicolas Chauvet - 0.6.4-5 - Removed requires profile.d directory - Fix rm __doc __doc-devel - Recover static package with elektra-kdb_static - Fix config file need to be replaced - Exclude *.la from libdir/elektra and libdir - Fix man names resulting from program prefix * Wed Feb 21 2007 Nicolas Chauvet - 0.6.4-4 - Merge static package to "" package (needed for recovery). - Revert Fix for sourced files in /etc/profile.d (config) - Fix __doc files same as __doc-devel (missed) - Fix include path in elektra sub directory at configure step - Fix post step according to name changes * Tue Feb 20 2007 Nicolas Chauvet - 0.6.4-3 - Fix ldconfig postun in pre - Fix configure in /bin /sbin to be /usr/bin /usr/sbin we can revert back from this point if needed - Don't remove profile.d requires anymore - Let make install doc in place en then correct if needed - Create static-devel package * Sun Oct 15 2006 Patrice Dumas 0.6.4-2 - split a subpackage for static libraries * Sat Oct 07 2006 Patrice Dumas 0.6.4-1 - Update to 0.6.4, cleanups * Fri Jun 02 2006 Avi Alkalay 0.6.3-1 - Initial packaging