aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/commands/buildrpm.py
blob: b58ac6557055ae3efbbbfbbed99243fd1af6bb28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/python
#
from MgaRepo.command import do_command
from MgaRepo.rpmutil import build_rpm
from optparse import *

HELP = """\
Usage: mgarepo buildrpm [OPTIONS]

Builds the binary RPM(s) (.rpm) file(s) of a given package.

Options:
    -l         Disable rpmlint check of packages built
"""

def parse_options():
    parser = OptionParser(HELP)
    parser.add_option("-b", dest="build_cmd", default="a")
    parser.add_option("-P", dest="packager", default="")
    parser.add_option("-v", "--verbose", dest="verbose", action="store_true", default=False)
    parser.add_option("-l", dest="rpmlint", action="store_false", default=True)
    opts, args = parser.parse_args()
    return opts

def main():
    do_command(parse_options, build_rpm)

# vim:et:ts=4:sw=4