File daps2docker.spec of Package daps2docker
#
# spec file for package daps2docker
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2021 SUSE, Nürnberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define configname config
Name: daps2docker
Version: 0.26
Release: 0
Summary: Build DAPS-compatible documentation within a container
License: GPL-3.0-only
Group: Productivity/Publishing/XML
URL: https://github.com/opensuse/daps2docker
Source0: %{name}-%{version}.tar.bz2
# Podman works as well but Docker is (still) the default
Requires: docker
# necessary for `d2d_runner --json-filelist`
Requires: jq
Requires: rsync
# necessary to bring up Docker, if it is not running
Requires: systemd
BuildArch: noarch
%description
A script which allows building DAPS-compliant DocBook and AsciiDoc
documents within a container.
Allows using Docker (default) or Podman 1.1.0 or higher as the
container engine.
%prep
%setup -q
%build
# Remove shebang line:
sed -i '/^#!/d' config daps2docker-common
%install
mkdir -p %{buildroot}%{_datadir}/%{name} \
%{buildroot}%{_sysconfdir}/%{name} \
%{buildroot}%{_bindir}
install -m755 daps2docker.sh d2d_runner.sh \
%{buildroot}%{_datadir}/%{name}
# install -m755 d2d_runner.sh %%{buildroot}%%{_datadir}/%%{name}
install -m644 daps2docker-common %{buildroot}%{_datadir}/%{name}
# Config file
install -m644 %{configname} %{buildroot}%{_sysconfdir}/%{name}
ln -s %{_datadir}/%{name}/daps2docker.sh %{buildroot}%{_bindir}/daps2docker
ln -s %{_datadir}/%{name}/d2d_runner.sh %{buildroot}%{_bindir}/d2d_runner
%files
%doc README.md
%license LICENSE
%dir %{_sysconfdir}/%{name}
%config %{_sysconfdir}/%{name}/%{configname}
%{_bindir}/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%changelog