Web lists-archives.com

Re[2]: releasing KTorrent, attempt 2




> Nick, what did you use for KTorrent?
i used kde-dev-scripts, with the patch attached to this mail.

export XZ_OPT=-9
./create_tarball.rb -v 2.0.1 -n -a libktorrent
./create_tarball.rb -v 5.0.1 -n -a ktorrent

the script retrieves sources from trunk/master, but this was fine for me because i didn't change anything since branching.
 
 
diff --git a/createtarball/create_tarball.rb b/createtarball/create_tarball.rb
index 7397764..bc6d99b 100755
--- a/createtarball/create_tarball.rb
+++ b/createtarball/create_tarball.rb
@@ -304,7 +304,7 @@ apps.each do |app|
     if appdata["translations"] != "no" && options.translations
         puts "-> Fetching l10n docs for #{appdata["submodulepath"]}#{app} #{revString}..."
 
-        i18nlangs = `svn cat #{svnroot}/#{appdata["l10npath"]}/l10n-kde4/subdirs #{rev}`.split
+        i18nlangs = `svn cat #{svnroot}/#{appdata["l10npath"]}/l10n-kf5/subdirs #{rev}`.split
         i18nlangsCleaned = []
         for lang in i18nlangs
             l = lang.chomp
@@ -327,7 +327,7 @@ apps.each do |app|
             for dg in appdata["addDocs"]
                 dg.chomp!
                 `rm -rf #{dg}`
-                docdirname = "#{appdata["l10npath"]}/l10n-kde4/#{lang}/docs/#{appdata["l10nmodule"]}/#{dg}"
+                docdirname = "#{appdata["l10npath"]}/l10n-kf5/#{lang}/docs/#{appdata["l10nmodule"]}/#{dg}"
                 if ( appdata["docs"] != "no" )
                     puts "  -> Checking if #{lang} has translated documentation...\n"
                     if dg.include? "/"
@@ -349,11 +349,11 @@ apps.each do |app|
                 topmakefile << "add_subdirectory( #{lang}_#{dg}/#{dg} )\n"
 
                 makefile = File.new( "../doc-translations/#{lang}_#{dg}/#{dg}/CMakeLists.txt", File::CREAT | File::RDWR | File::TRUNC )
-                if dg.include? "/"
-                    makefile << "kde4_create_handbook( index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/#{lang}/ SUBDIR #{dg})\n"
-                else
-                    makefile << "kde4_create_handbook( index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/#{lang}/)\n"
-                end
+#                 if dg.include? "/"
+                    makefile << "kdoctools_create_handbook( index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/#{lang} SUBDIR #{dg})\n"
+#                 else
+#                     makefile << "kdoctools_create_handbook( index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/#{lang}/)\n"
+#                 end
                 l10nroot=Dir.getwd
                 Dir.chdir( "../doc-translations/#{lang}_#{dg}/#{dg}")
                 `find -name ".svn" | xargs rm -rf`
@@ -364,7 +364,7 @@ apps.each do |app|
                         if FileTest.directory?(path)
                             makefile << "add_subdirectory( " + File.basename(path) + " )\n"
                             submakefile = File.new(  File.basename(path) + "/CMakeLists.txt", File::CREAT | File::RDWR | File::TRUNC )
-                            submakefile << "kde4_create_handbook( index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/#{lang}/#{dg}/)\n"
+                            submakefile << "kdoctools_create_handbook( index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/#{lang} SUBDIR #{dg} )\n"
                             submakefile.close()
                             Find.prune
                         end
@@ -386,7 +386,7 @@ apps.each do |app|
         $subdirs = false
         Dir.mkdir( "po" )
 
-        topmakefile = File.new( "po/CMakeLists.txt", File::CREAT | File::RDWR | File::TRUNC )
+#         topmakefile = File.new( "po/CMakeLists.txt", File::CREAT | File::RDWR | File::TRUNC )
         for lang in i18nlangs
             lang.chomp!
             dest = "po/#{lang}"
@@ -395,23 +395,23 @@ apps.each do |app|
                 dg.chomp!
                 if appdata["wholeModule"]
                     print "  -> Copying #{lang}'s over ..\n"
-                    pofolder = "#{appdata["l10npath"]}/l10n-kde4/#{lang}/messages/#{appdata["l10nmodule"]}"
+                    pofolder = "#{appdata["l10npath"]}/l10n-kf5/#{lang}/messages/#{appdata["l10nmodule"]}"
                     `svn co #{svnroot}/#{pofolder} #{dest}`
-                    if FileTest.exist?( dest )
-                      topmakefile << "add_subdirectory( #{lang} )\n"
-                    end
+#                     if FileTest.exist?( dest )
+#                       topmakefile << "add_subdirectory( #{lang} )\n"
+#                     end
                     next if !FileTest.exist?( dest )
 
                 elsif appdata["custompo"]
                     valid = false
                     for sp in appdata["custompo"].split(/,/)
-                        pofilename = "#{appdata["l10npath"]}/l10n-kde4/#{lang}/messages/#{appdata["l10nmodule"]}/#{sp}.po"
+                        pofilename = "#{appdata["l10npath"]}/l10n-kf5/#{lang}/messages/#{appdata["l10nmodule"]}/#{sp}.po"
                         `svn cat #{svnroot}/#{pofilename} #{rev} 2> /dev/null | tee l10n/#{sp}.po`
                         if not FileTest.size( "l10n/#{sp}.po" ) == 0
                             valid=true
                             if !FileTest.exist?( dest )
                                 Dir.mkdir( dest )
-                                topmakefile << "add_subdirectory( #{lang} )\n"
+#                                 topmakefile << "add_subdirectory( #{lang} )\n"
                             end
                             print "\n  -> Copying #{lang}'s #{sp}.po over ..  "
                             `mv l10n/#{sp}.po #{dest}`
@@ -419,13 +419,13 @@ apps.each do |app|
                     end
                     next if not valid
                 else
-                    pofilename = "#{appdata["l10npath"]}/l10n-kde4/#{lang}/messages/#{appdata["l10nmodule"]}/#{dg}.po"
+                    pofilename = "#{appdata["l10npath"]}/l10n-kf5/#{lang}/messages/#{appdata["l10nmodule"]}/#{dg}.po"
                     `svn cat #{svnroot}/#{pofilename} #{rev} 2> /dev/null | tee l10n/#{dg}.po`
                     next if FileTest.size( "l10n/#{dg}.po" ) == 0
                     
                     if !FileTest.exist?( dest )
                         Dir.mkdir( dest )
-                        topmakefile << "add_subdirectory( #{lang} )\n"
+#                         topmakefile << "add_subdirectory( #{lang} )\n"
                     end
 
                     print "  -> Copying #{lang}'s #{dg}.po over ..  "
@@ -433,20 +433,21 @@ apps.each do |app|
                     puts( "done.\n" )
                 end
 
-                makefile = File.new( "#{dest}/CMakeLists.txt", File::CREAT | File::RDWR | File::TRUNC )
-                makefile << "file(GLOB _po_files *.po)\n"
-                makefile << "GETTEXT_PROCESS_PO_FILES( #{lang} ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )\n"
-                makefile.close()
+#                 makefile = File.new( "#{dest}/CMakeLists.txt", File::CREAT | File::RDWR | File::TRUNC )
+#                 makefile << "file(GLOB _po_files *.po)\n"
+#                 makefile << "GETTEXT_PROCESS_PO_FILES( #{lang} ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} )\n"
+#                 makefile.close()
             end
         end
-        topmakefile.close()
+#         topmakefile.close()
 
         `rm -rf l10n`
 
         # add l10n to compilation.
-        `echo "find_package(Msgfmt REQUIRED)" >> CMakeLists.txt`
-        `echo "find_package(Gettext REQUIRED)" >> CMakeLists.txt`
-        `echo "add_subdirectory( po )" >> CMakeLists.txt`
+        `echo "find_package(KF5I18n CONFIG REQUIRED)" >> CMakeLists.txt`
+        `echo "ki18n_install(po)" >> CMakeLists.txt`
+#         `echo "find_package(Gettext REQUIRED)" >> CMakeLists.txt`
+#         `echo "add_subdirectory( po )" >> CMakeLists.txt`
         if appdata["docs"] != "no"
             `echo "add_subdirectory( doc-translations )" >> CMakeLists.txt`
         end
@@ -457,7 +458,7 @@ apps.each do |app|
         if !FileTest.exists?( "l10ndata_temp" )
             puts "-> Fetching l10n data from #{datafolder} #{revString}..."
 
-            i18nlangs = `svn cat #{svnroot}/#{appdata["l10npath"]}/l10n-kde4/subdirs #{rev}`.split
+            i18nlangs = `svn cat #{svnroot}/#{appdata["l10npath"]}/l10n-kf5/subdirs #{rev}`.split
             i18nlangsCleaned = []
             for lang in i18nlangs
                 l = lang.chomp
@@ -474,7 +475,7 @@ apps.each do |app|
             for lang in i18nlangs
                 lang.chomp!
                 
-                docdirname = "#{appdata["l10npath"]}/l10n-kde4/#{lang}/data/#{datafolder}"
+                docdirname = "#{appdata["l10npath"]}/l10n-kf5/#{lang}/data/#{datafolder}"
                 puts "  -> Checking if #{lang} has localized data...\n"
                 `rm -rf l10ndata_temp`
                 `svn co -q #{rev} #{svnroot}/#{docdirname} l10ndata_temp 2> /dev/null 2>&1`