summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Weller <ianweller@gmail.com>2008-10-06 17:58:37 -0500
committerIan Weller <ianweller@gmail.com>2008-10-06 17:58:37 -0500
commitc938eb594f68ed23bc1a05a546dc072511611ab5 (patch)
tree53760ff2cd610232b85795b11c2b5e2e315a7c49
parent9bb370ab92301c3a172b32f28b333fe75d704798 (diff)
downloadfedora-business-cards-c938eb594f68ed23bc1a05a546dc072511611ab5.zip
fedora-business-cards-c938eb594f68ed23bc1a05a546dc072511611ab5.tar.gz
fedora-business-cards-c938eb594f68ed23bc1a05a546dc072511611ab5.tar.xz
Add install_executable target
-rw-r--r--INSTALL3
-rw-r--r--pavement.py22
2 files changed, 22 insertions, 3 deletions
diff --git a/INSTALL b/INSTALL
index 378c034..00bb30f 100644
--- a/INSTALL
+++ b/INSTALL
@@ -2,7 +2,6 @@ Make sure you have the following packages from yum:
mgopen-fonts inkscape PyXML python-iniparse pygpgme python-fedora paver
Then run:
- paver install
- paver install_templates
+ paver install install_templates install_executable
Done!
diff --git a/pavement.py b/pavement.py
index 40316c1..87f8583 100644
--- a/pavement.py
+++ b/pavement.py
@@ -17,12 +17,15 @@ options(
install_templates=Bunch(
templates=glob("templates/*"),
data_dir="/usr/share/fedora-business-cards"
+ ),
+ install_executable=Bunch(
+ bin_dir="/usr/bin"
)
)
@task
-@cmdopts([('root=', 'r', 'install everything relative to this alternative root'
+@cmdopts([('root=', None, 'install everything relative to this alternative root'
' directory')])
def install_templates():
"""install necessary templates for generator"""
@@ -46,3 +49,20 @@ def install_templates():
templates_dir.makedirs(0755)
command = "install -p %s %s" % (template_file, templates_dir)
dry(command, paver.runtime.sh, [command])
+
+
+@task
+@cmdopts([('root=', None, 'install everything relative to this alternative root'
+ ' directory')])
+def install_executable():
+ """install executable for generator"""
+ options.order("install_executable", add_rest=True)
+ try:
+ root_dir = options.root
+ except AttributeError:
+ root_dir = ''
+ bin_dir = paver.path.path(root_dir + options.bin_dir)
+ if not os.path.exists(bin_dir):
+ bin_dir.makedirs(0755)
+ command = "install -p %s %s" % ("fedora-business-cards", bin_dir)
+ dry(command, paver.runtime.sh, [command])