X-Git-Url: http://www.project-moonshot.org/gitweb/?p=moonshot.git;a=blobdiff_plain;f=builder;h=edea55936d13807e33c082cc7abeb4e6a7b3b230;hp=0eb12e4c3dd9a160d7ee8c14a01f5fc589f23ab2;hb=60450f58765da6ab187477a5cbfcb8fbd6c3b485;hpb=16330f41bacab20f3a21293c24f9f33441cf8eed diff --git a/builder b/builder index 0eb12e4..edea559 100755 --- a/builder +++ b/builder @@ -20,6 +20,10 @@ root_command = "fakeroot" schroot_command = "" +bz2_packages=["opensaml2", + "xmltooling", + "shibboleth/sp"] + class CommandError(exceptions.StandardError): pass @@ -68,7 +72,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,8 +89,16 @@ 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) + #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) + elif package in bz2_packages: + run_cmd(root_command +' make dist-bzip2', shell=True) + run_cmd('cp *.tar.bz2 ' +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): @@ -138,12 +155,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)