~brian-murray/unattended-upgrades/bug-fixes

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Michael Vogt
  • Date: 2013-04-12 17:27:56 UTC
  • mfrom: (262.1.5 py3)
  • Revision ID: michael.vogt@ubuntu.com-20130412172756-5i2mc7r2eyy2k1t0
merged py3 branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
 
 
3
PYTHON=python
 
4
#PYTHON=python3
3
5
DIST=$(shell /usr/bin/lsb_release -i -s)
4
6
 
5
7
%:
8
10
override_dh_auto_build:
9
11
        # copy the right template into place
10
12
        cp data/50unattended-upgrades.$(DIST) data/50unattended-upgrades
11
 
        dh_auto_build
 
13
        $(PYTHON) setup.py build
 
14
 
 
15
override_dh_auto_install:
 
16
        $(PYTHON) setup.py install \
 
17
                --root=$(CURDIR)/debian/unattended-upgrades \
 
18
                --install-layout=deb
12
19
 
13
20
override_dh_auto_clean:
14
21
        # Sanity-check before upload.
15
 
        set -e; if [ -e /usr/lib/python$(PYVER)/py_compile.py ]; then \
16
 
                for f in unattended-upgrade unattended-upgrade-shutdown; do \
17
 
                        ln -nsf $$f $$f.py; \
18
 
                        python$(PYVER) /usr/lib/python$(PYVER)/py_compile.py \
19
 
                                $$f.py; \
20
 
                        rm -f $$f.py; \
21
 
                done; \
22
 
        fi
23
 
        dh_auto_clean
 
22
        set -e; for f in unattended-upgrade unattended-upgrade-shutdown; do \
 
23
                ln -nsf $$f $$f.py; \
 
24
                py3compile $$f.py; \
 
25
                pycompile $$f.py; \
 
26
                rm -f $$f.py; \
 
27
        done
 
28
        $(PYTHON) setup.py clean -a
24
29
 
25
30
override_dh_installinit:
26
31
        # we do not want to run the init script in the postinst/prerm, its