Use CDBS upstream-tarball.mk snippet (not custom get-orig-source rules.
Jonas Smedegaard
11 years ago
19 | 19 | |
20 | 20 | #DEB_SUGAR_BRANCHES = 0.86 0.88 |
21 | 21 | DEB_PYTHON_SUGAR_PACKAGES = sugar-etoys-activity |
22 | ||
23 | ||
22 | include /usr/share/cdbs/1/rules/upstream-tarball.mk | |
24 | 23 | include /usr/share/cdbs/1/rules/utils.mk |
25 | 24 | include /usr/share/cdbs/1/class/python-sugar.mk |
26 | 25 | include /usr/share/cdbs/1/rules/debhelper.mk |
26 | ||
27 | DEB_UPSTREAM_PACKAGE = Etoys | |
28 | DEB_UPSTREAM_URL = http://download.sugarlabs.org/sources/sucrose/fructose/$(DEB_UPSTREAM_PACKAGE) | |
29 | DEB_UPSTREAM_TARBALL_EXTENSION = tar.bz2 | |
30 | DEB_UPSTREAM_TARBALL_MD5 = | |
27 | 31 | |
28 | 32 | # We support all branches, but default to 0.88. |
29 | 33 | CDBS_DEPENDS = python-sugar-0.88 | python-sugar, python-sugar-toolkit-0.88 | python-sugar-toolkit |
35 | 39 | # Suppress unneeded auto-resolved build-dependency on python-dev |
36 | 40 | CDBS_BUILD_DEPENDS_class_python-sugar_python = python$(cdbs_python_nondefault_version) |
37 | 41 | |
38 | # Rules for fetching the upstream tarball | |
39 | # Define the git repo and package name. | |
40 | #UPSTREAM_GIT='Tarball available' | |
41 | # TODO: Automatically figure this out from the package name | |
42 | PACKAGE_NAME=sugar-etoys-activity | |
43 | ||
44 | # NB: Don't touch this unless it's broken. | |
45 | CURRENT_TREEISH =$(shell dpkg-parsechangelog | sed -rne 's,^Version: .*git.{9}([^-]+).*,\1,p') | |
46 | CURVER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p') | |
47 | ||
48 | SOURCE_DIR=$(PACKAGE_NAME)-$(CURVER) | |
49 | TARBALL=$(PACKAGE_NAME)_$(CURVER).orig.tar.gz | |
50 | ||
51 | ||
52 | $(SOURCE_DIR): | |
53 | git clone $(UPSTREAM_GIT) $(SOURCE_DIR) | |
54 | if [ x$(CURRENT_TREEISH) = x ]; then \ | |
55 | cd $(SOURCE_DIR) && git checkout v$(CURVER); \ | |
56 | else \ | |
57 | cd $(SOURCE_DIR) && git checkout $(CURRENT_TREEISH); \ | |
58 | fi | |
59 | ||
60 | ||
61 | $(TARBALL): $(SOURCE_DIR) | |
62 | tar czvf $(TARBALL) $(SOURCE_DIR) | |
63 | ||
64 | get-orig-source: $(TARBALL) | |
65 | rm -rf $(SOURCE_DIR) $(SOURCE_DIR).temp | |
66 | ||
67 | 42 | clean:: |
68 | 43 | find -name *.mo -delete |
69 | 44 | find -name *.linfo -delete |