diff --git a/Makefile b/Makefile index b0681ce..c03782a 100644 --- a/Makefile +++ b/Makefile @@ -129,7 +129,7 @@ doc/$(LAPPNAME).txt: doc/$(LAPPNAME).1 deb: # build a debian package - [ -f $(DEBORIGFILE) ] || cp dist/$(ARCHIVE_SOURCE) $(DEBORIGFILE) $(DEBUILDDIR)/$(APPNAME)_$(VERSION).orig.tar.gz + [ -f $(DEBORIGFILE) ] || cp dist/$(ARCHIVE_SOURCE) $(DEBORIGFILE) $(DEBUILDDIR)/$(LAPPNAME)_$(VERSION).orig.tar.gz sed -i 's/VERSION:=.*/VERSION:=$(VERSION)/' $(DEBUILDDIR)/$(LAPPNAME).mak [ -d $(DEBPACKAGEDIR) ] || (cd $(DEBUILDDIR); \ patool extract $(DEBORIGFILE); \ @@ -137,8 +137,8 @@ deb: git checkout debian; \ cp -r debian $(DEBPACKAGEDIR); \ git checkout master) - rm -f $(DEBUILDDIR)/$(PACKAGE) - $(MAKE) -C $(DEBUILDDIR) $(PACKAGE) + rm -f $(DEBUILDDIR)/$(LAPPNAME) + $(MAKE) -C $(DEBUILDDIR) $(LAPPNAME) update-copyright: # update-copyright is a local tool which updates the copyright year for each diff --git a/setup.py b/setup.py index 982e788..efbdcd3 100644 --- a/setup.py +++ b/setup.py @@ -29,6 +29,7 @@ try: from cx_Freeze import setup, Executable except ImportError: from distutils.core import setup +from distutils.command.register import register try: # py2exe monkey-patches the distutils.core.Distribution class # So we need to import it before importing the Distribution class @@ -240,6 +241,16 @@ except ImportError: pass +class MyRegister (register, object): + """Custom register command.""" + + def build_post_data(self, action): + """Force application name to lower case.""" + data = super(MyRegister, self).build_post_data(action) + data['name'] = data['name'].lower() + return data + + args = dict( name = AppName, version = AppVersion, @@ -287,6 +298,7 @@ installed. distclass = MyDistribution, cmdclass = { 'py2exe': MyPy2exe, + 'register': MyRegister, }, options = { "py2exe": py2exe_options,