[Kde-imaging] extragear/libs
Angelo Naselli
anaselli at linux.it
Sun Feb 11 20:09:09 CET 2007
SVN commit 632620 by anaselli:
Added version.h management
CCMAIL:kde-imaging at kde.org
M +26 -2 prepare_libkexiv2.rb
--- trunk/extragear/libs/prepare_libkexiv2.rb #632619:632620
@@ -9,6 +9,8 @@
name = "libkexiv2"
egmodule = "libs"
version = "0.1.0-svn"
+version_n = "0x000100"
+
t = Time.now
date = t.strftime("%Y-%m-%d")
@@ -33,9 +35,31 @@
File.rename(old_file, "old.orig")
File.rename(new_file, old_file)
-# automatic commit changes
-#`svn ci #{old_file} -m "New release version"`
+# modify libkexiv2/version.h
+old_file = name + "/version.h"
+new_file = name + "/version.h.new"
+old = File.open(old_file)
+new = File.open(new_file, "w")
+while old.gets do
+ fileLine = $_
+ if (fileLine.index("kipi_version") )
+ new.print "static const char kexiv2_version[] = \"" + version + "\";\n"
+ elsif (fileLine.index("KEXIV2_VERSION") )
+ if (fileLine.index("0x"))
+ new.print "#define KEXIV2_VERSION " + version_n +"\n"
+ else
+ new.print fileLine
+ end
+ else
+ new.print fileLine
+ end
+end
+old.close
+new.close
+File.rename(old_file, "old.orig")
+File.rename(new_file, old_file)
+
# modify libkexiv2/libkexiv2.pc.in
old_file = name + "/" + name + ".pc.in"
new_file = name + "/" + name + ".pc.in.new"
More information about the Kde-imaging
mailing list