File daps2docker.spec of Package daps2docker
#
# spec file for package daps2docker
#
# 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 http://bugs.opensuse.org/
#
Name: daps2docker
Version: 0.13
Release: 0
Summary: Build DAPS-compatible documentation within a container
License: GPL-3.0
Group: Productivity/Publishing/XML
Url: https://github.com/opensuse/daps2docker
Source0: %{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
# Podman works as well but Docker is (still) the default
Requires: docker
# necessary to bring up Docker, if it is not running
Requires: systemd
# necessary for `d2d_runner --json-filelist`
Requires: jq
%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 -c %{name}-%{version}
%build
%install
cd %{name}-%{version}
mkdir -p %{buildroot}%{_datadir}/%{name}
install -m755 daps2docker.sh %{buildroot}%{_datadir}/%{name}
install -m755 d2d_runner.sh %{buildroot}%{_datadir}/%{name}
install -m755 defaults %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_bindir}
ln -s %{_datadir}/%{name}/daps2docker.sh %{buildroot}%{_bindir}/daps2docker
ln -s %{_datadir}/%{name}/d2d_runner.sh %{buildroot}%{_bindir}/d2d_runner
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}
install -m644 LICENSE %{buildroot}%{_defaultdocdir}/%{name}
install -m644 README.md %{buildroot}%{_defaultdocdir}/%{name}
%files
%defattr(-,root,root)
%{_bindir}/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%dir %{_defaultdocdir}/%{name}
%doc %{_defaultdocdir}/%{name}/*
%changelog