OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 import os | 3 import os |
4 import common | |
5 from autotest_lib.client.bin import utils | 4 from autotest_lib.client.bin import utils |
6 | 5 |
7 version = 1 | 6 version = 1 |
8 | 7 |
9 def setup(tarball, topdir): | 8 def setup(tarball, topdir): |
10 srcdir = os.path.join(topdir, 'src') | 9 srcdir = os.path.join(topdir, 'src') |
11 if not os.path.exists(tarball): | 10 if not os.path.exists(tarball): |
12 utils.get_file('http://www.packetfactory.net/libnet/dist/libnet.tar.gz', | 11 utils.get_file('http://www.packetfactory.net/libnet/dist/libnet.tar.gz', |
13 tarball) | 12 tarball) |
14 utils.extract_tarball_to_dir(tarball, 'src') | 13 utils.extract_tarball_to_dir(tarball, 'src') |
15 os.chdir(srcdir) | 14 os.chdir(srcdir) |
16 utils.system ('./configure --prefix=%s/libnet' % topdir) | 15 utils.configure ('--prefix=%s/libnet' % topdir) |
17 utils.system('make') | 16 utils.make() |
18 utils.system('make install') | 17 utils.make('install') |
19 | 18 |
20 os.chdir(topdir) | 19 os.chdir(topdir) |
21 | 20 |
22 pwd = os.getcwd() | 21 pwd = os.getcwd() |
23 tarball = os.path.join(pwd, 'libnet.tar.gz') | 22 tarball = os.path.join(pwd, 'libnet.tar.gz') |
24 utils.update_version(pwd+'/src', False, version, setup, tarball, pwd) | 23 utils.update_version(pwd+'/src', False, version, setup, tarball, pwd) |
OLD | NEW |