foreman-packaging icon indicating copy to clipboard operation
foreman-packaging copied to clipboard

Build and package documentation for FAM

Open maximiliankolb opened this issue 3 years ago • 3 comments

Hi everyone! I would like to build and package documentation for FAM as .rpm.

I had it working "locally" in a different setting before like this:

script

# building docs
make doc
tar -czf fam-documentation.tar.gz -C docs/_build/html .
# packaging
mv -v fam-documentation.tar.gz /root/rpmbuild/SOURCES/
rpmbuild -v --target noarch -bb fam-documentation.spec

SPEC file

Name:       fam-documentation
Summary:    FAM documentation
Version:    0.1
Release:    1%{?dist}
Source0:    %{name}.tar.gz
BuildArch: noarch
# slightly adjusted

%description
Documentation for Foreman Ansible Modules

%prep
%setup -q -c

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/%{name}
cp -rv /root/rpmbuild/BUILD/%{name}-%{version}/* $RPM_BUILD_ROOT/usr/share/doc/%{name}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%doc %dir /usr/share/doc/%{name}
/usr/share/doc/%{name}

%changelog
* Mon Jul 25 2022 Maximilian Kolb <[email protected]> 0.1.0
- Initial packaging

maximiliankolb avatar Jul 25 '22 15:07 maximiliankolb

My PR is currently a draft because "make doc" fails.

maximiliankolb avatar Jul 25 '22 15:07 maximiliankolb

I yes, I see. docs doesn't exist. Looks like this isn't included in the tarball on Ansible Galaxy.

+ make -C docs doc
make: *** docs: No such file or directory.  Stop.

ekohl avatar Jul 25 '22 15:07 ekohl

@maximiliankolb, this pull request is currently not mergeable. Please rebase against the rpm/develop branch and push again.

If you have a remote called 'upstream' that points to this repository, you can do this by running:

    $ git pull --rebase upstream rpm/develop

This message was auto-generated by Foreman's prprocessor

theforeman-bot avatar Sep 13 '22 16:09 theforeman-bot