X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=builder;h=ac46689e0656b7a2e32bc206d9113a227b25ccd5;hb=5afacafaf498aad9298cb13bafa87cfbe6896248;hp=576ee2fd338eb91f79833be4c79bb6cdc86e9489;hpb=96bf7fafdf76d89ca0959a5c8d37d3f9c4ef2cc3;p=moonshot.git diff --git a/builder b/builder index 576ee2f..ac46689 100755 --- a/builder +++ b/builder @@ -68,7 +68,12 @@ def command_output(args) : def build(package): with current_directory(package): - run_cmd(('autoreconf', '-i', '-f')) + try: os.makedirs( "m4") + except OSError: pass + #On Centos, freeradius produces an invalid configure script + # They check in a configure script anyway so we don't need autoconf + if package != "freeradius-server": + run_cmd(('autoreconf', '-i', '-f')) configure_command = [ './configure'] + configure_opts if len(schroot_command) > 0: @@ -80,9 +85,14 @@ def build(package): if dist: try: os.mkdir('doc/api') except: pass - run_cmd(root_command +' make dist-gzip', shell=True) - run_cmd('cp *.tar.gz ' +dist_dir, shell=True) - run_cmd(schroot_command + ' make', shell=True) + #Currently freeradius's make dist is broken + if package == "freeradius-server": + run_cmd(root_command + " git archive --prefix=freeradius-server/ HEAD |gzip -9 >freeradius-server.tar.gz", shell=True) + run_cmd('cp *.tar.gz freeradius-server.spec ' +dist_dir, shell=True) + else: #not specially handled + run_cmd(root_command +' make dist-gzip', shell=True) + run_cmd('cp *.tar.gz ' +dist_dir, shell=True) + run_cmd(schroot_command + ' make -j3', shell=True) def make_install(package): with current_directory(package): @@ -138,12 +148,12 @@ prefix = options.prefix root_command = options.root_command dist = options.dist configure_opts = ['--prefix', prefix, - "LDFLAGS=-Wl,-L"+prefix+"/lib -Wl,-L/usr/lib/freeradius" - + " -Wl,-rpath="+prefix+"/lib", + "LDFLAGS=-Wl,-L"+prefix+"/lib -Wl,-rpath="+prefix+"/lib", 'CPPFLAGS=-I '+prefix+'/include', '--with-system-libtool', '--with-system-libltdl', '--enable-tls', '--with-gssapi='+prefix, "--with-xmltooling="+prefix, + '--with-systemdsystemunitdir=' + prefix+'/lib/systemd', ] if options.configure_opts is not None: configure_opts.extend(options.configure_opts) @@ -153,8 +163,9 @@ if tar_file is not None: dist = True our_schroot = None if options.schroot is not None: our_schroot = Schroot(options.schroot) - schroot_command = "schroot -r -c " + our_schroot.name + ' --' - root_command = schroot_command + " -u root" + schroot_command_base = "schroot -r -c " + our_schroot.name + root_command = schroot_command_base + " -u root --" + schroot_command = schroot_command_base + ' --' all_packages = read_packages() if len(packages) == 0: packages = all_packages