[Debian-in-commits] [SCM] dh-make-font.git branch, master, updated. e546e21c60af35b90730d66654bf1e86498dc462
Vasudev Kamath
kamathvasudev at gmail.com
Sun Dec 18 15:10:47 UTC 2011
The following commit has been merged in the master branch:
commit 1462f49fc10553bc73f3fe29cc0cf93c13de1ecd
Author: Vasudev Kamath <kamathvasudev at gmail.com>
Date: Sun Dec 18 15:58:34 2011 +0530
Added more functionality
diff --git a/dh-make-font b/dh-make-font
index c09e1cc..1014a9f 100755
--- a/dh-make-font
+++ b/dh-make-font
@@ -7,9 +7,16 @@ import re
required_files = ["control", "copyright", "changelog", "source", "compat",
- "rules"]
+ "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"
+font_reg_exp = re.compile("((.)*\.ttf|sfd|otf)") # RE to check
+
+watch = """
+version=3
+#please put upstream url for watch expression
+"""
# This section of code parses the command line arguments.
arguments = argparse.ArgumentParser(description='dh-make-font',
@@ -35,11 +42,9 @@ arguments.add_argument('foldername',
def check_files():
# We need to perform a directory traversal to find .ttf .otf or .sfd.
# Any one will do. [We are so kind arn't we]
- reg_exp = "((.)+\.ttf|sfd|otf)" # RE to check
- prog = re.compile(reg_exp);
for dirpath,dirnames,filenames in os.walk('.'):
for filename in filenames:
- if(prog.match(filename)):
+ if font_reg_exp.search(filename):
return 0
return -1 # No need to go into sub directories
return -1
@@ -47,12 +52,17 @@ def check_files():
# Failure : Non 0 value
# Sucess : 0
def call_dh_make(args):
- args_string = " --createorig" # Stores the final argument to be passed to dh_make
+ args_string = " -createorig" # Stores the final argument to be passed to dh_make
if(args.copyright):
args_string += " -c "+args.copyright
if(args.package):
args_string += " -p "+args.package
-
+ else:
+ if not args.foldername.startswith('fonts-'):
+ args_string += " -p fonts-" + args.foldername
+ else:
+ args_string += " -p " + args.foldername
+
# Make a call to the system function.
return os.system("dh_make"+args_string)
@@ -69,4 +79,15 @@ if __name__ == "__main__":
print("dh_make_font: dh_make died so I dye.")
exit(256)
+ os.chdir(os.path.abspath('debian'))
+ for dirpath,dirname,filenames in os.walk('.'):
+ for filename in filenames:
+ if not filename in required_files:
+ os.remove(filename)
+
+ with open('watch','w') as fd:
+ fd.write(watch)
+
+
+
--
dh-make-font.git
More information about the Debian-in-commits
mailing list