2014-09-01 13:16:04 +00:00
|
|
|
def create_source_tarball suffix = ""
|
2015-04-26 09:31:11 +00:00
|
|
|
tarball = "#{Dir.pwd}/../mkvtoolnix-#{c(:PACKAGE_VERSION)}#{suffix}.tar.xz"
|
2014-09-01 13:16:04 +00:00
|
|
|
fail "#{tarball} does already exist" if FileTest.exists?(tarball)
|
|
|
|
|
|
|
|
Dir.mktmpdir do |dir|
|
2015-04-26 09:31:11 +00:00
|
|
|
clone_dir = "#{dir}/mkvtoolnix-#{c(:PACKAGE_VERSION)}"
|
2014-09-01 13:16:04 +00:00
|
|
|
commands = [
|
|
|
|
"git clone \"#{Dir.pwd}\" \"#{clone_dir}\"",
|
|
|
|
"cd #{clone_dir}",
|
|
|
|
"./autogen.sh",
|
|
|
|
"git submodule init",
|
|
|
|
"git submodule update",
|
|
|
|
"rm -rf .git",
|
|
|
|
"cd ..",
|
2015-04-26 09:31:11 +00:00
|
|
|
"tar cJf \"#{tarball}\" mkvtoolnix-#{c(:PACKAGE_VERSION)}",
|
2014-09-01 13:16:04 +00:00
|
|
|
]
|
|
|
|
system commands.join(" && ")
|
2015-05-12 17:21:27 +00:00
|
|
|
puts tarball
|
2014-09-01 13:16:04 +00:00
|
|
|
end
|
|
|
|
end
|