1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
#!/usr/bin/make -f
# Verbose mode
#export DH_VERBOSE=1
%:
dh $@ --with python2
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
# create a dummy db for testing
rm -rf $(CURDIR)/debian/tests/testing.db
migrate version_control sqlite:////$(CURDIR)/debian/tests/testing.db \
$(CURDIR)/keystone/common/sql/migrate_repo
# run migrations
PYTHONPATH=$(CURDIR) migrate upgrade \
sqlite:////$(CURDIR)/debian/tests/testing.db \
$(CURDIR)/keystone/common/sql/migrate_repo
# tests/test_overrides.conf can be used to setup the environment
# for unit testing.
cp tests/test_overrides.conf tests/test_overrides.conf.orig
cp $(CURDIR)/debian/tests/test_overrides.conf $(CURDIR)/tests/test_overrides.conf
sed -i 's|%CUR_DIR%|$(CURDIR)|g' $(CURDIR)/tests/test_overrides.conf
# TEMP: ignore failures until bug 961871 is resolved
bash run_tests.sh -N
mv $(CURDIR)/tests/test_overrides.conf.orig $(CURDIR)/tests/test_overrides.conf
rm -rf $(CURDIR)/debian/tests/testing.db
endif
override_dh_auto_build:
dh_auto_build
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
python setup.py build_sphinx
else
mkdir -p $(CURDIR)/doc/build/html
mkdir -p $(CURDIR)/doc/build/man
endif
override_dh_install:
dh_install
rm -rf debian/python-keystone/usr/lib/python*/*/doc
rm -rf debian/python-keystone/usr/lib/python*/*/tools
rm -rf debian/python-keystone/usr/lib/python*/*/examples
install -D etc/keystone.conf debian/keystone/usr/share/keystone/keystone.conf
override_dh_clean:
rm -rf $(CURDIR)/build $(CURDIR)/keystone.egg-info $(CURDIR)/.cache
rm -rf $(CURDIR)/keystone/test/keystone.sql.log $(CURDIR)/keystone/test/keystone.ldap.log
rm -rf $(CURDIR)/doc/build
# NOTE(adam_g) The following stuff is built in /doc/source. Safe for now, but
# should be fixed upstream or updated here post-essex
rm -rf $(CURDIR)/doc/source/keystone*.rst
rm -rf $(CURDIR)/doc/source/modules.rst
rm -rf $(CURDIR)/doc/source/sourcecode
rm -rf $(CURDIR)/admin.log $(CURDIR)/keystone-legacy-auth.log
dh_clean
get-orig-source:
uscan --verbose --force-download --rename --destdir=../build-area
get-vcs-source:
git remote add upstream git://github.com/openstack/keystone.git || true
git fetch upstream
git archive --prefix=keystone-2012.1.1/ 2012.1.1 | xz >../keystone_2012.1.1.orig.tar.xz
if ! git checkout master ; then \
echo "No upstream branch: checking out" ; \
git checkout -b master upstream/master ; \
fi
git checkout debian/unstable
display-po-stats:
cd $(CURDIR)/debian/po ; for i in *.po ; do \
echo -n $$i": " ; \
msgfmt -o /dev/null --statistic $$i ; \
done
call-for-po-trans:
podebconf-report-po --call --withtranslators --languageteam
|