diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2020-06-02 15:36:40 +0200 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2020-06-02 11:20:14 -0400 |
commit | b046c916be828660359bf30a61b8ff5a9822affc (patch) | |
tree | e7a51aa9554b1e0dd70f8cf1abe01a1619d15126 | |
parent | ad037308df9c08879918b5e4cf7481d7a71bbe0f (diff) | |
download | sos-b046c916be828660359bf30a61b8ff5a9822affc.tar.gz |
[Makefile] Make makefile working after the reorg
Since reorganization of sosreport directory tree for 4.0 preparation,
Makefie stopped working. Let apply the reorg to also here.
Resolves: #2096
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r-- | Makefile | 20 | ||||
-rw-r--r-- | sos/Makefile | 2 | ||||
-rw-r--r-- | sos/collector/Makefile | 20 | ||||
-rw-r--r-- | sos/collector/clusters/Makefile | 20 | ||||
-rw-r--r-- | sos/policies/Makefile | 2 | ||||
-rw-r--r-- | sos/report/Makefile | 20 | ||||
-rw-r--r-- | sos/report/plugins/Makefile | 2 |
7 files changed, 78 insertions, 8 deletions
@@ -9,7 +9,7 @@ MINOR := $(shell echo $(VERSION) | cut -f 2 -d '.') RELEASE := $(shell echo `awk '/^Release:/ {gsub(/\%.*/,""); print $2}' sos.spec`) REPO = https://github.com/sosreport/sos -SUBDIRS = po sos sos/plugins sos/policies docs +SUBDIRS = po sos sos/policies sos/report sos/report/plugins sos/collector sos/collector/clusters docs PYFILES = $(wildcard *.py) # OS X via brew # MSGCAT = /usr/local/Cellar/gettext/0.18.1.1/bin/msgcat @@ -44,11 +44,21 @@ install: mkdir -p $(DESTDIR)/usr/share/man/man1 mkdir -p $(DESTDIR)/usr/share/man/man5 mkdir -p $(DESTDIR)/usr/share/$(NAME)/extras - @gzip -c man/en/sosreport.1 > sosreport.1.gz + @gzip -c man/en/sos.1 > sos.1.gz + @gzip -c man/en/sos-report.1 > sos-report.1.gz + @gzip -c man/en/sos-collect.1 > sos-collect.1.gz @gzip -c man/en/sos.conf.5 > sos.conf.5.gz + @rm -f sosreport.1.gz sos-collector.1.gz + @ln -s sos-report.1.gz sosreport.1.gz + @ln -s sos-collect.1.gz sos-collector.1.gz mkdir -p $(DESTDIR)/etc - install -m755 sosreport $(DESTDIR)/usr/sbin/sosreport + install -m755 bin/sosreport $(DESTDIR)/usr/sbin/sosreport + install -m755 bin/sos $(DESTDIR)/usr/sbin/sos + install -m644 sos.1.gz $(DESTDIR)/usr/share/man/man1/. + install -m644 sos-report.1.gz $(DESTDIR)/usr/share/man/man1/. install -m644 sosreport.1.gz $(DESTDIR)/usr/share/man/man1/. + install -m644 sos-collect.1.gz $(DESTDIR)/usr/share/man/man1/. + install -m644 sos-collector.1.gz $(DESTDIR)/usr/share/man/man1/. install -m644 sos.conf.5.gz $(DESTDIR)/usr/share/man/man5/. install -m644 AUTHORS README.md $(DESTDIR)/usr/share/$(NAME)/. install -m644 $(NAME).conf $(DESTDIR)/etc/$(NAME).conf @@ -56,7 +66,7 @@ install: $(NAME)-$(VERSION).tar.gz: clean @mkdir -p $(ARCHIVE_DIR) - @tar -cv sosreport sos docs man po sos.conf AUTHORS LICENSE README.md sos.spec Makefile | tar -x -C $(ARCHIVE_DIR) + @tar -cv bin sos docs man po sos.conf AUTHORS LICENSE README.md sos.spec Makefile | tar -x -C $(ARCHIVE_DIR) @tar Ccvzf $(DIST_BUILD_DIR) $(DIST_BUILD_DIR)/$(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION) --exclude-vcs $(NAME)report_$(VERSION).orig.tar.gz: clean @@ -70,7 +80,7 @@ $(NAME)report_$(VERSION).orig.tar.gz: clean @rm -Rf $(DIST_BUILD_DIR) clean: - @rm -fv *~ .*~ changenew ChangeLog.old $(NAME)-$(VERSION).tar.gz sosreport.1.gz sos.conf.5.gz + @rm -fv *~ .*~ changenew ChangeLog.old $(NAME)-$(VERSION).tar.gz sos.1.gz sos-report.1.gz sos-collect.1.gz sos.conf.5.gz @rm -rf rpm-build @for i in `find . -iname *.pyc`; do \ rm -f $$i; \ diff --git a/sos/Makefile b/sos/Makefile index ed5f603c..5cb9b4a3 100644 --- a/sos/Makefile +++ b/sos/Makefile @@ -1,4 +1,4 @@ -PYTHON=python +PYTHON=python3 PACKAGE = $(shell basename `pwd`) PYVER := $(shell $(PYTHON) -c 'import sys; print("%.3s" %(sys.version))') PYSYSDIR := $(shell $(PYTHON) -c 'import sys; print(sys.prefix)') diff --git a/sos/collector/Makefile b/sos/collector/Makefile new file mode 100644 index 00000000..4cb2db4d --- /dev/null +++ b/sos/collector/Makefile @@ -0,0 +1,20 @@ +PYTHON=python3 +PACKAGE = $(shell basename `pwd`) +PYFILES = $(wildcard *.py) +PYVER := $(shell $(PYTHON) -c 'import sys; print("%.3s" %(sys.version))') +PYSYSDIR := $(shell $(PYTHON) -c 'import sys; print(sys.prefix)') +PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER) +PKGDIR = $(PYLIBDIR)/site-packages/sos/$(PACKAGE) + +all: + echo "nada" + +clean: + rm -f *.pyc *.pyo *~ + +install: + mkdir -p $(DESTDIR)/$(PKGDIR) + for p in $(PYFILES) ; do \ + install -m 644 $$p $(DESTDIR)/$(PKGDIR)/$$p; \ + done + $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/$(PKGDIR)', 1, '$(PYDIR)', 1)" diff --git a/sos/collector/clusters/Makefile b/sos/collector/clusters/Makefile new file mode 100644 index 00000000..4cb2db4d --- /dev/null +++ b/sos/collector/clusters/Makefile @@ -0,0 +1,20 @@ +PYTHON=python3 +PACKAGE = $(shell basename `pwd`) +PYFILES = $(wildcard *.py) +PYVER := $(shell $(PYTHON) -c 'import sys; print("%.3s" %(sys.version))') +PYSYSDIR := $(shell $(PYTHON) -c 'import sys; print(sys.prefix)') +PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER) +PKGDIR = $(PYLIBDIR)/site-packages/sos/$(PACKAGE) + +all: + echo "nada" + +clean: + rm -f *.pyc *.pyo *~ + +install: + mkdir -p $(DESTDIR)/$(PKGDIR) + for p in $(PYFILES) ; do \ + install -m 644 $$p $(DESTDIR)/$(PKGDIR)/$$p; \ + done + $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/$(PKGDIR)', 1, '$(PYDIR)', 1)" diff --git a/sos/policies/Makefile b/sos/policies/Makefile index b1e2f5e5..4cb2db4d 100644 --- a/sos/policies/Makefile +++ b/sos/policies/Makefile @@ -1,4 +1,4 @@ -PYTHON=python +PYTHON=python3 PACKAGE = $(shell basename `pwd`) PYFILES = $(wildcard *.py) PYVER := $(shell $(PYTHON) -c 'import sys; print("%.3s" %(sys.version))') diff --git a/sos/report/Makefile b/sos/report/Makefile new file mode 100644 index 00000000..4cb2db4d --- /dev/null +++ b/sos/report/Makefile @@ -0,0 +1,20 @@ +PYTHON=python3 +PACKAGE = $(shell basename `pwd`) +PYFILES = $(wildcard *.py) +PYVER := $(shell $(PYTHON) -c 'import sys; print("%.3s" %(sys.version))') +PYSYSDIR := $(shell $(PYTHON) -c 'import sys; print(sys.prefix)') +PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER) +PKGDIR = $(PYLIBDIR)/site-packages/sos/$(PACKAGE) + +all: + echo "nada" + +clean: + rm -f *.pyc *.pyo *~ + +install: + mkdir -p $(DESTDIR)/$(PKGDIR) + for p in $(PYFILES) ; do \ + install -m 644 $$p $(DESTDIR)/$(PKGDIR)/$$p; \ + done + $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/$(PKGDIR)', 1, '$(PYDIR)', 1)" diff --git a/sos/report/plugins/Makefile b/sos/report/plugins/Makefile index b1e2f5e5..4cb2db4d 100644 --- a/sos/report/plugins/Makefile +++ b/sos/report/plugins/Makefile @@ -1,4 +1,4 @@ -PYTHON=python +PYTHON=python3 PACKAGE = $(shell basename `pwd`) PYFILES = $(wildcard *.py) PYVER := $(shell $(PYTHON) -c 'import sys; print("%.3s" %(sys.version))') |