Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

add RPM spec file #2519

Closed
5 tasks
markus2330 opened this issue Mar 21, 2019 · 4 comments
Closed
5 tasks

add RPM spec file #2519

markus2330 opened this issue Mar 21, 2019 · 4 comments

Comments

@markus2330
Copy link
Contributor

markus2330 commented Mar 21, 2019

Our system administrator Heinz Deinhard contributed following RPM spec file [0].
Tasks to do:

  • add it to the repo
  • write release notes which say thank you to Heinz Deinhard
  • do some cleanup of the spec
  • also install docu
  • create build job on Jenkins which creates the RPM (at least Cent OS 7)

[0]

# Use proper cmake version
%global __cmake cmake3

# libeletra-resolver.so actually exists, but is a symlink to some libeletra-resolver_*.so
%global __requires_exclude libelektra-resolver

Name:           elektra
Version:        0.8.26
Release:        1%{?dist}ep1
Summary:        A key/value pair database to store software configurations
License:        BSD
URL:            http://www.libelektra.org/
Source0:        http://www.libelektra.org/ftp/elektra/releases/elektra-%{version}.tar.xz
BuildRequires:  make
BuildRequires:  git
BuildRequires:  augeas-devel
BuildRequires:  boost-devel
BuildRequires:  cmake3
BuildRequires:  docbook-style-xsl
BuildRequires:  doxygen
BuildRequires:  gawk
BuildRequires:  gcc-c++
BuildRequires:  GConf2-devel
BuildRequires:  graphviz
BuildRequires:  libcurl-devel
BuildRequires:  libdb-devel
BuildRequires:  libgit2-devel
BuildRequires:  libxml2-devel
BuildRequires:  lua-devel
BuildRequires:  python34-devel
BuildRequires:  python-devel
BuildRequires:  swig
BuildRequires:  yajl-devel
BuildRequires:  java-1.8.0-openjdk-devel
BuildRequires:  jna
BuildRequires:  ruby-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 implements an API to fully access a global key database.
 * Elektra supports mounting of existing configuration files into the global 
 key database.
 * 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 uses the BSD licence.
 * Elektra is suitable for embedded systems and early boot stage programs.
 * Elektra supports comments and other non-configuration information by meta 
 data.
 * Elektra can import, export and convert supported configuration files.
 * Elektra is able to log and notify other software on any configuration 
 changes using dbus.
 * Elektra is able to avoid the problem that any invalid configuration is 
 written into the permanent storage.
 * Elektra is able to provide different mechanisms to locate configuration 
 files.
 * Elektra supports different ways to escape and encode content of 
 configuration files.
 * Standard key/value pair hierarchy and semantics are defined within 
 freedesktop.org.

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
%setup -q

%build
mkdir build && cd build
%__cmake .. \
        -DCMAKE_INSTALL_PREFIX=%{_prefix} \
        -DLIB_SUFFIX=64 \
        -DKDB_DB_USER=".config/kdb/user" \
        -DKDB_DB_SYSTEM="~/.config/kdb/system" \
        -DKDB_DB_SPEC="~/.config/kdb/spec" \
        -DBINDINGS=ALL
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

rm -rf %{buildroot}%{_datadir}/html
rm -f %{buildroot}%{_docdir}/elektra/LICENSE.md

%check
# Test #36~42 failed because of lack of root permission.
#make test -C build

%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 LICENSE.md README.md
%{_bindir}/kdb*
%{_libdir}/elektra
%{_libdir}/libelektra.so
%{_libdir}/libelektra.so.4*
%{_libdir}/libelektra.so.%{version}
%{_libdir}/libelektraintercept-env.so
%{_libdir}/libelektraintercept-env.so.0
%{_libdir}/libelektraintercept-env.so.%{version}
%{_libdir}/libelektraintercept-fs.so
%{_libdir}/libelektraintercept.so
%{_libdir}/libelektragetenv.so
%{_libdir}/libelektragetenv.so.0
%{_libdir}/libelektratools.so
%{_libdir}/libelektratools.so.2*
%{_libdir}/libelektratools.so.%{version}
%{_libdir}/gio/modules/libelektrasettings.so
%{_libdir}/libelektra-*.so
%{_libdir}/libelektra-*.so.4*
%{_libdir}/libelektra-*.so.%{version}
%{_libdir}/libgelektra-*.so
%{_libdir}/pkgconfig
%{_libdir}/cmake
%{_libdir}/python2.7
%{_libdir}/python3.4
#%{_libdir}/ruby
%{_libdir}/lua
#%{_prefix}/share/java/libelektra-1.jar
#%{_prefix}/share/java/libelektra.jar
#%{_prefix}/share/ruby/vendor_ruby/kdb.rb
%{_prefix}/share/bash-completion/completions/kdb
%{_prefix}/share/fish/vendor_completions.d/kdb.fish
%{_prefix}/share/zsh/vendor-completions/_kdb
# Do not use (noreplace) for this config file.
#%config %{_sysconfdir}/profile.d/*.sh
#{_datadir}/sgml/elektra/

%files devel
%doc CODE_OF_CONDUCT.md 
%doc doc/AUTHORS doc/{API,CODING,COMPILE,DESIGN,GIT,GOALS,INSTALL,SECURITY,TESTING,VERSION}.md
#%doc examples/
#%dir %{_libdir}/cmake
#%{_docdir}/elektra-%{version}/
#%{_libdir}/cmake/Elektra
%{_includedir}/elektra/
#%{_libdir}/libelektra*.so
#%{_libdir}/libelektra*.so.*
#%{_libdir}/pkgconfig/elektra.pc
#%{_mandir}/man3/*.3*
%{_prefix}/share/elektra/test_data
#%{_prefix}/share/bash-completion/completions/kdb
#%{_prefix}/share/zsh/vendor-completions/_kdb
@markus2330 markus2330 changed the title add spec file add RPM spec file Mar 22, 2019
@markus2330
Copy link
Contributor Author

@mpranj do we already build Fedora packages?

@mpranj
Copy link
Member

mpranj commented Apr 12, 2020

No we only do testing. It's not a bad idea to pick up from this spec file and build packages.

@mpranj mpranj added this to the 0.9.* milestone Apr 12, 2020
@markus2330 markus2330 mentioned this issue Oct 8, 2020
11 tasks
@robaerd robaerd mentioned this issue Oct 20, 2020
15 tasks
@stale
Copy link

stale bot commented Oct 12, 2021

I mark this issue stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping the issue by writing a message here or create a new issue with the remainder of this issue.
Thank you for your contributions 💖

@stale stale bot added the stale label Oct 12, 2021
@stale
Copy link

stale bot commented Oct 27, 2021

I closed this issue now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue.
Thank you for your contributions 💖

@stale stale bot closed this as completed Oct 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants