diff --git a/Makefile b/Makefile index 2c52af15..9c10e646 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ PYVER_MAJOR := $(shell $(PYTHON) -c 'import sys; print(".".join(sys.version.spli ifeq ($(PYVER_MAJOR),2) SUBDIRS = builder koji cli plugins vm else - SUBDIRS = kojihub builder koji cli util www plugins vm + SUBDIRS = kojihub builder koji cli util www plugins vm docs endif diff --git a/docs/Makefile b/docs/Makefile index b8bba227..020da729 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -50,10 +50,19 @@ help: clean: rm -rf $(BUILDDIR)/* -# nothing to install for docs, we package from this dir +SQLFILES = $(wildcard *.sql) +SQLDIR = /usr/share/koji install: - @echo "(no install for docs dir)" + @if [ "$(DESTDIR)" = "" ]; then \ + echo " "; \ + echo "ERROR: A destdir is required"; \ + exit 1; \ + fi + mkdir -p $(DESTDIR)/$(SQLDIR) + for p in $(SQLFILES) ; do \ + install -p -m 644 $$p $(DESTDIR)/$(SQLDIR)/$$p; \ + done html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html diff --git a/koji.spec b/koji.spec index 2b0db5aa..46f1bb38 100644 --- a/koji.spec +++ b/koji.spec @@ -428,7 +428,7 @@ make DESTDIR=$RPM_BUILD_ROOT KOJI_MINIMAL=1 PYTHON=%{__python3} install popd %endif %if 0%{py3_support} > 1 -for D in kojihub builder plugins util www vm ; do +for D in kojihub builder plugins util www vm docs ; do pushd $D make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} install popd @@ -498,7 +498,8 @@ rm -rf $RPM_BUILD_ROOT %files %config(noreplace) /etc/koji.conf %dir /etc/koji.conf.d -%doc docs Authors COPYING LGPL +%doc docs/source Authors COPYING LGPL +%{_datadir}/koji/*.sql %if 0%{py2_support} %{_bindir}/*