##// END OF EJS Templates
packaging: avoid running bare "make install" in debian/rules...
Denis Laxalde -
r43626:11c85873 stable
parent child Browse files
Show More
@@ -1,55 +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:
20 override_dh_auto_clean:
21 $(MAKE) cleanbutpackages
21 $(MAKE) cleanbutpackages
22 $(MAKE) -C contrib/chg clean
22 $(MAKE) -C contrib/chg clean
23
23
24 override_dh_auto_build:
24 override_dh_auto_build:
25 $(MAKE) all
25 $(MAKE) all
26 $(MAKE) -C contrib/chg all
26 $(MAKE) -C contrib/chg all
27
27
28 override_dh_install:
28 override_dh_auto_install:
29 python3 setup.py install --root "$(CURDIR)"/debian/mercurial --install-layout=deb
29 python3 setup.py install --root "$(CURDIR)"/debian/mercurial --install-layout=deb
30 # chg
30 # chg
31 make -C contrib/chg \
31 make -C contrib/chg \
32 DESTDIR="$(CURDIR)"/debian/mercurial \
32 DESTDIR="$(CURDIR)"/debian/mercurial \
33 PREFIX=/usr \
33 PREFIX=/usr \
34 install
34 install
35 # remove arch-independent python stuff
35 # remove arch-independent python stuff
36 find "$(CURDIR)"/debian/mercurial/usr/lib \
36 find "$(CURDIR)"/debian/mercurial/usr/lib \
37 ! -name '*.so' ! -type d -delete , \
37 ! -name '*.so' ! -type d -delete , \
38 -type d -empty -delete
38 -type d -empty -delete
39 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
40 make install-doc PREFIX="$(CURDIR)"/debian/mercurial-common/usr
40 make install-doc PREFIX="$(CURDIR)"/debian/mercurial-common/usr
41 # remove arch-dependent python stuff
41 # remove arch-dependent python stuff
42 find "$(CURDIR)"/debian/mercurial-common/usr/lib \
42 find "$(CURDIR)"/debian/mercurial-common/usr/lib \
43 -name '*.so' ! -type d -delete , \
43 -name '*.so' ! -type d -delete , \
44 -type d -empty -delete
44 -type d -empty -delete
45 cp contrib/hg-ssh "$(CURDIR)"/debian/mercurial-common/usr/bin
45 cp contrib/hg-ssh "$(CURDIR)"/debian/mercurial-common/usr/bin
46 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/mercurial
46 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/mercurial
47 cp contrib/hgk "$(CURDIR)"/debian/mercurial-common/usr/share/mercurial
47 cp contrib/hgk "$(CURDIR)"/debian/mercurial-common/usr/share/mercurial
48 mkdir -p "$(CURDIR)"/debian/mercurial-common/etc/mercurial/hgrc.d/
48 mkdir -p "$(CURDIR)"/debian/mercurial-common/etc/mercurial/hgrc.d/
49 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/
50 # completions
50 # completions
51 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/bash-completion/completions
51 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/bash-completion/completions
52 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
53 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/zsh/vendor-completions
53 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/zsh/vendor-completions
54 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
55 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