diff options
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | sos/__init__.py.in (renamed from sos/__init__.py) | 0 | ||||
-rw-r--r-- | sos/policies/Makefile | 20 |
3 files changed, 23 insertions, 3 deletions
@@ -5,9 +5,9 @@ NAME = sos VERSION = $(shell echo `awk '/^Version:/ {print $$2}' sos.spec`) RELEASE = $(shell echo `awk '/^Release:/ {gsub(/\%.*/,""); print $2}' sos.spec`) -REPO = http://svn.fedorahosted.org/svn/sos +REPO = http://github.com/sosreport -SUBDIRS = po sos sos/plugins +SUBDIRS = po sos sos/plugins sos/policies PYFILES = $(wildcard *.py) # OS X via brew # MSGCAT = /usr/local/Cellar/gettext/0.18.1.1/bin/msgcat @@ -47,7 +47,7 @@ install: install -m644 LICENSE README TODO $(DESTDIR)/usr/share/$(NAME)/. install -m644 $(NAME).conf $(DESTDIR)/etc/$(NAME).conf install -m644 gpgkeys/rhsupport.pub $(DESTDIR)/usr/share/$(NAME)/. - sed 's/@SOSVERSION@/$(VERSION)/g' < sos/__init__.py > sos/__init__.py + sed 's/@SOSVERSION@/$(VERSION)/g' sos/__init__.py.in > sos/__init__.py for d in $(SUBDIRS); do make DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1; done $(NAME)-$(VERSION).tar.gz: clean gpgkey diff --git a/sos/__init__.py b/sos/__init__.py.in index f703a834..f703a834 100644 --- a/sos/__init__.py +++ b/sos/__init__.py.in diff --git a/sos/policies/Makefile b/sos/policies/Makefile new file mode 100644 index 00000000..8fd6a1bf --- /dev/null +++ b/sos/policies/Makefile @@ -0,0 +1,20 @@ +PYTHON=python +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 755 $$p $(DESTDIR)/$(PKGDIR)/$$p; \ + done + $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/$(PKGDIR)', 1, '$(PYDIR)', 1)" |