[SCM] ci-tooling packaging branch, master, updated. c8bb08da4d11808da041234b3a3a9fac9332fb62

Harald Sitter apachelogger-guest at moszumanska.debian.org
Tue Apr 28 12:23:00 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=47c2b7f

The following commit has been merged in the master branch:
commit 47c2b7f11a2704d2a23c6c46e59b94472273de97
Author: Harald Sitter <sitter at kde.org>
Date:   Tue Apr 28 13:55:43 2015 +0200

    apply native source building support changes to new builder
---
 kci/build_source.rb | 41 +++++++++++++++++++++++++++--------------
 1 file changed, 27 insertions(+), 14 deletions(-)

diff --git a/kci/build_source.rb b/kci/build_source.rb
index 08f6379..a65cc37 100755
--- a/kci/build_source.rb
+++ b/kci/build_source.rb
@@ -37,6 +37,7 @@ at_exit do
 end
 
 # install deps
+# TODO: clean out and probably get rid entirely
 `apt-get install -y xz-utils dpkg-dev ruby dput debhelper pkg-kde-tools devscripts python-launchpadlib ubuntu-dev-tools git`
 
 # version
@@ -47,23 +48,35 @@ source_name = changelog.name
 # copy sources around
 FileUtils.rm_r('build') if File.exist?('build')
 FileUtils.mkpath('build/source/')
-`cp -rv source/* build/source/`
 
-Dir.chdir('build/source') do
-  FileUtils.rm_rf(Dir.glob('**/.bzr'))
-  FileUtils.rm_rf(Dir.glob('**/.git'))
-  FileUtils.rm_rf(Dir.glob('**/.svn'))
-end
+# copy upstream sources around
+if Dir.exist?('source')
+  abort 'Failed to copy source' unless system('cp -rv source/* build/source/')
+  Dir.chdir('build/source') do
+    FileUtils.rm_rf(Dir.glob('**/.bzr'))
+    FileUtils.rm_rf(Dir.glob('**/.git'))
+    FileUtils.rm_rf(Dir.glob('**/.svn'))
+  end
 
-# create orig tar
-Dir.chdir('build/') do
-  tar = "#{source_name}_#{version.tar}.orig.tar"
-  abort 'Failed to create a tarball' unless system("tar -cf #{tar} source")
-  abort 'Failed to compress the tarball' unless system("xz -6 #{tar}")
-end
+  # create orig tar
+  Dir.chdir('build/') do
+    tar = "#{source_name}_#{version.tar}.orig.tar"
+    abort 'Failed to create a tarball' unless system("tar -cf #{tar} source")
+    abort 'Failed to compress the tarball' unless system("xz -6 #{tar}")
+  end
 
-# Copy some more
-`cp -rv packaging/* build/source/`
+  # Copy packaging
+  unless system('cp -rv packaging/debian build/source/')
+    abort 'Failed to copy packaging'
+  end
+else
+  # This is a native package as we have no upstream source directory.
+  # TODO: quite possibly this should be porperly validated via source format and
+  #       or changelog version format.
+  unless system('cp -rv packaging/* build/source/')
+    abort 'Failed to copy packaging'
+  end
+end
 
 # Create changelog entry
 Dir.chdir('build/source/') do

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list