diff options
author | Jesse Jaggars <jhjaggars@gmail.com> | 2011-12-14 16:05:59 -0600 |
---|---|---|
committer | Jesse Jaggars <jhjaggars@gmail.com> | 2011-12-14 16:05:59 -0600 |
commit | 6ea48cbbc85d007dfefd1f254db66ff2e0a9cec5 (patch) | |
tree | 35188a9f5f2be7f3ae6ea52beea0883dca47abda /Makefile | |
parent | 1e83a26da25981f362d4acc35d61dfa3b2ab56a3 (diff) | |
download | sos-6ea48cbbc85d007dfefd1f254db66ff2e0a9cec5.tar.gz |
Major updates to most of SoSReport
Code reorganization
Cross platform support for Windows, OS X and Linux
Dynamically loaded policies
Support for loading plugins from multiple locations
via __path__ modification of sos.plugins
Support for running via Jython
Support for executing from a jarfile
Support for json based reporting infrastructure
- Previous reporting methods still exist
Support for other checksum algorithms (determined by policy)
Support for other compression algorithms (determined by policy)
New plugin API for writing arbitrary information in a new file inside
the report archive.
New plugin API for modifying files that have been added to the
archive.
Added API for global plugin options
- external interface is unavailable at this time
Many small bugfixes
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 44 |
1 files changed, 39 insertions, 5 deletions
@@ -9,6 +9,10 @@ REPO = http://svn.fedorahosted.org/svn/sos SUBDIRS = po sos sos/plugins PYFILES = $(wildcard *.py) +# OS X via brew +# MSGCAT = /usr/local/Cellar/gettext/0.18.1.1/bin/msgcat +MSGCAT = msgcat + RPM_BUILD_DIR = rpm-build RPM_DEFINES = --define "_topdir %(pwd)/$(RPM_BUILD_DIR)" \ @@ -19,6 +23,12 @@ RPM_DEFINES = --define "_topdir %(pwd)/$(RPM_BUILD_DIR)" \ --define "_sourcedir %{_topdir}" RPM = rpmbuild RPM_WITH_DIRS = $(RPM) $(RPM_DEFINES) +ARCHIVE_DIR = $(RPM_BUILD_DIR)/$(NAME)-$(VERSION) + +ARCHIVE_NAME = sosreport.zip +SRC_BUILD = $(RPM_BUILD_DIR)/sdist +PO_DIR = $(SRC_BUILD)/sos/po +ZIP_DEST = $(SRC_BUILD)/$(ARCHIVE_NAME) build: for d in $(SUBDIRS); do make -C $$d; [ $$? = 0 ] || exit 1 ; done @@ -37,14 +47,14 @@ 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.in >sos/__init__.py + sed 's/@SOSVERSION@/$(VERSION)/g' < sos/__init__.py > 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 - @mkdir -p $(RPM_BUILD_DIR) - @svn export --force $(PWD) $(RPM_BUILD_DIR)/$(NAME)-$(VERSION) - @mkdir -p $(RPM_BUILD_DIR)/$(NAME)-$(VERSION)/gpgkeys - @cp gpgkeys/rhsupport.pub $(RPM_BUILD_DIR)/$(NAME)-$(VERSION)/gpgkeys/. + @mkdir -p $(ARCHIVE_DIR) + @tar -cv sosreport sos doc man po sos.conf TODO LICENSE README sos.spec Makefile | tar -x -C $(ARCHIVE_DIR) + @mkdir -p $(ARCHIVE_DIR)/gpgkeys + @cp gpgkeys/rhsupport.pub $(ARCHIVE_DIR)/gpgkeys/. @tar Ccvzf $(RPM_BUILD_DIR) $(RPM_BUILD_DIR)/$(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION) clean: @@ -65,3 +75,27 @@ gpgkey: @echo "Building gpg key" @test -f gpgkeys/rhsupport.pub && echo "GPG key already exists." || \ gpg --batch --gen-key gpgkeys/gpg.template + +po: clean + mkdir -p $(PO_DIR) + for po in `ls po/*.po`; do \ + $(MSGCAT) -p -o $(PO_DIR)/$$(basename $$po | awk -F. '{print $$1}').properties $$po; \ + done; \ + + cp $(PO_DIR)/en.properties $(PO_DIR)/en_US.properties + +eap6: po + cp -r sos/* $(SRC_BUILD)/sos/ + find $(SRC_BUILD)/sos/plugins/ -not -name "*eap6.py" -not -name "*__init__.py" -type f -delete + +zip: po + zip -r $(ZIP_DEST) sos + zip -r $(ZIP_DEST) __run__.py + cd $(SRC_BUILD) && zip -r $(ARCHIVE_NAME) sos + cd $(SRC_BUILD) && rm -rf sos + +test: + @for test in `ls tests/*test*.py`; do \ + echo $$test; \ + PYTHONPATH=`pwd` python $$test; \ + done; \ |