1
0
Fork 0

doc: installed html instead of the adoc

Also added support to the Makefile and spec.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
Jaroslav Škarvada 2019-03-12 19:57:15 +01:00
parent 7efac3bcb3
commit 94d70899c9
No known key found for this signature in database
GPG key ID: D8E1C00E076E840B
3 changed files with 33 additions and 5 deletions

View file

@ -31,9 +31,9 @@ TMPFILESDIR_DETECT = $(shell pkg-config systemd --variable tmpfilesdir || rpm --
TMPFILESDIR = $(TMPFILESDIR_DETECT:%{_tmpfilesdir}=$(TMPFILESDIR_FALLBACK))
VERSIONED_NAME = $(NAME)-$(VERSION)$(PRERELEASE)$(GIT_PSUFFIX)
SYSCONFDIR = /etc
DATADIR = /usr/share
DOCDIR = $(DATADIR)/doc/$(NAME)
export SYSCONFDIR = /etc
export DATADIR = /usr/share
export DOCDIR = $(DATADIR)/doc/$(NAME)
PYTHON = /usr/bin/python3
PYLINT = pylint-3
ifeq ($(PYTHON),python2)
@ -116,6 +116,15 @@ scratch-build: mock-devel-build
nightly: tidy-mock-result-dir createrepo scratch-build
rsync -ave ssh --delete --progress mock-result-dir/ jskarvad@fedorapeople.org:/home/fedora/jskarvad/public_html/tuned/devel/repo/
html:
$(MAKE) -C doc/guide
install-html:
$(MAKE) -C doc/guide install
clean-html:
$(MAKE) -C doc/guide clean
install-dirs:
mkdir -p $(DESTDIR)$(PYTHON_SITELIB)
mkdir -p $(DESTDIR)$(TUNED_PROFILESDIR)
@ -196,7 +205,7 @@ install: install-dirs
install -Dpm 0644 $(file) $(DESTDIR)$(DATADIR)/man/man$(man_section)/$(notdir $(file));))
# documentation
cp -a doc/* $(DESTDIR)$(DOCDIR)
cp -a doc/{README*,*.txt} $(DESTDIR)$(DOCDIR)
cp AUTHORS COPYING README $(DESTDIR)$(DOCDIR)
# libexec scripts
@ -211,7 +220,7 @@ install: install-dirs
install -dD $(DESTDIR)$(DATADIR)/applications
desktop-file-install --dir=$(DESTDIR)$(DATADIR)/applications tuned-gui.desktop
clean:
clean: clean-html
find -name "*.pyc" | xargs rm -f
rm -rf $(VERSIONED_NAME) rpm-build-dir

10
doc/guide/Makefile Normal file
View file

@ -0,0 +1,10 @@
.PHONY: clean
index.html: master.adoc assemblies/*.adoc meta/*.adoc modules/performance/*.adoc
asciidoctor -o index.html master.adoc || asciidoc -o index.html master.adoc
install: index.html
install -Dpm 0644 index.html $(DESTDIR)$(DOCDIR)/guide/index.html
clean:
rm -f *.html

View file

@ -48,6 +48,11 @@ Source0: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?pre
URL: http://www.tuned-project.org/
BuildArch: noarch
BuildRequires: systemd, desktop-file-utils
%if 0%{?rhel}
BuildRequires: asciidoc
%else
BuildRequires: asciidoctor
%endif
Requires(post): systemd, virt-what
Requires(preun): systemd
Requires(postun): systemd
@ -220,6 +225,7 @@ It can be also used to fine tune your system for specific scenarios.
%setup -q -n %{name}-%{version}%{?prerel2}
%build
make html
%install
make install DESTDIR=%{buildroot} DOCDIR=%{docdir} \
@ -232,6 +238,9 @@ make install DESTDIR=%{buildroot} DOCDIR=%{docdir} \
sed -i 's/\(dynamic_tuning[ \t]*=[ \t]*\).*/\10/' %{buildroot}%{_sysconfdir}/tuned/tuned-main.conf
%endif
# guide
make install-html DESTDIR=%{buildroot} DOCDIR=%{docdir}
# conditional support for grub2, grub2 is not available on all architectures
# and tuned is noarch package, thus the following hack is needed
mkdir -p %{buildroot}%{_datadir}/tuned/grub2