Imported Debian patch 4.0.5-6~numeezy
This commit is contained in:
committed by
Mario Fetka
parent
c44de33144
commit
10dfc9587b
83
Makefile
83
Makefile
@@ -1,11 +1,7 @@
|
||||
# IPA build system cannot cope with parallel build; disable parallel build
|
||||
.NOTPARALLEL:
|
||||
|
||||
include VERSION
|
||||
|
||||
SUBDIRS=asn1 daemons install ipapython ipalib
|
||||
CLIENTDIRS=ipapython client asn1
|
||||
CLIENTPYDIRS=ipaclient ipaplatform
|
||||
SUBDIRS=daemons install ipapython ipa-client
|
||||
CLIENTDIRS=ipapython ipa-client
|
||||
|
||||
PRJ_PREFIX=freeipa
|
||||
|
||||
@@ -20,16 +16,15 @@ IPA_NUM_VERSION ?= $(shell printf %d%02d%02d $(IPA_VERSION_MAJOR) $(IPA_VERSION_
|
||||
# target.
|
||||
|
||||
ifeq ($(IPA_VERSION_IS_GIT_SNAPSHOT),"yes")
|
||||
DATESTR:=$(shell date -u +'%Y%m%d%H%M')
|
||||
GIT_VERSION:=$(shell git show --pretty=format:"%h" --stat HEAD 2>/dev/null|head -1)
|
||||
GIT_VERSION=$(shell git show --pretty=format:"%h" --stat HEAD 2>/dev/null|head -1)
|
||||
ifneq ($(GIT_VERSION),)
|
||||
IPA_VERSION=$(IPA_VERSION_MAJOR).$(IPA_VERSION_MINOR).$(IPA_VERSION_RELEASE).$(DATESTR)GIT$(GIT_VERSION)
|
||||
IPA_VERSION=$(IPA_VERSION_MAJOR).$(IPA_VERSION_MINOR).$(IPA_VERSION_RELEASE)GIT$(GIT_VERSION)
|
||||
endif # in a git tree and git returned a version
|
||||
endif # git
|
||||
|
||||
ifndef IPA_VERSION
|
||||
ifdef IPA_VERSION_ALPHA_RELEASE
|
||||
IPA_VERSION=$(IPA_VERSION_MAJOR).$(IPA_VERSION_MINOR).$(IPA_VERSION_RELEASE).alpha$(IPA_VERSION_ALPHA_RELEASE)
|
||||
ifdef IPA_VERSION_PRE_RELEASE
|
||||
IPA_VERSION=$(IPA_VERSION_MAJOR).$(IPA_VERSION_MINOR).$(IPA_VERSION_RELEASE).pre$(IPA_VERSION_PRE_RELEASE)
|
||||
else
|
||||
ifdef IPA_VERSION_BETA_RELEASE
|
||||
IPA_VERSION=$(IPA_VERSION_MAJOR).$(IPA_VERSION_MINOR).$(IPA_VERSION_RELEASE).beta$(IPA_VERSION_BETA_RELEASE)
|
||||
@@ -40,7 +35,7 @@ else
|
||||
IPA_VERSION=$(IPA_VERSION_MAJOR).$(IPA_VERSION_MINOR).$(IPA_VERSION_RELEASE)
|
||||
endif # rc
|
||||
endif # beta
|
||||
endif # alpha
|
||||
endif # pre
|
||||
endif # ipa_version
|
||||
|
||||
IPA_VENDOR_VERSION=$(IPA_VERSION)$(IPA_VENDOR_VERSION_SUFFIX)
|
||||
@@ -54,9 +49,7 @@ LIBDIR ?= /usr/lib
|
||||
|
||||
DEVELOPER_MODE ?= 0
|
||||
ifneq ($(DEVELOPER_MODE),0)
|
||||
LINT_IGNORE_FAIL=true
|
||||
else
|
||||
LINT_IGNORE_FAIL=false
|
||||
LINT_OPTIONS=--no-fail
|
||||
endif
|
||||
|
||||
PYTHON ?= $(shell rpm -E %__python || echo /usr/bin/python2)
|
||||
@@ -78,30 +71,21 @@ client: client-autogen
|
||||
@for subdir in $(CLIENTDIRS); do \
|
||||
(cd $$subdir && $(MAKE) all) || exit 1; \
|
||||
done
|
||||
@for subdir in $(CLIENTPYDIRS); do \
|
||||
(cd $$subdir && $(PYTHON) setup.py build); \
|
||||
done
|
||||
|
||||
check: bootstrap-autogen server tests
|
||||
@for subdir in $(SUBDIRS); do \
|
||||
(cd $$subdir && $(MAKE) check) || exit 1; \
|
||||
done
|
||||
cd ipaplatform && $(PYTHON) setup.py build
|
||||
|
||||
bootstrap-autogen: version-update client-autogen
|
||||
@echo "Building IPA $(IPA_VERSION)"
|
||||
cd asn1; if [ ! -e Makefile ]; then ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi
|
||||
cd daemons; if [ ! -e Makefile ]; then ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR) --with-openldap; fi
|
||||
cd install; if [ ! -e Makefile ]; then ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi
|
||||
|
||||
client-autogen: version-update
|
||||
cd asn1; if [ ! -e Makefile ]; then ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi
|
||||
cd client; if [ ! -e Makefile ]; then ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi
|
||||
cd ipa-client; if [ ! -e Makefile ]; then ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi
|
||||
cd install; if [ ! -e Makefile ]; then ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi
|
||||
|
||||
tests-man-autogen: version-update
|
||||
cd ipatests/man; if [ ! -e Makefile ]; then ../../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); fi
|
||||
|
||||
install: all server-install tests-install client-install
|
||||
install: all server-install tests-install
|
||||
@for subdir in $(SUBDIRS); do \
|
||||
(cd $$subdir && $(MAKE) $@) || exit 1; \
|
||||
done
|
||||
@@ -111,13 +95,13 @@ client-install: client client-dirs
|
||||
(cd $$subdir && $(MAKE) install) || exit 1; \
|
||||
done
|
||||
cd install/po && $(MAKE) install || exit 1;
|
||||
@for subdir in $(CLIENTPYDIRS); do \
|
||||
if [ "$(DESTDIR)" = "" ]; then \
|
||||
(cd $$subdir && $(PYTHON) setup.py install); \
|
||||
else \
|
||||
(cd $$subdir && $(PYTHON) setup.py install --root $(DESTDIR)); \
|
||||
fi \
|
||||
done
|
||||
if [ "$(DESTDIR)" = "" ]; then \
|
||||
$(PYTHON) setup-client.py install; \
|
||||
(cd ipaplatform && $(PYTHON) setup.py install); \
|
||||
else \
|
||||
$(PYTHON) setup-client.py install --root $(DESTDIR); \
|
||||
(cd ipaplatform && $(PYTHON) setup.py install --root $(DESTDIR)); \
|
||||
fi
|
||||
|
||||
client-dirs:
|
||||
@if [ "$(DESTDIR)" != "" ] ; then \
|
||||
@@ -129,14 +113,8 @@ client-dirs:
|
||||
fi
|
||||
|
||||
lint: bootstrap-autogen
|
||||
# find all python modules and executable python files outside modules for pylint check
|
||||
FILES=`find . \
|
||||
-type d -exec test -e '{}/__init__.py' \; -print -prune -o \
|
||||
-name \*.py -print -o \
|
||||
-type f \! -path '*/.*' \! -name '*~' -exec grep -qsm1 '^#!.*\bpython' '{}' \; -print`; \
|
||||
echo "Pylint is running, please wait ..."; \
|
||||
PYTHONPATH=. pylint --rcfile=pylintrc $(PYLINTFLAGS) $$FILES || $(LINT_IGNORE_FAIL)
|
||||
$(MAKE) -C install/po validate-src-strings || $(LINT_IGNORE_FAIL)
|
||||
./make-lint $(LINT_OPTIONS)
|
||||
$(MAKE) -C install/po validate-src-strings
|
||||
|
||||
|
||||
test:
|
||||
@@ -154,14 +132,10 @@ version-update: release-update
|
||||
> ipapython/setup.py
|
||||
sed -e s/__VERSION__/$(IPA_VERSION)/ ipaplatform/setup.py.in \
|
||||
> ipaplatform/setup.py
|
||||
sed -e s/__VERSION__/$(IPA_VERSION)/ ipalib/setup.py.in \
|
||||
> ipalib/setup.py
|
||||
sed -e s/__VERSION__/$(IPA_VERSION)/ ipapython/version.py.in \
|
||||
> ipapython/version.py
|
||||
sed -e s/__VERSION__/$(IPA_VERSION)/ ipatests/setup.py.in \
|
||||
> ipatests/setup.py
|
||||
sed -e s/__VERSION__/$(IPA_VERSION)/ ipaclient/setup.py.in \
|
||||
> ipaclient/setup.py
|
||||
sed -e s/__NUM_VERSION__/$(IPA_NUM_VERSION)/ install/ui/src/libs/loader.js.in \
|
||||
> install/ui/src/libs/loader.js
|
||||
perl -pi -e "s:__API_VERSION__:$(IPA_API_VERSION_MAJOR).$(IPA_API_VERSION_MINOR):" install/ui/src/libs/loader.js
|
||||
@@ -174,17 +148,16 @@ version-update: release-update
|
||||
perl -pi -e "s:__NUM_VERSION__:$(IPA_NUM_VERSION):" daemons/ipa-version.h
|
||||
perl -pi -e "s:__DATA_VERSION__:$(IPA_DATA_VERSION):" daemons/ipa-version.h
|
||||
|
||||
sed -e s/__VERSION__/$(IPA_VERSION)/ client/version.m4.in \
|
||||
> client/version.m4
|
||||
sed -e s/__VERSION__/$(IPA_VERSION)/ -e s/__RELEASE__/$(IPA_RPM_RELEASE)/ \
|
||||
ipa-client/ipa-client.spec.in > ipa-client/ipa-client.spec
|
||||
sed -e s/__VERSION__/$(IPA_VERSION)/ ipa-client/version.m4.in \
|
||||
> ipa-client/version.m4
|
||||
|
||||
if [ "$(SUPPORTED_PLATFORM)" != "" ]; then \
|
||||
sed -e s/__PLATFORM__/$(SUPPORTED_PLATFORM)/ \
|
||||
ipaplatform/__init__.py.in > ipaplatform/__init__.py; \
|
||||
rm -f ipaplatform/paths.py ipaplatform/services.py ipaplatform/tasks.py ipaplatform/constants.py; \
|
||||
rm -f ipaplatform/paths.py ipaplatform/services.py ipaplatform/tasks.py; \
|
||||
ln -s $(SUPPORTED_PLATFORM)/paths.py ipaplatform/paths.py; \
|
||||
ln -s $(SUPPORTED_PLATFORM)/services.py ipaplatform/services.py; \
|
||||
ln -s $(SUPPORTED_PLATFORM)/tasks.py ipaplatform/tasks.py; \
|
||||
ln -s $(SUPPORTED_PLATFORM)/constants.py ipaplatform/constants.py; \
|
||||
fi
|
||||
|
||||
if [ "$(SKIP_API_VERSION_CHECK)" != "yes" ]; then \
|
||||
@@ -231,7 +204,7 @@ archive-cleanup:
|
||||
tarballs: local-archive
|
||||
-mkdir -p dist/sources
|
||||
# tar up clean sources
|
||||
cd dist/$(TARBALL_PREFIX)/client; ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); make distclean
|
||||
cd dist/$(TARBALL_PREFIX)/ipa-client; ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); make distclean
|
||||
cd dist/$(TARBALL_PREFIX)/daemons; ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); make distclean
|
||||
cd dist/$(TARBALL_PREFIX)/install; ../autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=$(LIBDIR); make distclean
|
||||
cd dist; tar cfz sources/$(TARBALL) $(TARBALL_PREFIX)
|
||||
@@ -253,7 +226,6 @@ rpms: rpmroot rpmdistdir version-update lint tarballs
|
||||
cp dist/sources/$(TARBALL) $(RPMBUILD)/SOURCES/.
|
||||
rpmbuild --define "_topdir $(RPMBUILD)" -ba freeipa.spec
|
||||
cp $(RPMBUILD)/RPMS/*/$(PRJ_PREFIX)-*-$(IPA_VERSION)-*.rpm dist/rpms/
|
||||
cp $(RPMBUILD)/RPMS/*/python?-ipa*-$(IPA_VERSION)-*.rpm dist/rpms/
|
||||
cp $(RPMBUILD)/SRPMS/$(PRJ_PREFIX)-$(IPA_VERSION)-*.src.rpm dist/srpms/
|
||||
rm -rf $(RPMBUILD)
|
||||
|
||||
@@ -261,7 +233,6 @@ client-rpms: rpmroot rpmdistdir version-update lint tarballs
|
||||
cp dist/sources/$(TARBALL) $(RPMBUILD)/SOURCES/.
|
||||
rpmbuild --define "_topdir $(RPMBUILD)" --define "ONLY_CLIENT 1" -ba freeipa.spec
|
||||
cp $(RPMBUILD)/RPMS/*/$(PRJ_PREFIX)-*-$(IPA_VERSION)-*.rpm dist/rpms/
|
||||
cp $(RPMBUILD)/RPMS/*/python?-ipa*-$(IPA_VERSION)-*.rpm dist/rpms/
|
||||
cp $(RPMBUILD)/SRPMS/$(PRJ_PREFIX)-$(IPA_VERSION)-*.src.rpm dist/srpms/
|
||||
rm -rf $(RPMBUILD)
|
||||
|
||||
@@ -300,7 +271,7 @@ maintainer-clean: clean
|
||||
rm -fr $(RPMBUILD) dist build
|
||||
cd daemons && $(MAKE) maintainer-clean
|
||||
cd install && $(MAKE) maintainer-clean
|
||||
cd client && $(MAKE) maintainer-clean
|
||||
cd ipa-client && $(MAKE) maintainer-clean
|
||||
cd ipapython && $(MAKE) maintainer-clean
|
||||
rm -f version.m4
|
||||
rm -f freeipa.spec
|
||||
|
||||
Reference in New Issue
Block a user