author | Augie Fackler <augie@google.com> |
Wed, 26 Aug 2015 10:59:09 -0400 | |
changeset 26148 | 7f49efcaa9b4 |
child 26296 | 9cecbe837c94 |
permissions | -rw-r--r-- |
26148
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
1 |
#!/usr/bin/make -f |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
2 |
# Uncomment this to turn on verbose mode. |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
3 |
# export DH_VERBOSE=1 |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
4 |
|
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
5 |
CPUS=$(shell cat /proc/cpuinfo | grep -E ^processor | wc -l) |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
6 |
|
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
7 |
%: |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
8 |
dh $@ --with python2 |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
9 |
|
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
10 |
override_dh_auto_test: |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
11 |
http_proxy='' dh_auto_test -- TESTFLAGS="-j$(CPUS)" |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
12 |
|
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
13 |
override_dh_python2: |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
14 |
dh_python2 |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
15 |
find debian/mercurial/usr/share -type d -empty -delete |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
16 |
|
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
17 |
override_dh_install: |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
18 |
python$(PYVERS) setup.py install --root $(CURDIR)/debian/mercurial --install-layout=deb |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
19 |
# remove arch-independent python stuff |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
20 |
find $(CURDIR)/debian/mercurial/usr/lib \ |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
21 |
! -name '*.so' ! -type d -delete , \ |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
22 |
-type d -empty -delete |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
23 |
python$(PYVERS) setup.py install --root $(CURDIR)/debian/mercurial-common --install-layout=deb |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
24 |
make install-doc PREFIX=$(CURDIR)/debian/mercurial-common/usr |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
25 |
# remove arch-dependent python stuff |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
26 |
find $(CURDIR)/debian/mercurial-common/usr/lib \ |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
27 |
-name '*.so' ! -type d -delete , \ |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
28 |
-type d -empty -delete |
7f49efcaa9b4
debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
29 |
rm $(CURDIR)/debian/mercurial-common/usr/bin/hg |