|
Packit Service |
39273c |
NAME = oscap-anaconda-addon
|
|
Packit Service |
39273c |
|
|
Packit Service |
39273c |
VERSION = 1.1.1
|
|
Packit Service |
39273c |
|
|
Packit Service |
39273c |
ADDON = org_fedora_oscap
|
|
Packit Service |
39273c |
TESTS = tests \
|
|
Packit Service |
39273c |
testing_files
|
|
Packit Service |
39273c |
|
|
Packit Service |
ce796e |
DEFAULT_INSTALL_OF_PO_FILES ?= yes
|
|
Packit Service |
ce796e |
|
|
Packit Service |
39273c |
OSVERSION := $(shell grep -o " [0-9]\{1,\}" /etc/redhat-release | sed "s/ //g")
|
|
Packit Service |
39273c |
ifeq ($(OSVERSION),7)
|
|
Packit Service |
39273c |
PYVERSION = ""
|
|
Packit Service |
39273c |
else
|
|
Packit Service |
39273c |
PYVERSION = -3
|
|
Packit Service |
39273c |
endif
|
|
Packit Service |
39273c |
|
|
Packit Service |
39273c |
FILES = $(ADDON) \
|
|
Packit Service |
39273c |
$(TESTS) \
|
|
Packit Service |
39273c |
po \
|
|
Packit Service |
39273c |
COPYING \
|
|
Packit Service |
39273c |
Makefile \
|
|
Packit Service |
39273c |
README.md
|
|
Packit Service |
39273c |
|
|
Packit Service |
39273c |
EXCLUDES = \
|
|
Packit Service |
39273c |
*~ \
|
|
Packit Service |
39273c |
*.pyc
|
|
Packit Service |
39273c |
|
|
Packit Service |
39273c |
ZANATA_PULL_ARGS = --transdir po/
|
|
Packit Service |
39273c |
ZANATA_PUSH_ARGS = --srcdir po/ --push-type source --force
|
|
Packit Service |
39273c |
|
|
Packit Service |
39273c |
all:
|
|
Packit Service |
39273c |
|
|
Packit Service |
39273c |
DISTNAME = $(NAME)-$(VERSION)
|
|
Packit Service |
39273c |
ADDONDIR = /usr/share/anaconda/addons/
|
|
Packit Service |
39273c |
DISTBALL = $(DISTNAME).tar.gz
|
|
Packit Service |
39273c |
NUM_PROCS = $$(getconf _NPROCESSORS_ONLN)
|
|
Packit Service |
39273c |
|
|
Packit Service |
39273c |
install:
|
|
Packit Service |
39273c |
mkdir -p $(DESTDIR)$(ADDONDIR)
|
|
Packit Service |
39273c |
cp -rv $(ADDON) $(DESTDIR)$(ADDONDIR)
|
|
Packit Service |
ce796e |
ifeq ($(DEFAULT_INSTALL_OF_PO_FILES),yes)
|
|
Packit Service |
39273c |
$(MAKE) install-po-files
|
|
Packit Service |
ce796e |
endif
|
|
Packit Service |
39273c |
|
|
Packit Service |
39273c |
uninstall:
|
|
Packit Service |
39273c |
rm -rfv $(DESTDIR)$(ADDONDIR)
|
|
Packit Service |
39273c |
|
|
Packit Service |
39273c |
dist:
|
|
Packit Service |
39273c |
rm -rf $(DISTNAME)
|
|
Packit Service |
39273c |
mkdir -p $(DISTNAME)
|
|
Packit Service |
39273c |
@if test -d ".git"; \
|
|
Packit Service |
39273c |
then \
|
|
Packit Service |
39273c |
echo Creating ChangeLog && \
|
|
Packit Service |
39273c |
( cd "$(top_srcdir)" && \
|
|
Packit Service |
39273c |
echo '# Generate automatically. Do not edit.'; echo; \
|
|
Packit Service |
39273c |
git log --stat --date=short ) > ChangeLog.tmp \
|
|
Packit Service |
39273c |
&& mv -f ChangeLog.tmp $(DISTNAME)/ChangeLog \
|
|
Packit Service |
39273c |
|| ( rm -f ChangeLog.tmp ; \
|
|
Packit Service |
39273c |
echo Failed to generate ChangeLog >&2 ); \
|
|
Packit Service |
39273c |
else \
|
|
Packit Service |
39273c |
echo A git clone is required to generate a ChangeLog >&2; \
|
|
Packit Service |
39273c |
fi
|
|
Packit Service |
39273c |
for file in $(FILES); do \
|
|
Packit Service |
39273c |
cp -rpv $$file $(DISTNAME)/$$file; \
|
|
Packit Service |
39273c |
done
|
|
Packit Service |
39273c |
for excl in $(EXCLUDES); do \
|
|
Packit Service |
39273c |
find $(DISTNAME) -name "$$excl" -delete; \
|
|
Packit Service |
39273c |
done
|
|
Packit Service |
39273c |
tar -czvf $(DISTBALL) $(DISTNAME)
|
|
Packit Service |
39273c |
rm -rf $(DISTNAME)
|
|
Packit Service |
39273c |
|
|
Packit Service |
39273c |
potfile:
|
|
Packit Service |
39273c |
$(MAKE) -C po potfile
|
|
Packit Service |
39273c |
|
|
Packit Service |
39273c |
po-pull:
|
|
Packit Service |
39273c |
@which zanata > /dev/null 2>&1 || echo "You may not have the Zanata client installed, don't be surprised if the operation fails."
|
|
Packit Service |
39273c |
zanata pull $(ZANATA_PULL_ARGS)
|
|
Packit Service |
39273c |
|
|
Packit Service |
39273c |
push-pot: potfile
|
|
Packit Service |
39273c |
@which zanata > /dev/null 2>&1 || echo "You may not have the Zanata client installed, don't be surprised if the operation fails."
|
|
Packit Service |
39273c |
zanata push $(ZANATA_PUSH_ARGS)
|
|
Packit Service |
39273c |
|
|
Packit Service |
39273c |
install-po-files:
|
|
Packit Service |
ce796e |
$(MAKE) -C po install RPM_BUILD_ROOT=$(DESTDIR)
|
|
Packit Service |
39273c |
|
|
Packit Service |
39273c |
test:
|
|
Packit Service |
39273c |
@echo "***Running pylint$(PYVERSION) checks***"
|
|
Packit Service |
39273c |
@find . -name '*.py' -print|xargs -n1 --max-procs=$(NUM_PROCS) pylint$(PYVERSION) -E 2> /dev/null
|
|
Packit Service |
39273c |
@echo "[ OK ]"
|
|
Packit Service |
39273c |
@echo "***Running unittests checks***"
|
|
Packit Service |
39273c |
@PYTHONPATH=. py.test$(PYVERSION) --processes=-1 -vw tests/
|
|
Packit Service |
39273c |
|
|
Packit Service |
39273c |
runpylint:
|
|
Packit Service |
39273c |
@find . -name '*.py' -print|xargs -n1 --max-procs=$(NUM_PROCS) pylint$(PYVERSION) -E 2> /dev/null
|
|
Packit Service |
39273c |
@echo "[ OK ]"
|
|
Packit Service |
39273c |
|
|
Packit Service |
39273c |
unittest:
|
|
Packit Service |
39273c |
PYTHONPATH=. py.test$(PYVERSION) -v tests/
|