In koji-1.22.0-129-g0ef3c751 I've changed the way how site-packages directory is obtained. What I did not realize back then is there can be multilib systems which will not search for packages in /usr/lib64. But 64bit systems do look into /usr/lib. Therefore, let's pick the location where both systems work. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1894261 Fixes: #2578 https://pagure.io/koji/issue/2578 Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
49 lines
1.9 KiB
Makefile
49 lines
1.9 KiB
Makefile
PKGDIR = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/$(PACKAGE)
|
|
|
|
CLIPLUGINDIR = $(PKGDIR)/koji_cli_plugins
|
|
HUBPLUGINDIR = /usr/lib/koji-hub-plugins
|
|
BUILDERPLUGINDIR = /usr/lib/koji-builder-plugins
|
|
CLIFILES = $(wildcard cli/*.py)
|
|
HUBFILES = $(wildcard hub/*.py)
|
|
BUILDERFILES = $(wildcard builder/*.py)
|
|
CLICONFDIR = /etc/koji/plugins
|
|
HUBCONFDIR = /etc/koji-hub/plugins
|
|
BUILDERCONFDIR = /etc/kojid/plugins
|
|
CLICONFFILES = $(wildcard cli/*.conf)
|
|
HUBCONFFILES = $(wildcard hub/*.conf)
|
|
BUILDERCONFFILES = $(wildcard builder/*.conf)
|
|
|
|
_default:
|
|
@echo "nothing to make. try make install"
|
|
|
|
clean:
|
|
find . -name "__pycache__" -exec rm -rf {} \; ||:
|
|
find . -name "*.pyc" -exec rm -f {} \;
|
|
|
|
install:
|
|
@if [ "$(DESTDIR)" = "" ]; then \
|
|
echo " "; \
|
|
echo "ERROR: A destdir is required"; \
|
|
exit 1; \
|
|
fi
|
|
|
|
ifndef KOJI_MINIMAL
|
|
mkdir -p $(DESTDIR)/$(HUBPLUGINDIR);
|
|
install -p -m 644 $(HUBFILES) $(DESTDIR)/$(HUBPLUGINDIR);
|
|
$(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/$(HUBPLUGINDIR)', 1, '$(HUBPLUGINDIR)', 1)";
|
|
mkdir -p $(DESTDIR)/$(HUBCONFDIR);
|
|
install -p -m 644 $(HUBCONFFILES) $(DESTDIR)/$(HUBCONFDIR);
|
|
mkdir -p $(DESTDIR)/$(BUILDERPLUGINDIR);
|
|
install -p -m 644 $(BUILDERFILES) $(DESTDIR)/$(BUILDERPLUGINDIR);
|
|
$(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/$(BUILDERPLUGINDIR)', 1, '$(BUILDERPLUGINDIR)', 1)";
|
|
mkdir -p $(DESTDIR)/$(BUILDERCONFDIR);
|
|
install -p -m 644 $(BUILDERCONFFILES) $(DESTDIR)/$(BUILDERCONFDIR);
|
|
endif
|
|
|
|
mkdir -p $(DESTDIR)/$(CLIPLUGINDIR)
|
|
install -p -m 644 $(CLIFILES) $(DESTDIR)/$(CLIPLUGINDIR)
|
|
$(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/$(CLIPLUGINDIR)', 1, '$(CLIPLUGINDIR)', 1)"
|
|
mkdir -p $(DESTDIR)/$(CLICONFDIR)
|
|
ifneq "$(CLICONFFILES)" ""
|
|
install -p -m 644 $(CLICONFFILES) $(DESTDIR)/$(CLICONFDIR)
|
|
endif
|