mirror of
https://github.com/OISF/suricata.git
synced 2026-02-03 20:41:46 -05:00
Instead of using distutils/setuptools for installing the Python code, just install it into our own Python directory. Distutils is being removed from Python, and setuptools doesn't work well when trying to install into your own location. For our usage its just simpler to install with make. In addition to removing the configure check for distutils, also remove the check for pyyaml. This lets the user install pyyaml after Suricata is installed, and Suricata-Update does handle this case gracefully. Issue: #5313
47 lines
1.4 KiB
Makefile
47 lines
1.4 KiB
Makefile
LIBS = \
|
|
suricata/__init__.py \
|
|
suricata/config/__init__.py \
|
|
suricata/ctl/__init__.py \
|
|
suricata/ctl/filestore.py \
|
|
suricata/ctl/loghandler.py \
|
|
suricata/ctl/main.py \
|
|
suricata/ctl/test_filestore.py \
|
|
suricata/sc/__init__.py \
|
|
suricata/sc/specs.py \
|
|
suricata/sc/suricatasc.py \
|
|
suricatasc/__init__.py
|
|
|
|
BINS = \
|
|
suricatasc \
|
|
suricatactl
|
|
|
|
EXTRA_DIST = $(LIBS) bin suricata/config/defaults.py
|
|
|
|
if HAVE_PYTHON
|
|
|
|
install-exec-local:
|
|
install -d -m 0755 "$(DESTDIR)$(prefix)/lib/suricata/python/suricata/config"
|
|
install -d -m 0755 "$(DESTDIR)$(prefix)/lib/suricata/python/suricata/ctl"
|
|
install -d -m 0755 "$(DESTDIR)$(prefix)/lib/suricata/python/suricata/sc"
|
|
install -d -m 0755 "$(DESTDIR)$(prefix)/lib/suricata/python/suricatasc"
|
|
install -d -m 0755 "$(DESTDIR)$(prefix)/bin"
|
|
for src in $(LIBS); do \
|
|
install $(srcdir)/$$src "$(DESTDIR)$(prefix)/lib/suricata/python/$$src"; \
|
|
done
|
|
install suricata/config/defaults.py \
|
|
"$(DESTDIR)$(prefix)/lib/suricata/python/suricata/config/defaults.py"
|
|
for bin in $(BINS); do \
|
|
cat "$(srcdir)/bin/$$bin" | \
|
|
sed -e "1 s,.*,#"'!'" ${HAVE_PYTHON}," > "${DESTDIR}$(bindir)/$$bin"; \
|
|
chmod 0755 "$(DESTDIR)$(bindir)/$$bin"; \
|
|
done
|
|
|
|
uninstall-local:
|
|
rm -f $(DESTDIR)$(bindir)/suricatactl
|
|
rm -f $(DESTDIR)$(bindir)/suricatasc
|
|
rm -rf $(DESTDIR)$(prefix)/lib/suricata/python
|
|
|
|
clean-local:
|
|
find . -name \*.pyc -print0 | xargs -0 rm -f
|
|
|
|
endif
|