From 6e28baf32f2d5cfe789027738e4a22fb4f10771b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Thu, 17 Mar 2022 22:14:07 +0100 Subject: [PATCH] make the spec file somewhat less basic --- ...er-router.spec => skupper-router.spec.rpkg | 115 ++++++++++++------ 1 file changed, 80 insertions(+), 35 deletions(-) rename skupper-router.spec => skupper-router.spec.rpkg (56%) diff --git a/skupper-router.spec b/skupper-router.spec.rpkg similarity index 56% rename from skupper-router.spec rename to skupper-router.spec.rpkg index 24c21b7bc..c3e02d9dc 100644 --- a/skupper-router.spec +++ b/skupper-router.spec.rpkg @@ -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 @@ -42,32 +42,23 @@ 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 @@ -75,25 +66,79 @@ Requires: libnghttp2 >= %{libnghttp2_minimum_version} %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 }}}