blob: 59a1ffad7a847c516b51f61c4af2606c534690be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#!/usr/bin/make -f
include /usr/share/ocaml/ocamlvars.mk
%:
dh $@ --with ocaml
override_dh_auto_build:
# workaround for https://bugs.launchpad.net/ocamlbricks/+bug/1173148
make meta.ml ; make meta.ml.released
dh_auto_build
override_dh_auto_clean:
dh_auto_clean
rm -f meta_ocamlbricks.ml
override_dh_auto_install:
dh_auto_install
rm -r $(CURDIR)/debian/libocamlbricks-ocaml-dev/bin
rm -r $(CURDIR)/debian/libocamlbricks-ocaml-dev/sbin
override_dh_auto_test:
# do nothing
# see https://launchpad.net/ocamlbricks/trunk
PACKAGE = ocamlbricks
SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
BZR_REVISION := $(shell echo $(SRC_VERSION) | awk -F"+" '{ print $$2 }' | sed 's/bzr//' )
TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz
get-orig-source:
rm -rf get-orig-source $(TARBALL)
mkdir get-orig-source
bzr branch -r $(BZR_REVISION) lp:$(PACKAGE)/trunk get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig
make -C get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig meta.ml.released
rm get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig/meta.ml
rm -rf get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig/.bzr
GZIP=--best tar czf $(TARBALL) -C get-orig-source $(PACKAGE)-$(SRC_VERSION).orig
rm -rf get-orig-source
echo " "$(TARBALL)" created; move it to the right destination to build the package"
.PHONY: get-orig-source
|