summaryrefslogtreecommitdiff
path: root/cpp/install/rpm/makeSRPMs.py
blob: 3e8531647f1653617957bbce077276a75d5af50f (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************
import os, sys, getopt
import RPMTools

def usage():
    pass

def main():
    #
    # targetSystem describes the system we are building the SRPM for.
    # Different target systems will have different contents + build
    # steps.
    #
    targetSystem = None

    #
    # sourceLocation indicates a directory that contains the required
    # SRPM contents.
    #
    sourceLocation = None

    try:
        optionList, args = getopt.getopt(sys.argv[1:], "hs:t:", ["sources=", "target-host=", "help"])

    except getopt.GetoptError:
        usage()
        sys.exit(2)

    for o, a in optionList:
        if o in ["-h", "--help"]:
            pass
        if o in ["-s", "--sources"]:
            pass
        if o in ["-t", "--target-host"]:
            pass

    f = open("./test.spec", "w+b")
    RPMTools.createFullSpecFile(f, "", "3.2.0", 32, "suse")
    f.close()

if __name__ == "__main__":
    main()