Remove scripts dir from tarballs.
Remove original CMakeLists.txt after patching it. svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=908701
This commit is contained in:
parent
10b869ed3b
commit
c2d04d4552
|
@ -28,33 +28,38 @@ class PartitionManagerApp < Application
|
||||||
end
|
end
|
||||||
|
|
||||||
def applyFixes(workingDir, outputDir)
|
def applyFixes(workingDir, outputDir)
|
||||||
puts "applying fixes for partition manager"
|
puts 'applying fixes for partition manager'
|
||||||
|
|
||||||
Dir.chdir "#{workingDir}/#{outputDir}"
|
Dir.chdir "#{workingDir}/#{outputDir}"
|
||||||
|
|
||||||
return if !File.exists? 'doc'
|
puts 'removing scripts subdir...'
|
||||||
|
FileUtils.rm_rf 'scripts'
|
||||||
|
|
||||||
FileUtils.mv('CMakeLists.txt', 'CMakeLists.txt.orig')
|
if File.exists? 'doc' then
|
||||||
|
puts 'patching CMakeLists.txt to build docs only with new kdelibs...'
|
||||||
|
|
||||||
|
FileUtils.mv('CMakeLists.txt', 'CMakeLists.txt.orig')
|
||||||
|
|
||||||
newFile = File.new('CMakeLists.txt', File::CREAT | File::TRUNC | File::RDWR)
|
newFile = File.new('CMakeLists.txt', File::CREAT | File::TRUNC | File::RDWR)
|
||||||
|
|
||||||
IO.foreach('CMakeLists.txt.orig') do |line|
|
IO.foreach('CMakeLists.txt.orig') do |line|
|
||||||
if line =~ /\s*macro_optional_add_subdirectory\s*\(\s*doc\s*\)\s*/i
|
if line =~ /\s*macro_optional_add_subdirectory\s*\(\s*doc\s*\)\s*/i
|
||||||
newFile.print <<END_OF_TEXT
|
newFile.print <<END_OF_TEXT
|
||||||
if (KDE_VERSION VERSION_GREATER "4.1.3")
|
if (KDE_VERSION VERSION_GREATER "4.1.3")
|
||||||
macro_optional_add_subdirectory(doc)
|
macro_optional_add_subdirectory(doc)
|
||||||
else (KDE_VERSION VERSION_GREATER "4.1.3")
|
else (KDE_VERSION VERSION_GREATER "4.1.3")
|
||||||
message (STATUS "No documentation built for KDE libs < 4.1.4")
|
message (STATUS "No documentation built for KDE libs < 4.1.4")
|
||||||
endif (KDE_VERSION VERSION_GREATER "4.1.3")
|
endif (KDE_VERSION VERSION_GREATER "4.1.3")
|
||||||
END_OF_TEXT
|
END_OF_TEXT
|
||||||
else
|
else
|
||||||
newFile << line
|
newFile << line
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
FileUtils.rm_rf 'CMakeLists.txt.orig'
|
||||||
|
|
||||||
|
newFile.close
|
||||||
end
|
end
|
||||||
|
|
||||||
FileUtils.rm_rf 'CMakeLists.txt.orig'
|
|
||||||
|
|
||||||
newFile.close
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue