--- repackage.py
+++ repackage.py
@@ -60,17 +60,18 @@ class Repackage(BaseScript):
         return self.abs_dirs
 
     def repackage(self):
         config = self.config
         dirs = self.query_abs_dirs()
 
         subst = {
             'package-name': config['package-name'],
-            'sfx-stub': config['sfx-stub'],
+            # sfx-stub is only defined for Windows targets
+            'sfx-stub': config.get('sfx-stub'),
             'installer-tag': config['installer-tag'],
             'stub-installer-tag': config['stub-installer-tag'],
             'wsx-stub': config['wsx-stub'],
         }
         subst.update(dirs)
         if config.get('fetch-dir'):
             subst.update({'fetch-dir': os.path.abspath(config['fetch-dir'])})
 
