Skip to content

Commit

Permalink
make the spec file somewhat less basic
Browse files Browse the repository at this point in the history
  • Loading branch information
jiridanek committed Mar 17, 2022
1 parent c917d3d commit 6e28baf
Showing 1 changed file with 80 additions and 35 deletions.
115 changes: 80 additions & 35 deletions skupper-router.spec → skupper-router.spec.rpkg
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
%global libwebsockets_minimum_version 3.0.1
%global libnghttp2_minimum_version 1.33.0

Name: skupper
Name: skupper-router
Version: {{{ git_dir_version }}}
Release: 2%{?dist}
Release: 2.0.0%{?dist}
Summary: Router for Skupper.io
License: ASL 2.0
URL: https://skupper.io
Expand All @@ -42,58 +42,103 @@ BuildRequires: cmake
BuildRequires: python3-devel
BuildRequires: openssl-devel
BuildRequires: qpid-proton-c-devel >= %{proton_minimum_version}
BuildRequires: python3-qpid-proton >= %{proton_minimum_version}
BuildRequires: libwebsockets-devel >= %{libwebsockets_minimum_version}
BuildRequires: libnghttp2-devel >= %{libnghttp2_minimum_version}
# man pages --help
BuildRequires: asciidoc
BuildRequires: python3-qpid-proton >= %{proton_minimum_version}

Source: {{{ git_dir_pack }}}

%description
A lightweight message router, written in C and built on Qpid Proton, that provides flexible and scalable interconnect backend for Skupper.io Level 7 Virtual Application Network.

%package router
Summary: The skrouterd Skupper router deamon
Requires: python3
Requires: qpid-proton-c >= %{proton_minimum_version}
Requires: python3-qpid-proton >= %{proton_minimum_version}
Requires: libwebsockets >= %{libwebsockets_minimum_version}
Requires: libnghttp2 >= %{libnghttp2_minimum_version}

%description router
%{summary}.

%prep
{{{ git_dir_setup_macro }}}

%build
%cmake -DPython_EXECUTABLE=%python3
%cmake_build
%cmake -DUSE_LIBWEBSOCKETS=ON -DUSE_LIBNGHTTP2=ON -DPython_EXECUTABLE=%{python3}
%cmake_build --target all --target man

%install
%cmake_install

%check
%ctest

%files router
/etc/qpid-dispatch/qdrouterd.conf
/etc/sasl2/qdrouterd.conf
/usr/bin/qdmanage
/usr/bin/qdstat
/usr/sbin/qdrouterd

/usr/include/qpid/dispatch.h
/usr/include/qpid/dispatch/

%{python3_sitelib}/qpid_dispatch/
%{python3_sitelib}/qpid_dispatch_site.py
%{python3_sitelib}/__pycache__/qpid_dispatch_site.*.pyc
%{python3_sitelib}/qpid_dispatch-*.egg-info
/usr/lib/qpid-dispatch/python/qpid_dispatch_internal/

/usr/lib/qpid-dispatch/tests/
/usr/share/doc/qpid-dispatch/
/usr/share/qpid-dispatch/
# TODO: name?
%package server
Summary: The skrouterd deamon
Requires: python3
Requires: qpid-proton-c >= %{proton_minimum_version}
Requires: libwebsockets >= %{libwebsockets_minimum_version}
Requires: libnghttp2 >= %{libnghttp2_minimum_version}

%description server
%{summary}.

%files server
/usr/sbin/skrouterd

%config /etc/skupper-router/skrouterd.conf
%config /etc/sasl2/skrouterd.conf

%{python3_sitelib}/skupper_router/
%{python3_sitelib}/skupper_router_site.py
%{python3_sitelib}/__pycache__/skupper_router_site.*.pyc
%{python3_sitelib}/skupper_router-*.egg-info

# TODO: skupper-router-tools depend on tools/command.py, etc. in skupper_router_internal/
/usr/lib/skupper-router/python/skupper_router_internal/

/usr/share/man/man5/skrouterd.conf.5.gz
/usr/share/man/man8/skrouterd.8.gz

/usr/share/skupper-router/html/index.html

# TODO: package -tools in fact depends on -server, see TODO above
# TODO: what to do with scrapper tool?
%package tools
Summary: The skstat and skmanage tools for skrouterd
BuildArch: noarch
Requires: python3
Requires: python3-qpid-proton >= %{proton_minimum_version}

%description tools
%{summary}.

%files tools
/usr/bin/skmanage
/usr/bin/skstat

/usr/share/man/man8/skstat.8.gz
/usr/share/man/man8/skmanage.8.gz

%package tests
Summary: Tests for the skupper router and the tools
Requires: python3
Requires: python3-qpid-proton >= %{proton_minimum_version}
Requires: skupper-router-server == %{version}
Requires: skupper-router-tools == %{version}

%description tests
%{summary}.

%files tests
/usr/lib/skupper-router/tests/

%package docs
Summary: Documentation for the skupper router
BuildArch: noarch

%description docs
%{summary}.

%files docs
/usr/share/doc/skupper-router/README.adoc
/usr/share/doc/skupper-router/skrouter.json
/usr/share/doc/skupper-router/skrouter.json.readme.txt
%license /usr/share/doc/skupper-router/LICENSE

%changelog
{{{ git_dir_changelog }}}

0 comments on commit 6e28baf

Please sign in to comment.