[Debian-in-commits] [SCM] dh-make-font.git branch, master, updated. e546e21c60af35b90730d66654bf1e86498dc462

Vasudev Kamath kamathvasudev at gmail.com
Sun Dec 18 15:10:48 UTC 2011


The following commit has been merged in the master branch:
commit f4d4fd1c246ee18b8be2f05b798c8eaea485f686
Author: Vasudev Kamath <kamathvasudev at gmail.com>
Date:   Sun Dec 18 17:09:27 2011 +0530

    Fixed the version number issue. Control file editing done

diff --git a/dh-make-font b/dh-make-font
index 1014a9f..155385f 100755
--- a/dh-make-font
+++ b/dh-make-font
@@ -9,7 +9,7 @@ import re
 required_files = ["control", "copyright", "changelog", "source", "compat",
                   "rules", "format"]
 DEFAULT_MAINTAINER = "Debian Fonts Task Force <pkg-fonts-devel at lists.alioth.debian.org>"
-UPLOADERS = (os.environ.get('DEBEMAIL') + " " + os.environ.get('DEBFULLNAME')) if os.environ.has_key('DEBEMAIL') else "#Please fill in your name and email"
+UPLOADERS = (os.environ.get('DEBFULLNAME') + " " + os.environ.get('DEBEMAIL')) if os.environ.has_key('DEBEMAIL') else "#Please fill in your name and email"
 
 font_reg_exp = re.compile("((.)*\.ttf|sfd|otf)")	# RE to check
 
@@ -59,6 +59,8 @@ def call_dh_make(args):
 		args_string += " -p "+args.package
         else:
                 if not args.foldername.startswith('fonts-'):
+                        if args.foldername.find('-'):
+                                args.foldername = args.foldername.replace('-','_')
                         args_string += " -p fonts-" + args.foldername
                 else:
                         args_string += " -p " + args.foldername
@@ -87,7 +89,31 @@ if __name__ == "__main__":
     
     with open('watch','w') as fd:
             fd.write(watch)
-    
-    
 
-    
+    control_content = ""
+    with open('control',"rb") as fd:
+            contents = fd.read().split('\n')
+            for line in contents:
+                    if line.startswith('Maintainer:'):
+                            if args.maint:
+                                    control_content += "Maintainer: "+args.maint
+                            else:
+                                    control_content += "Maintainer: " + DEFAULT_MAINTAINER
+
+                            control_content += "\nUploaders: "+UPLOADERS
+                    elif line.startswith('Build-Depends:'):
+                            control_content += line +"#,fontforge"
+                    elif line.startswith('Architecture:'):
+                            control_content += "Architecture: all"
+                    elif line.startswith('Section:'):
+                            control_content += "Section: fonts"
+                    elif line.startswith('Priority:'):
+                            control_content += "Priority: optional"
+                    elif line.startswith('Depends:'):
+                            control_content += "Depends: ${misc:Depends}"
+                    else:
+                            control_content += line
+
+                    control_content += "\n"
+    with open('control','wb') as fd:
+            fd.write(control_content)    

-- 
dh-make-font.git



More information about the Debian-in-commits mailing list