Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 421430e6f3fcc93c3abacc6a3f586c30 > files > 4

elektra-0.7.0-6.fc15.src.rpm

Summary:       A key/value pair database to store software configurations
Name:          elektra
Version:       0.7.0
Release:       6%{?dist}
Group:         System Environment/Libraries
License:       BSD
URL:           http://www.libelektra.org
Source0:       http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch0:        elektra-0.7.0-rename.patch
Patch1:        elektra-0.7.0-no_local.patch
BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# doxygen: to build the API documentation
# libxslt, docbook-style-xsl: to build man pages from docbook with xsltproc program
# db4-devel: for the Berkeley DB backend
# libxml2-devel: for the kdbtools library build
BuildRequires: doxygen db4-devel libxml2-devel docbook-style-xsl libxslt
# gawk is used in src/libelektra/exportobjects.sh
BuildRequires: gawk
# gettext-devel: for the autoconf ICONV macro only
# GConf2-devel: for the testing GConf2 backend for Elektra
BuildRequires: GConf2-devel
BuildRequires: libtool-ltdl-devel
BuildRequires: libtool, gettext-devel
%if 0%{?fedora} > 10
BuildRequires: glibc-static
%endif

Requires(post): /sbin/ldconfig


%description
Elektra provides a universal and secure framework to store configuration
parameters in a hierarchical key-value pair mechanism, instead of each
program using its own text configuration files. This allows any program
to read and save its configuration with a consistent API, and allows
them to be aware of other applications' configurations, permitting
easy application integration. While architecturally similar to other OS
registries, Elektra does not have most of the problems found in those
implementations.

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:      Include files and API documentation to build elektrified programs
Group:        Development/System
Requires:     pkgconfig 
Requires:     %{name} = %{version}-%{release}

%description devel
Elektra provides a universal and secure framework to store configuration
parameters in a hierarchical key-value pair tree.

This package contains development specific things as include files to 
create elektrified programs.



%prep
%setup -q
%patch0 -p1 -b .rename
%patch1 -p1 -b .local



%build
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE"
export CXXFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE"
%configure \
     --includedir=%{_includedir}/elektra \
     --program-prefix=%{name}- \
     --disable-static \
     --disable-rpath \
     --with-ulibdir=%{_libdir} \
     --with-docbook=%{_datadir}/sgml/docbook/xsl-stylesheets \
     --with-kdbschemadir=%{_datadir}/sgml/%{name}-%{version} \
     --enable-iconv

# remove rpath from libtool
sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool

# Not used for now
# --disable-xmltest
# --with-hlvl-backenddir
# --with-default-backend
# --with-default-dbackend
#     --enable-ini \
#     --enable-berkeleydb \
#     --enable-gconf \
#     --enable-daemon \
#     --enable-python

make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT

make DESTDIR=$RPM_BUILD_ROOT install INSTALL='install -p'
find $RPM_BUILD_ROOT%{_libdir} -type f -a -name \*.la -exec rm {} \;

# Remove statically linked kdb - lib
rm $RPM_BUILD_ROOT%{_bindir}/*_static
rm $RPM_BUILD_ROOT%{_libdir}/*.a

# file in profile.d is sourced, remove shebang and execute bits,
# while keeping timestamps
touch -r $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/elektra-elektraenv.sh __elektra-elektraenv_timestamp
sed -i -e 's;#!/bin/sh;;' $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/elektra-elektraenv.sh
chmod a-x $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/elektra-elektraenv.sh
touch -r __elektra-elektraenv_timestamp $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/elektra-elektraenv.sh
rm __elektra-elektraenv_timestamp

#Fix symlink should be relative - Be aware of SONAME changes!
ln -fs ../libelektratools.so.2  $RPM_BUILD_ROOT%{_libdir}/elektra/libelektratools.so

## doc fixes
rm -rf __doc __doc-devel
mkdir __doc
mv  $RPM_BUILD_ROOT%{_datadir}/doc/elektra/* __doc
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/elektra
mkdir __doc-devel
mv  $RPM_BUILD_ROOT%{_datadir}/doc/elektra-devel/* __doc-devel
touch -r ChangeLog __doc-devel/api-html/*
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/elektra-devel


## man fixes (from program prefix)
mv $RPM_BUILD_ROOT%{_mandir}/man5/elektra-elektra.5 $RPM_BUILD_ROOT%{_mandir}/man5/elektra.5
mv $RPM_BUILD_ROOT%{_mandir}/man7/elektra-elektra.7 $RPM_BUILD_ROOT%{_mandir}/man7/elektra.7

# The init-script is disabled for now
rm -rf $RPM_BUILD_ROOT/etc/init.d/elektra-kdbd
#Own the directory where configuration will be stored.
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/kdb


%clean
rm -rf $RPM_BUILD_ROOT


%post
/sbin/ldconfig
# Create basic key structure for apps
elektra-kdb set -t dir system/sw > /dev/null 2>&1
elektra-kdb set system/sw/kdb/schemapath "%{_datadir}/sgml/elektra-%{version}/elektra.xsd" > /dev/null 2>&1 || :

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog README INSTALL
%doc __doc/*
#{_initrddir}/elektra-kdbd
%dir %{_sysconfdir}/kdb
%{_bindir}/elektra-kdb
%{_bindir}/elektra-preload
#{_sbindir}/elektra-kdbd
%{_libdir}/elektra
%{_libdir}/libelektra*.so.*
# Do not use (noreplace) for this config file.
%config %{_sysconfdir}/profile.d/*.sh
%{_mandir}/man1/*
%{_mandir}/man7/*
%{_mandir}/man5/*
%{_datadir}/sgml/elektra-%{version}/


%files devel
%defattr(-,root,root,-)
%doc __doc-devel/*
%{_includedir}/elektra/
%{_libdir}/libelektra.so
%{_libdir}/libelektra-cpp.so
%{_libdir}/libelektratools.so
%{_libdir}/pkgconfig/*.pc
%{_mandir}/man3/*



%changelog
* Thu Mar 17 2011 Nicolas Chauvet <kwizart@gmail.com> - 0.7.0-6
- Remove local bash-ism in elektraenv.sh

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Nov 05 2010 Nicolas Chauvet <kwizart@gmail.com> - 0.7.0-4
- Rebuilt for libxml2

* Sun Nov  8 2009 Nicolas Chauvet <kwizart@fedoraproject.org> - 0.7.0-2
- Fix renamed elektra-kbd in scripts - rhbz#533286

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Mar  5 2009 kwizart < kwizart at gmail.com > - 0.7.0-1
- Update to 0.7.0

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.10-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Sep 18 2008 Matt Domsch <mdomsch@fedoraproject.org> - 0.6.10-8
- add -D_GNU_SOURCE to CFLAGS, fixes FTBFS BZ#434364

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.6.10-7
- Autorebuild for GCC 4.3

* Mon Dec 17 2007 Patrice Dumas <pertusus@free.fr> 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 <pertusus@free.fr> 0.6.10-5
- protect ->open calls
- add gawk BuildRequires

* Mon Mar 12 2007 kwizart < kwizart at gmail.com > - 0.6.10-2
- Disable static packages

* Sat Mar 10 2007 Patrice Dumas <pertusus@free.fr> 0.6.10-1
- update to 0.6.10
- use canonical scriptlets
- minor cleanups
- fix kdbd initscript

* Thu Feb 23 2007 kwizart < kwizart at gmail.com > - 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 kwizart < kwizart at gmail.com > - 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 kwizart < kwizart at gmail.com > - 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 kwizart < kwizart at gmail.com > - 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 <pertusus@free.fr> 0.6.4-2
- split a subpackage for static libraries

* Sat Oct  7 2006 Patrice Dumas <pertusus@free.fr> 0.6.4-1
- Update to 0.6.4, cleanups

* Thu Jun 02 2006 Avi Alkalay <avi@unix.sh> 0.6.3-1
- Initial packaging