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
29
30
31
32
33
34
35
36
37
38
|
#!/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:
-bX Build stage option, where X is stage, default is -bb
-I Don't automatically try install missing build dependencies
-l Disable rpmlint check of packages built
-P USER Define the RPM packager information to USER
-d Use DNF
-q Quiet build output
-s Jump to specific build stage (--short-circuit)
"""
def parse_options():
parser = OptionParser(HELP)
parser.add_option("-b", dest="build_cmd", default="a")
parser.add_option("-I", dest="installdeps", action="store_false", default=True)
parser.add_option("-l", dest="rpmlint", action="store_false", default=True)
parser.add_option("-P", dest="packager", default="")
parser.add_option("-d", "--dnf", dest="use_dnf", action="store_true", default=False)
parser.add_option("-q", "--quiet", dest="verbose", action="store_false", default=True)
parser.add_option("-s", "--short-circuit", dest="short_circuit", action="store_true", default=False)
opts, args = parser.parse_args()
return opts
def main():
do_command(parse_options, build_rpm)
# vim:et:ts=4:sw=4
|