~ubuntu-branches/ubuntu/natty/unattended-upgrades/natty-proposed

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2009-07-06 17:34:25 UTC
  • Revision ID: james.westby@ubuntu.com-20090706173425-3tk9u9oz1642p3k9
Tags: 0.50ubuntu2
* Add sanity-check on clean to prevent uploads with Python syntax errors.
* Fix syntax error in unattended-upgrades-shutdown (LP: #396134).

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
DIST=$(shell /usr/bin/lsb_release -c -s)
12
12
DEBVER=$(shell dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p')
13
13
DEB_BUILD_PROG:=debuild --preserve-envvar PATH --preserve-envvar CCACHE_DIR -us -uc $(DEB_BUILD_PROG_OPTS)
 
14
PYVER=$(shell pyversions -dv)
14
15
 
15
16
 
16
17
 
45
46
        # Add here commands to clean up after the build process.
46
47
        #-$(MAKE) clean
47
48
        ./setup.py clean --all
 
49
 
 
50
        # Sanity-check before upload.
 
51
        set -e; if [ -e /usr/lib/python$(PYVER)/py_compile.py ]; then \
 
52
                for f in unattended-upgrade unattended-upgrade-shutdown; do \
 
53
                        ln -nsf $$f $$f.py; \
 
54
                        python$(PYVER) /usr/lib/python$(PYVER)/py_compile.py \
 
55
                                $$f.py; \
 
56
                        rm -f $$f.py; \
 
57
                done; \
 
58
        fi
 
59
 
48
60
        find . -name "*.so" -exec rm {} \;
49
61
        find . -name "*.o" -exec rm {} \;
50
62
        find . -name "*.pyc" -exec rm {} \;