##// END OF EJS Templates
packaging: distinguish clean and build steps from install in Debian
Denis Laxalde -
r43625:cdf6db1f stable
parent child Browse files
Show More
@@ -1,47 +1,55 b''
1 #!/usr/bin/make -f
1 #!/usr/bin/make -f
2 # Uncomment this to turn on verbose mode.
2 # Uncomment this to turn on verbose mode.
3 # export DH_VERBOSE=1
3 # export DH_VERBOSE=1
4
4
5 CPUS=$(shell cat /proc/cpuinfo | grep -E ^processor | wc -l)
5 CPUS=$(shell cat /proc/cpuinfo | grep -E ^processor | wc -l)
6
6
7 export HGPYTHON3=1
7 export HGPYTHON3=1
8 export PYTHON=python3
8 export PYTHON=python3
9
9
10 %:
10 %:
11 dh $@ --with python3
11 dh $@ --with python3
12
12
13 override_dh_auto_test:
13 override_dh_auto_test:
14 http_proxy='' dh_auto_test -- TESTFLAGS="-j$(CPUS)"
14 http_proxy='' dh_auto_test -- TESTFLAGS="-j$(CPUS)"
15
15
16 override_dh_python3:
16 override_dh_python3:
17 dh_python3 --shebang=/usr/bin/python3
17 dh_python3 --shebang=/usr/bin/python3
18 find debian/mercurial/usr/share -type d -empty -delete
18 find debian/mercurial/usr/share -type d -empty -delete
19
19
20 override_dh_auto_clean:
21 $(MAKE) cleanbutpackages
22 $(MAKE) -C contrib/chg clean
23
24 override_dh_auto_build:
25 $(MAKE) all
26 $(MAKE) -C contrib/chg all
27
20 override_dh_install:
28 override_dh_install:
21 python3 setup.py install --root "$(CURDIR)"/debian/mercurial --install-layout=deb
29 python3 setup.py install --root "$(CURDIR)"/debian/mercurial --install-layout=deb
22 # chg
30 # chg
23 make -C contrib/chg \
31 make -C contrib/chg \
24 DESTDIR="$(CURDIR)"/debian/mercurial \
32 DESTDIR="$(CURDIR)"/debian/mercurial \
25 PREFIX=/usr \
33 PREFIX=/usr \
26 clean install
34 install
27 # remove arch-independent python stuff
35 # remove arch-independent python stuff
28 find "$(CURDIR)"/debian/mercurial/usr/lib \
36 find "$(CURDIR)"/debian/mercurial/usr/lib \
29 ! -name '*.so' ! -type d -delete , \
37 ! -name '*.so' ! -type d -delete , \
30 -type d -empty -delete
38 -type d -empty -delete
31 python3 setup.py install --root "$(CURDIR)/debian/mercurial-common" --install-layout=deb
39 python3 setup.py install --root "$(CURDIR)/debian/mercurial-common" --install-layout=deb
32 make install-doc PREFIX="$(CURDIR)"/debian/mercurial-common/usr
40 make install-doc PREFIX="$(CURDIR)"/debian/mercurial-common/usr
33 # remove arch-dependent python stuff
41 # remove arch-dependent python stuff
34 find "$(CURDIR)"/debian/mercurial-common/usr/lib \
42 find "$(CURDIR)"/debian/mercurial-common/usr/lib \
35 -name '*.so' ! -type d -delete , \
43 -name '*.so' ! -type d -delete , \
36 -type d -empty -delete
44 -type d -empty -delete
37 cp contrib/hg-ssh "$(CURDIR)"/debian/mercurial-common/usr/bin
45 cp contrib/hg-ssh "$(CURDIR)"/debian/mercurial-common/usr/bin
38 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/mercurial
46 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/mercurial
39 cp contrib/hgk "$(CURDIR)"/debian/mercurial-common/usr/share/mercurial
47 cp contrib/hgk "$(CURDIR)"/debian/mercurial-common/usr/share/mercurial
40 mkdir -p "$(CURDIR)"/debian/mercurial-common/etc/mercurial/hgrc.d/
48 mkdir -p "$(CURDIR)"/debian/mercurial-common/etc/mercurial/hgrc.d/
41 cp contrib/packaging/debian/*.rc "$(CURDIR)"/debian/mercurial-common/etc/mercurial/hgrc.d/
49 cp contrib/packaging/debian/*.rc "$(CURDIR)"/debian/mercurial-common/etc/mercurial/hgrc.d/
42 # completions
50 # completions
43 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/bash-completion/completions
51 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/bash-completion/completions
44 cp contrib/bash_completion "$(CURDIR)"/debian/mercurial-common/usr/share/bash-completion/completions/hg
52 cp contrib/bash_completion "$(CURDIR)"/debian/mercurial-common/usr/share/bash-completion/completions/hg
45 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/zsh/vendor-completions
53 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/zsh/vendor-completions
46 cp contrib/zsh_completion "$(CURDIR)"/debian/mercurial-common/usr/share/zsh/vendor-completions/_hg
54 cp contrib/zsh_completion "$(CURDIR)"/debian/mercurial-common/usr/share/zsh/vendor-completions/_hg
47 rm "$(CURDIR)"/debian/mercurial-common/usr/bin/hg
55 rm "$(CURDIR)"/debian/mercurial-common/usr/bin/hg
General Comments 0
You need to be logged in to leave comments. Login now