patch [#26146] debian/rules: Avoid unnecessary downloading
authorCampbell Barton <ideasman42@gmail.com>
Mon, 21 Feb 2011 13:59:42 +0000 (13:59 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 21 Feb 2011 13:59:42 +0000 (13:59 +0000)
--- from the tracker
It's annoying that build_debian.sh downloads the source tree to create tarball every time we build a deb package.

fix_debian_rules_avoid_downloading.patch modifies debian/rules so that the tarball will be created from local repository if possible.

build_files/package_spec/debian/rules

index 60b8c694dd4303fc98d45d5a88b86e4a62bbcefd..2991589916ec307133959bab432481458c737a81 100755 (executable)
@@ -30,7 +30,11 @@ override_dh_python3:
 get-orig-source:
        rm -rf get-orig-source $(TARBALL)
        mkdir get-orig-source
-       svn -q export -r $(REV) $(SVN_URL) get-orig-source/blender-$(VER)
+       if [ "$(SVN_URL)" = . ] && [ `svnversion` = "$(REV)" ]; then \
+               svn -q export . get-orig-source/blender-$(VER); \
+       else \
+               svn -q export -r $(REV) $(SVN_URL) get-orig-source/blender-$(VER); \
+       fi
        GZIP='--best --no-name' tar czf $(TARBALL) -C get-orig-source blender-$(VER)
        rm -rf get-orig-source
        @echo "$(TARBALL) created; move it to the right destination to build the package"