kexec-tools/anaconda-addon/Makefile
Arthur Zou 2553056c74 Rename the subpackage kdump-anaconda-addon
Rename the subpackage kdump-anaconda-addon to kexec-tools-anaconda-addon
to keep consistency and make fedpkg build happy

Because every time fedpkg builds a new release the package version number
should increase. But kdump-annaconda-addon just keep same version, so let's
rename it to kexec-tools-annaconda-addon here kexec-tools- is a default prefix.
For version let's use default top level version.

At the same time, rename the kdump-anaconda-addon directory name to anaconda-addon
to make it more standard. Using the current data instead of version number as a
surfix of kdump-anaconda-addon tarball just like kexec-tools-po did.

Signed-off-by: Arthur Zou <zzou@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2014-05-22 18:32:43 +08:00

80 lines
1.7 KiB
Makefile

NAME = kdump-anaconda-addon
ADDON = com_redhat_kdump
TESTS = test
FILES = $(ADDON) \
po \
Makefile \
README
EXCLUDES = \
*~ \
*.pyc
all:
@echo "usage: make dist"
@echo " make test"
@echo " make install"
@echo " make uninstall"
DISTNAME = $(NAME)-$(shell date +%Y%m%d)
ADDONDIR = /usr/share/anaconda/addons/
DISTBALL = $(DISTNAME).tar.gz
NUM_PROCS = $$(getconf _NPROCESSORS_ONLN)
install:
mkdir -p $(DESTDIR)$(ADDONDIR)
cp -rv $(ADDON) $(DESTDIR)$(ADDONDIR)
make install-po-files
uninstall:
rm -rfv $(DESTDIR)$(ADDONDIR)
dist:
rm -rf $(NAME)
mkdir -p $(NAME)
@if test -d ".git"; \
then \
echo Creating ChangeLog && \
( cd "$(top_srcdir)" && \
echo '# Generate automatically. Do not edit.'; echo; \
git log --stat --date=short ) > ChangeLog.tmp \
&& mv -f ChangeLog.tmp $(NAME)/ChangeLog \
|| ( rm -f ChangeLog.tmp ; \
echo Failed to generate ChangeLog >&2 ); \
else \
echo A git clone is required to generate a ChangeLog >&2; \
fi
for file in $(FILES); do \
cp -rpv $$file $(NAME)/$$file; \
done
for excl in $(EXCLUDES); do \
find $(NAME) -name "$$excl" -delete; \
done
tar -czvf ../$(DISTBALL) $(NAME)
rm -rf $(NAME)
potfile:
$(MAKE) DESTDIR=$(DESTDIR) -C po potfile
po-pull:
tx pull -a --disable-overwrite
install-po-files:
$(MAKE) -C po install
test:
@echo "***Running pylint checks***"
@find . -name '*.py' -print|xargs -n1 --max-procs=$(NUM_PROCS) pylint -E 2> /dev/null
@echo "[ OK ]"
@echo "***Running unittests checks***"
@PYTHONPATH=. nosetests --processes=-1 -vw tests/
runpylint:
@find . -name '*.py' -print|xargs -n1 --max-procs=$(NUM_PROCS) pylint -E 2> /dev/null
@echo "[ OK ]"
unittest:
PYTHONPATH=. nosetests --processes=-1 -vw tests/