Codebase list sugar-log-activity / 4261c0d
Include CDBS upstream-tarball.mk, replacing local get-orig-source target. Jonas Smedegaard 8 years ago
1 changed file(s) with 5 addition(s) and 29 deletion(s). Raw diff Collapse all Expand all
66 DEB_SUGAR_BRANCHES = 0.86 0.88
77 DEB_PYTHON_SUGAR_PACKAGES = $(pkg)
88
9 include /usr/share/cdbs/1/rules/upstream-tarball.mk
910 include /usr/share/cdbs/1/rules/utils.mk
1011 include /usr/share/cdbs/1/class/python-sugar.mk
1112 include /usr/share/cdbs/1/rules/debhelper.mk
13
14 DEB_UPSTREAM_PACKAGE = Log
15 DEB_UPSTREAM_URL = http://download.sugarlabs.org/sources/sucrose/fructose/$(DEB_UPSTREAM_PACKAGE)
16 DEB_UPSTREAM_TARBALL_EXTENSION = tar.bz2
1217
1318 # Suppress unneeded auto-resolved build-dependency on python-dev
1419 CDBS_BUILD_DEPENDS_class_python-sugar_python = python$(cdbs_python_nondefault_version)
2328 CDBS_CONFLICTS_$(pkg) = $(DEB_SUGAR_SOURCE_PKGBASE)
2429 CDBS_REPLACES_$(pkg) = $(DEB_SUGAR_SOURCE_PKGBASE)
2530
26 # Rules for fetching the upstream tarball
27 #
28 # Define the git repo and package name.
29 UPSTREAM_GIT=git://git.sugarlabs.org/log/mainline.git
30 # TODO: Automatically figure this out from the package name
31 PACKAGE_NAME=sugar-log-activity
32
33 # NB: Don't touch this unless it's broken.
34 CURRENT_TREEISH =$(shell dpkg-parsechangelog | sed -rne 's,^Version: .*git.{9}([^-]+).*,\1,p')
35 CURVER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
36
37 SOURCE_DIR=$(PACKAGE_NAME)-$(CURVER)
38 TARBALL=$(PACKAGE_NAME)_$(CURVER).orig.tar.gz
39
40 $(SOURCE_DIR):
41 git clone $(UPSTREAM_GIT) $(SOURCE_DIR)
42 if [ x$(CURRENT_TREEISH) = x ]; then \
43 cd $(SOURCE_DIR) && git checkout v$(CURVER); \
44 else \
45 cd $(SOURCE_DIR) && git checkout $(CURRENT_TREEISH); \
46 fi
47 cd $(SOURCE_DIR) && rm -rf .git*
48
49 $(TARBALL): $(SOURCE_DIR)
50 tar czvf $(TARBALL) $(SOURCE_DIR)
51
52 get-orig-source: $(TARBALL)
53 rm -rf $(SOURCE_DIR) $(SOURCE_DIR).temp
54
5531 clean::
5632 find -name *.mo -delete
5733 find -name *.linfo -delete