Esempio n. 1
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    pisitools.domove("/usr/share/doc/%s/*.html"% get.srcTAG(), "/usr/share/doc/%s/html/"% get.srcTAG())
    pisitools.remove("%s/mime.types"% get.confDIR())
    pisitools.remove("%s/*.dist"% get.confDIR())
    pisitools.remove("/usr/share/doc/%s/INSTALL" % get.srcTAG())
    pisitools.remove("/usr/share/doc/%s/TODO"% get.srcTAG())
Esempio n. 2
0
def install(parameters='', argument='install', no_sb2=False):
    '''install source into install directory with given parameters'''
    cmd = 'make prefix=%(prefix)s/%(defaultprefix)s \
           datadir=%(prefix)s/%(data)s \
           infodir=%(prefix)s/%(info)s \
           localstatedir=%(prefix)s/%(localstate)s \
           mandir=%(prefix)s/%(man)s \
           sysconfdir=%(prefix)s/%(conf)s \
           %(parameters)s \
           %(argument)s' % {
        'prefix': get.installDIR(),
        'defaultprefix': get.defaultprefixDIR(),
        'man': get.manDIR(),
        'info': get.infoDIR(),
        'localstate': get.localstateDIR(),
        'conf': get.confDIR(),
        'data': get.dataDIR(),
        'parameters': parameters,
        'argument': argument,
    }

    if crosscompiling and not no_sb2:
        cmd = "sb2 -e %s" % cmd

    if system(cmd):
        raise InstallError(_('Install failed.'))
    else:
        fixInfoDir()
Esempio n. 3
0
def configure(parameters=""):
    '''configure source with given parameters = "--with-nls --with-libusb --with-something-usefull"'''
    if can_access_file("configure"):
        gnuconfig_update()

        args = (
            "./configure \
                --prefix=/%s \
                --build=%s \
                --mandir=/%s \
                --infodir=/%s \
                --datadir=/%s \
                --sysconfdir=/%s \
                --localstatedir=/%s \
                %s"
            % (
                get.defaultprefixDIR(),
                get.HOST(),
                get.manDIR(),
                get.infoDIR(),
                get.dataDIR(),
                get.confDIR(),
                get.localstateDIR(),
                parameters,
            )
        )

        if system(args):
            raise ConfigureError(_("Configure failed."))
    else:
        raise ConfigureError(_("No configure script found."))
Esempio n. 4
0
def install(parameters="", argument="install"):
    """install source into install directory with given parameters"""
    if can_access_file("makefile") or can_access_file("Makefile") or can_access_file("GNUmakefile"):
        args = (
            "make prefix=%(prefix)s/%(defaultprefix)s \
                datadir=%(prefix)s/%(data)s \
                infodir=%(prefix)s/%(info)s \
                localstatedir=%(prefix)s/%(localstate)s \
                mandir=%(prefix)s/%(man)s \
                sysconfdir=%(prefix)s/%(conf)s \
                %(parameters)s \
                %(argument)s"
            % {
                "prefix": get.installDIR(),
                "defaultprefix": get.defaultprefixDIR(),
                "man": get.manDIR(),
                "info": get.infoDIR(),
                "localstate": get.localstateDIR(),
                "conf": get.confDIR(),
                "data": get.dataDIR(),
                "parameters": parameters,
                "argument": argument,
            }
        )

        if system(args):
            raise InstallError(_("Install failed."))
        else:
            fixInfoDir()
    else:
        raise InstallError(_("No Makefile found."))
Esempio n. 5
0
def install(parameters='', argument='install'):
    '''install source into install directory with given parameters'''
    if can_access_file('makefile') or can_access_file(
            'Makefile') or can_access_file('GNUmakefile'):
        args = 'make prefix=%(prefix)s/%(defaultprefix)s \
                datadir=%(prefix)s/%(data)s \
                infodir=%(prefix)s/%(info)s \
                localstatedir=%(prefix)s/%(localstate)s \
                mandir=%(prefix)s/%(man)s \
                sysconfdir=%(prefix)s/%(conf)s \
                %(parameters)s \
                %(argument)s' % {
            'prefix': get.installDIR(),
            'defaultprefix': get.defaultprefixDIR(),
            'man': get.manDIR(),
            'info': get.infoDIR(),
            'localstate': get.localstateDIR(),
            'conf': get.confDIR(),
            'data': get.dataDIR(),
            'parameters': parameters,
            'argument': argument
        }

        if system(args):
            raise InstallError(_('Install failed.'))
    else:
        raise InstallError(_('No Makefile found.'))

    fixInfoDir()
Esempio n. 6
0
def install(parameters = '', argument = 'install'):
    '''install source into install directory with given parameters'''
    if can_access_file('makefile') or can_access_file('Makefile') or can_access_file('GNUmakefile'):
        args = 'make prefix=%(prefix)s/%(defaultprefix)s \
                datadir=%(prefix)s/%(data)s \
                infodir=%(prefix)s/%(info)s \
                localstatedir=%(prefix)s/%(localstate)s \
                mandir=%(prefix)s/%(man)s \
                sysconfdir=%(prefix)s/%(conf)s \
                %(parameters)s \
                %(argument)s' % {'prefix': get.installDIR(),
                            'defaultprefix': get.defaultprefixDIR(),
                            'man': get.manDIR(),
                            'info': get.infoDIR(),
                            'localstate': get.localstateDIR(),
                            'conf': get.confDIR(),
                            'data': get.dataDIR(),
                            'parameters': parameters,
                            'argument':argument}

        if system(args):
            raise InstallError(_('Install failed.'))
        else:
            fixInfoDir()
    else:
        raise InstallError(_('No Makefile found.'))
Esempio n. 7
0
def setup():
    pisitools.dosed("config.h.in", "showaudio", "mplayer")
    autotools.configure("--sysconfdir=/%s/w3m \
                         --with-editor=/usr/bin/emacs \
                         --with-browser=/usr/bin/firefox \
                         --with-termlib=ncurses \
                         --enable-alarm \
                         --enable-ansi-color \
                         --enable-bgcolor \
                         --enable-color \
                         --enable-cookie \
                         --enable-dict \
                         --enable-digest-auth \
                         --enable-external-uri-loader \
                         --enable-gopher \
                         --enable-help-cgi \
                         --enable-history \
                         --enable-image \
                         --enable-ipv6 \
                         --disable-japanese \
                         --disable-kanjisymbols \
                         --enable-keymap=w3m \
                         --enable-menu \
                         --enable-mouse \
                         --enable-nntp \
                         --enable-sslverify \
                         --enable-w3mmailer \
                         --disable-xface \
                         --enable-m17n \
                         --enable-unicode \
                         --with-charset=UTF-8" % get.confDIR())
Esempio n. 8
0
def setup():
    shelltools.export("LDFLAGS", "-Wl,-z,defs")

    args = '../configure \
            --prefix=/%s \
            --build=%s \
            --mandir=/%s \
            --infodir=/%s \
            --datadir=/%s \
            --sysconfdir=/%s \
            --localstatedir=/%s \
            --libexecdir=/%s \
            ' % (get.defaultprefixDIR(), \
                 get.HOST(), get.manDIR(), \
                 get.infoDIR(), get.dataDIR(), \
                 get.confDIR(), get.localstateDIR(), get.libexecDIR())

    args += "--with-pic \
             --disable-static \
             --with-ipc=%(ipc_type)s \
             --program-suffix=-%(ipc_type)s"

    for ipc_type in ipc_types:
        shelltools.makedirs(ipc_type)

        shelltools.cd(ipc_type)
        shelltools.system(args % {'ipc_type':ipc_type})
        shelltools.cd('..')
Esempio n. 9
0
def configure(parameters = ''):
    '''configure source with given parameters = "--with-nls --with-libusb --with-something-usefull"'''

    if can_access_file('ltmain.sh'):
        libtoolize("--copy --force")

    if can_access_file('configure'):
        gnuconfig_update()

        args = './configure \
                --prefix=/%s \
                --build=%s \
                --mandir=/%s \
                --infodir=/%s \
                --datadir=/%s \
                --sysconfdir=/%s \
                --localstatedir=/%s \
                --libexecdir=/%s \
                %s' % (get.defaultprefixDIR(), \
                       get.HOST(), get.manDIR(), \
                       get.infoDIR(), get.dataDIR(), \
                       get.confDIR(), get.localstateDIR(), get.libexecDIR(), parameters)

        if system(args):
            raise ConfigureError(_('Configure failed.'))
    else:
        raise ConfigureError(_('No configure script found.'))
Esempio n. 10
0
def install(parameters = '', argument = 'install'):
    '''install source into install directory with given parameters'''
    # Set clang as compiler if supported
    if get.canClang():
		export ("CC", "clang")
		export ("CXX", "clang++")
		    
    args = 'make prefix=%(prefix)s/%(defaultprefix)s \
            datadir=%(prefix)s/%(data)s \
            infodir=%(prefix)s/%(info)s \
            localstatedir=%(prefix)s/%(localstate)s \
            mandir=%(prefix)s/%(man)s \
            sysconfdir=%(prefix)s/%(conf)s \
            %(parameters)s \
            %(argument)s' % {
                                'prefix': get.installDIR(),
                                'defaultprefix': get.defaultprefixDIR(),
                                'man': get.manDIR(),
                                'info': get.infoDIR(),
                                'localstate': get.localstateDIR(),
                                'conf': get.confDIR(),
                                'data': get.dataDIR(),
                                'parameters': parameters,
                                'argument':argument,
                            }

    if system(args):
        raise InstallError(_('Install failed.'))
    else:
        fixInfoDir()

    if get.buildTYPE() == "emul32":
        fixpc()
        if isDirectory("%s/emul32" % get.installDIR()): removeDir("/emul32")
Esempio n. 11
0
def configure(parameters = ''):
    '''configure source with given parameters = "--with-nls --with-libusb --with-something-usefull"'''
    # Set clang as compiler if supported
    if get.canClang():
		export ("CC", "clang")
		export ("CXX", "clang++")
		
    if can_access_file('configure'):
        gnuconfig_update()

        prefix = get.emul32prefixDIR() if get.buildTYPE() == "emul32" else get.defaultprefixDIR()
        args = './configure \
                --prefix=/%s \
                --build=%s \
                --mandir=/%s \
                --infodir=/%s \
                --datadir=/%s \
                --sysconfdir=/%s \
                --localstatedir=/%s \
                --libexecdir=/%s \
                %s' % (prefix, \
                       get.HOST(), get.manDIR(), \
                       get.infoDIR(), get.dataDIR(), \
                       get.confDIR(), get.localstateDIR(), get.libexecDIR(), parameters)

        if get.buildTYPE() == "emul32":
            args += " --libdir=/usr/lib32"

        if system(args):
            raise ConfigureError(_('Configure failed.'))
    else:
        raise ConfigureError(_('No configure script found.'))
Esempio n. 12
0
def install(parameters = '', argument = 'install', no_sb2=False):
    '''install source into install directory with given parameters'''
    cmd = 'make prefix=%(prefix)s/%(defaultprefix)s \
           datadir=%(prefix)s/%(data)s \
           infodir=%(prefix)s/%(info)s \
           localstatedir=%(prefix)s/%(localstate)s \
           mandir=%(prefix)s/%(man)s \
           sysconfdir=%(prefix)s/%(conf)s \
           %(parameters)s \
           %(argument)s' % {
                                'prefix': get.installDIR(),
                                'defaultprefix': get.defaultprefixDIR(),
                                'man': get.manDIR(),
                                'info': get.infoDIR(),
                                'localstate': get.localstateDIR(),
                                'conf': get.confDIR(),
                                'data': get.dataDIR(),
                                'parameters': parameters,
                                'argument':argument,
                           }

    if crosscompiling and not no_sb2:
        cmd = "sb2 -e %s" % cmd

    if system(cmd):
        raise InstallError(_('Install failed.'))
    else:
        fixInfoDir()
Esempio n. 13
0
def install():
    # autotools.rawInstall("DESTDIR=%s PREFIX=/%s" % (get.installDIR(), get.defaultprefixDIR()))
    autotools.make("pure_install DESTDIR=%s PREFIX=/%s" % (get.installDIR(), get.defaultprefixDIR()))
    # pisitools.move("%s/ocsinventory-agent" % get.binDIR(), "%s/ocsinventory-agent" % get.sbinDIR())
    pisitools.dodir("/var/log/ocsinventory-agent")
    pisitools.dodir("/var/lib/ocsinventory-agent")
    # pisitools.dodir("%s/logrotate.d" % get.confDIR())
    # pisitools.dodir("%s/cron.hourly" % get.confDIR())
    # pisitools.dodir("%s/ocsinventory/ocsinventory-agent" % get.confDIR())
    pisitools.insinto("%s/" % get.confDIR(), "etc/*")
Esempio n. 14
0
def setup():
    autotools.autoreconf("-fi")

    #as-needed fix from Gentoo
    pisitools.dosed("alpine/Makefile.in", "@LIBS@$", "@LIBS@ -lpam -lkrb5")

    autotools.configure("--disable-static \
                         --enable-from-encoding \
                         --without-tcl \
                         --with-ssl-dir=/usr/lib \
                         --with-ssl-certs-dir=/etc/ssl/certs \
                         --with-c-client-target=lfd \
                         --with-debug-files=2 \
                         --with-debug-file=.alpine.debug \
                         --with-simple-spellcheck=hunspell \
                         --with-interactive-spellcheck=hunspell \
                         --with-system-pinerc=/%s/alpine.conf \
                         --with-system-fixed-pinerc=/%s/alpine.conf.fixed" %
                        (get.confDIR(), get.confDIR()))
Esempio n. 15
0
def install():
    # autotools.rawInstall("DESTDIR=%s PREFIX=/%s" % (get.installDIR(), get.defaultprefixDIR()))
    autotools.make("pure_install DESTDIR=%s PREFIX=/%s" %
                   (get.installDIR(), get.defaultprefixDIR()))
    # pisitools.move("%s/ocsinventory-agent" % get.binDIR(), "%s/ocsinventory-agent" % get.sbinDIR())
    pisitools.dodir("/var/log/ocsinventory-agent")
    pisitools.dodir("/var/lib/ocsinventory-agent")
    # pisitools.dodir("%s/logrotate.d" % get.confDIR())
    # pisitools.dodir("%s/cron.hourly" % get.confDIR())
    # pisitools.dodir("%s/ocsinventory/ocsinventory-agent" % get.confDIR())
    pisitools.insinto("%s/" % get.confDIR(), "etc/*")
Esempio n. 16
0
def setup():
    autotools.configure("--disable-static \
                         --enable-from-encoding \
                         --without-tcl \
                         --with-ssl-dir=/usr/lib \
                         --with-ssl-certs-dir=/etc/ssl/certs \
                         --with-c-client-target=lfd \
                         --with-debug-files=2 \
                         --with-debug-file=.alpine.debug \
                         --with-system-pinerc=/%s/alpine.conf \
                         --with-system-fixed-pinerc=/%s/alpine.conf.fixed"% (get.confDIR(), get.confDIR()))
Esempio n. 17
0
def setup():
    autotools.autoreconf("-fi")

    # as-needed fix from Gentoo
    pisitools.dosed("alpine/Makefile.in", "@LIBS@$", "@LIBS@ -lpam")

    autotools.configure(
        "--disable-static \
                         --enable-from-encoding \
                         --without-tcl \
                         --with-ssl-dir=/usr/lib \
                         --with-ssl-certs-dir=/etc/ssl/certs \
                         --with-c-client-target=lfd \
                         --with-debug-files=2 \
                         --with-debug-file=.alpine.debug \
                         --with-simple-spellcheck=hunspell \
                         --with-interactive-spellcheck=hunspell \
                         --with-system-pinerc=/%s/alpine.conf \
                         --with-system-fixed-pinerc=/%s/alpine.conf.fixed"
        % (get.confDIR(), get.confDIR())
    )
Esempio n. 18
0
def install():
    shelltools.cd("scangearmp")
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())
    pisitools.insinto("/%s/udev/rules.d/" % get.confDIR(), "etc/*.rules")
    pisitools.dosym("/%s/bin/scangearmp" % get.defaultprefixDIR(), "/usr/lib/gimp/2.0/plug-ins/scangearmp")

    shelltools.cd("..")
    for model in model_numbers:
        pisitools.insinto("/%s/lib/bjlib" % get.defaultprefixDIR(), "%s/*.tbl" % model)
        pisitools.insinto("/%s/lib/bjlib" % get.defaultprefixDIR(), "%s/*.DAT" % model)
        pisitools.dolib("%s/libs_bin%s/*.so" % (model, arch_bit))
    pisitools.dolib("com/libs_bin%s/*.so" %  arch_bit)

    pisitools.dodoc("LICENSE*", "scangearmp/AUTHORS", "scangearmp/ChangeLog", "scangearmp/LICENSE", "scangearmp/NEWS", "scangearmp/COPYING")
Esempio n. 19
0
def install():
    # install server
    shelltools.cd("Apache")
    autotools.make("pure_install DESTDIR=%s PREFIX=/%s" %
                   (get.installDIR(), get.defaultprefixDIR()))
    shelltools.cd("..")
    pisitools.insinto("%s/ocsinventory-server/" % get.dataDIR(), "binutils/*")
    pisitools.remove("%s/ocsinventory-server/create-release-tarball.sh" %
                     get.dataDIR())
    # pisitools.remove("/usr/lib/perl5/vendor_perl/5.10.1/Apache/Ocsinventory/Server/Modperl1.pm")
    pisitools.removeDir(
        "/usr/lib/perl5/vendor_perl/5.10.1/x86_64-linux-thread-multi")
    pisitools.dodir("/var/log/ocsinventory-server")
    pisitools.dodir("%s/logrotate.d" % get.confDIR())
    pisitools.dosed("etc/logrotate.d/ocsinventory-server",
                    "PATH_TO_LOG_DIRECTORY", "/var/log/ocsinventory-server")
    pisitools.insinto("%s/logrotate.d" % get.confDIR(),
                      "etc/logrotate.d/ocsinventory-server")
    pisitools.insinto("%s/apache2/conf.d/" % get.confDIR(),
                      "etc/ocsinventory/ocsinventory-server.conf",
                      "ocsinventory-server.conf.default")
    pisitools.dosed("etc/ocsinventory/ocsinventory-server.conf",
                    "DATABASE_SERVER", "localhost")
    pisitools.dosed("etc/ocsinventory/ocsinventory-server.conf",
                    "DATABASE_PORT", "3306")
    pisitools.dosed("etc/ocsinventory/ocsinventory-server.conf", "VERSION_MP",
                    "2")
    pisitools.dosed("etc/ocsinventory/ocsinventory-server.conf",
                    "PATH_TO_LOG_DIRECTORY", "/var/log/ocsinventory-server")
    pisitools.insinto("%s/apache2/conf.d/" % get.confDIR(),
                      "etc/ocsinventory/ocsinventory-server.conf")

    # install reports
    shelltools.copytree(
        "%s/ocsreports" % get.curDIR(),
        "%s/%s/ocsinventory-reports" % (get.installDIR(), get.dataDIR()))
    shelltools.system(
        "/usr/bin/find %s/%s/ocsinventory-reports \( -name \*.php -o -name \*.css \) -exec chmod -x {} \;"
        % (get.installDIR(), get.dataDIR()))
    pisitools.dodir("%s/ocsinventory/ocsinventory-reports" % get.confDIR())
    pisitools.domove(
        "%s/ocsinventory-reports/dbconfig.inc.php" % get.dataDIR(),
        "%s/ocsinventory/ocsinventory-reports/" % get.confDIR())
    pisitools.dosym(
        "../../../%s/ocsinventory/ocsinventory-reports/dbconfig.inc.php" %
        get.confDIR(),
        "%s/ocsinventory-reports/dbconfig.inc.php" % get.dataDIR())
    pisitools.dodir("%s/ocsinventory-reports/download" % get.localstateDIR())
    pisitools.dodir("%s/ocsinventory-reports/ipd" % get.localstateDIR())
    pisitools.insinto("%s/ocsinventory-reports/" % get.dataDIR(),
                      "binutils/ipdiscover-util.pl")
Esempio n. 20
0
def install():
    pisitools.dosed("conf/config.pl", "\$Conf{CgiAdminUsers}.*= '';", "$Conf{CgiAdminUsers}     = 'admin';")
    shelltools.system("perl configure.pl \
               --batch \
               --backuppc-user=apache \
               --dest-dir %s \
               --config-dir /%s/BackupPC \
               --cgi-dir /%s/BackupPC/cgi-bin \
               --data-dir /%s/lib/BackupPC \
               --hostname localhost \
               --html-dir /%s/BackupPC/html \
               --html-dir-url /BackupPC \
               --install-dir /%s/BackupPC \
               --log-dir /%s/log/BackupPC"
              % (get.installDIR(), get.confDIR(), get.dataDIR(), get.localstateDIR(), get.dataDIR(), get.dataDIR(), get.localstateDIR()))
Esempio n. 21
0
def install():
    pisitools.dosed("conf/config.pl", "\$Conf{CgiAdminUsers}.*= '';",
                    "$Conf{CgiAdminUsers}     = 'admin';")
    shelltools.system(
        "perl configure.pl \
               --batch \
               --backuppc-user=apache \
               --dest-dir %s \
               --config-dir /%s/BackupPC \
               --cgi-dir /%s/BackupPC/cgi-bin \
               --data-dir /%s/lib/BackupPC \
               --hostname localhost \
               --html-dir /%s/BackupPC/html \
               --html-dir-url /BackupPC \
               --install-dir /%s/BackupPC \
               --log-dir /%s/log/BackupPC" %
        (get.installDIR(), get.confDIR(), get.dataDIR(), get.localstateDIR(),
         get.dataDIR(), get.dataDIR(), get.localstateDIR()))
Esempio n. 22
0
def configure(parameters='',
              configure_cmd='./configure',
              no_default_vars=False,
              no_sb2=False):
    '''configure source with given parameters = "--with-nls --with-libusb --with-something-usefull"'''

    if can_access_file(configure_cmd):
        gnuconfig_update()

        cmd = '%s \
               --prefix=/%s \
               --mandir=/%s \
               --infodir=/%s \
               --datadir=/%s \
               --sysconfdir=/%s \
               --localstatedir=/%s \
               --libexecdir=/%s \
               %s'                   % (configure_cmd,
                      get.defaultprefixDIR(), \
                      get.manDIR(), get.infoDIR(), get.dataDIR(), \
                      get.confDIR(), get.localstateDIR(), get.libexecDIR(), parameters)

        if crosscompiling:
            if no_sb2 and not no_default_vars:
                cmd += " --build=%s \
                         --host=%s" % (get.BUILD(), get.HOST())
            elif not no_sb2 and no_default_vars:
                cmd += "sb2 %s \
                          --build=%s \
                          --host=%s" % (cmd, get.BUILD(), get.HOST())
            elif not no_sb2 and not no_default_vars:
                cmd = "sb2 %s \
                         --build=%s \
                         --host=%s" % (cmd, get.HOST(), get.HOST())
        else:
            if not no_default_vars:
                cmd += " --build=%s" % get.BUILD()

        if system(cmd):
            raise ConfigureError(_('Configure failed.'))
    else:
        raise ConfigureError(_('No configure script found.'))
Esempio n. 23
0
def configure(parameters = '', configure_cmd='./configure', no_default_vars=False, no_sb2=False):
    '''configure source with given parameters = "--with-nls --with-libusb --with-something-usefull"'''

    if can_access_file(configure_cmd):
        gnuconfig_update()

        cmd = '%s \
               --prefix=/%s \
               --mandir=/%s \
               --infodir=/%s \
               --datadir=/%s \
               --sysconfdir=/%s \
               --localstatedir=/%s \
               --libexecdir=/%s \
               %s' % (configure_cmd,
                      get.defaultprefixDIR(), \
                      get.manDIR(), get.infoDIR(), get.dataDIR(), \
                      get.confDIR(), get.localstateDIR(), get.libexecDIR(), parameters)

        if crosscompiling:
            if no_sb2 and not no_default_vars:
                cmd += " --build=%s \
                         --host=%s" % (get.BUILD(), get.HOST())
            elif not no_sb2 and no_default_vars:
                cmd += "sb2 %s \
                          --build=%s \
                          --host=%s" % (cmd, get.BUILD(), get.HOST())
            elif not no_sb2 and not no_default_vars:
                cmd = "sb2 %s \
                         --build=%s \
                         --host=%s" % (cmd, get.HOST(), get.HOST())
        else:
            if not no_default_vars:
                cmd += " --build=%s" % get.BUILD()

        if system(cmd):
            raise ConfigureError(_('Configure failed.'))
    else:
        raise ConfigureError(_('No configure script found.'))
Esempio n. 24
0
def configure(parameters = ''):
    '''configure source with given parameters = "--with-nls --with-libusb --with-something-usefull"'''
    if can_access_file('configure'):
        gnuconfig_update()
        
        args = './configure \
                --prefix=/%s \
                --host=%s \
                --mandir=/%s \
                --infodir=/%s \
                --datadir=/%s \
                --sysconfdir=/%s \
                --localstatedir=/%s \
                %s' % (get.defaultprefixDIR(), \
                       get.HOST(), get.manDIR(), \
                       get.infoDIR(), get.dataDIR(), \
                       get.confDIR(), get.localstateDIR(), parameters)
    
        if system(args):
            raise ConfigureError('!!! Configure failed...\n')
    else:
        raise ConfigureError('!!! No configure script found...\n')
Esempio n. 25
0
def configure(parameters=''):
    '''configure source with given parameters = "--with-nls --with-libusb --with-something-usefull"'''
    if can_access_file('configure'):
        gnuconfig_update()

        args = './configure \
                --prefix=/%s \
                --host=%s \
                --mandir=/%s \
                --infodir=/%s \
                --datadir=/%s \
                --sysconfdir=/%s \
                --localstatedir=/%s \
                %s'                    % (get.defaultprefixDIR(), \
                       get.HOST(), get.manDIR(), \
                       get.infoDIR(), get.dataDIR(), \
                       get.confDIR(), get.localstateDIR(), parameters)

        if system(args):
            raise ConfigureError(_('Configure failed.'))
    else:
        raise ConfigureError(_('No configure script found.'))
Esempio n. 26
0
def build():
    pisitools.dosed("Makefile","/run/mdadm","/run/mdadm")
    # Not sure about MDASSEMBLE_AUTO=1. Need to investigate.
    autotools.make("SYSCONFDIR=/%s MDASSEMBLE_AUTO=1 mdassemble mdadm mdmon" % get.confDIR())
Esempio n. 27
0
def install():
    # Make some directories
    pisitools.dodir("/%s/zabbix/web" % get.confDIR())
    pisitools.dodir("/%s/zabbix" % get.dataDIR())
    pisitools.dodir("/%s/log/zabbix" % get.localstateDIR())
    pisitools.dodir("/%s/run/zabbix" % get.localstateDIR())

    # Copy web frontend
    pisitools.insinto("/%s/zabbix" % get.dataDIR(), "frontends/php/*")
    pisitools.remove("/%s/zabbix/include/.htaccess" % get.dataDIR())
    pisitools.remove("/%s/zabbix/include/classes/.htaccess" % get.dataDIR())
    pisitools.remove("/%s/zabbix/conf/zabbix.conf.php.example" % get.dataDIR())

    # Install files
    autotools.install()

    # Install binaries for all databases
    pisitools.remove("/%s/zabbix_server" % get.sbinDIR())
    pisitools.remove("/%s/zabbix_proxy" % get.sbinDIR())
    pisitools.insinto("/%s" % get.sbinDIR(),
                      "src/zabbix_server/zabbix_server_*")
    pisitools.insinto("/%s" % get.sbinDIR(), "src/zabbix_proxy/zabbix_proxy_*")

    # Change config file variables
    pisitools.dosed(
        "misc/conf/zabbix_agentd.conf", "# PidFile=.*",
        "PidFile=/%s/run/zabbix/zabbix_agentd.pid" % get.localstateDIR())
    pisitools.dosed(
        "misc/conf/zabbix_agentd.conf", "^LogFile=.*",
        "LogFile=/%s/log/zabbix/zabbix_agentd.log" % get.localstateDIR())

    pisitools.dosed("misc/conf/zabbix_server.conf", "# PidFile=.*",
                    "PidFile=/%s/run/zabbix/zabbix.pid" % get.localstateDIR())
    pisitools.dosed(
        "misc/conf/zabbix_server.conf", "^LogFile=.*",
        "LogFile=/%s/log/zabbix/zabbix_server.log" % get.localstateDIR())
    pisitools.dosed("misc/conf/zabbix_server.conf",
                    "# AlertScriptsPath=/home/zabbix/bin/",
                    "AlertScriptsPath=/%s/lib/zabbix/" % get.localstateDIR())
    pisitools.dosed("misc/conf/zabbix_server.conf", "^DBUser=root",
                    "DBUser=zabbix")
    pisitools.dosed(
        "misc/conf/zabbix_server.conf", "# DBSocket=/tmp/mysql.sock",
        "DBSocket=/%s/run/mysqld/mysqld.sock" % get.localstateDIR())

    pisitools.dosed("misc/conf/zabbix_proxy.conf", "# PidFile=.*",
                    "PidFile=/%s/run/zabbix/zabbix.pid" % get.localstateDIR())
    pisitools.dosed(
        "misc/conf/zabbix_proxy.conf", "^LogFile=.*",
        "LogFile=/%s/log/zabbix/zabbix_server.log" % get.localstateDIR())
    pisitools.dosed("misc/conf/zabbix_proxy.conf", "^DBUser=root",
                    "DBUser=zabbix")
    pisitools.dosed(
        "misc/conf/zabbix_proxy.conf", "# DBSocket=/tmp/mysql.sock",
        "DBSocket=/%s/run/mysqld/mysqld.sock" % get.localstateDIR())

    # Install config files
    pisitools.insinto("/%s/zabbix" % get.confDIR(),
                      "misc/conf/zabbix_agent.conf")
    pisitools.insinto("/%s/zabbix" % get.confDIR(),
                      "misc/conf/zabbix_agentd.conf")
    pisitools.insinto("/%s/zabbix" % get.confDIR(),
                      "misc/conf/zabbix_server.conf")
    pisitools.insinto("/%s/zabbix" % get.confDIR(),
                      "misc/conf/zabbix_proxy.conf")
    pisitools.insinto("/%s/zabbix/web" % get.confDIR(),
                      "frontends/php/conf/zabbix.conf.php.example",
                      destinationFile="zabbix.conf.php")

    # Install help files for databases
    pisitools.insinto("/%s/zabbix/mysql" % get.docDIR(),
                      "create/schema/mysql.sql")
    pisitools.insinto("/%s/zabbix/mysql" % get.docDIR(),
                      "create/data/data.sql")
    pisitools.insinto("/%s/zabbix/mysql" % get.docDIR(),
                      "create/data/images_mysql.sql")
    pisitools.insinto("/%s/zabbix/mysql/upgrades/1.6" % get.docDIR(),
                      "upgrades/dbpatches/1.6/mysql")
    pisitools.insinto("/%s/zabbix/mysql/upgrades/1.8" % get.docDIR(),
                      "upgrades/dbpatches/1.8/mysql")

    pisitools.insinto("/%s/zabbix/postgresql" % get.docDIR(),
                      "create/schema/postgresql.sql")
    pisitools.insinto("/%s/zabbix/postgresql" % get.docDIR(),
                      "create/data/data.sql")
    pisitools.insinto("/%s/zabbix/postgresql" % get.docDIR(),
                      "create/data/images_pgsql.sql")
    pisitools.insinto("/%s/zabbix/postgresql/upgrades/1.6" % get.docDIR(),
                      "upgrades/dbpatches/1.6/postgresql")
    pisitools.insinto("/%s/zabbix/postgresql/upgrades/1.8" % get.docDIR(),
                      "upgrades/dbpatches/1.8/postgresql")

    pisitools.insinto("/%s/zabbix/sqlite" % get.docDIR(),
                      "create/schema/sqlite.sql")
    pisitools.insinto("/%s/zabbix/sqlite" % get.docDIR(),
                      "create/data/data.sql")
    pisitools.insinto("/%s/zabbix/sqlite" % get.docDIR(),
                      "create/data/images_sqlite3.sql")

    # Install common files
    pisitools.dodoc("AUTHORS", "ChangeLog", "COPYING", "CREDITS", "README")
Esempio n. 28
0
def install():
    # Make some directories
    pisitools.dodir("/%s/zabbix/web" % get.confDIR())
    pisitools.dodir("/%s/zabbix" % get.dataDIR())
    pisitools.dodir("/%s/log/zabbix" % get.localstateDIR())
    pisitools.dodir("/%s/run/zabbix" % get.localstateDIR())

    # Copy web frontend
    pisitools.insinto("/%s/zabbix" % get.dataDIR(), "frontends/php/*")
    pisitools.remove("/%s/zabbix/include/.htaccess" % get.dataDIR())
    pisitools.remove("/%s/zabbix/include/classes/.htaccess" % get.dataDIR())
    pisitools.remove("/%s/zabbix/conf/zabbix.conf.php.example" % get.dataDIR())

    # Install files
    autotools.install()

    # Install binaries for all databases
    pisitools.remove("/%s/zabbix_server" % get.sbinDIR())
    pisitools.remove("/%s/zabbix_proxy" % get.sbinDIR())
    pisitools.insinto("/%s" % get.sbinDIR(), "src/zabbix_server/zabbix_server_*")
    pisitools.insinto("/%s" % get.sbinDIR(), "src/zabbix_proxy/zabbix_proxy_*")

    # Change config file variables
    pisitools.dosed(
        "misc/conf/zabbix_agentd.conf", "# PidFile=.*", "PidFile=/%s/run/zabbix/zabbix_agentd.pid" % get.localstateDIR()
    )
    pisitools.dosed(
        "misc/conf/zabbix_agentd.conf", "^LogFile=.*", "LogFile=/%s/log/zabbix/zabbix_agentd.log" % get.localstateDIR()
    )

    pisitools.dosed(
        "misc/conf/zabbix_server.conf", "# PidFile=.*", "PidFile=/%s/run/zabbix/zabbix.pid" % get.localstateDIR()
    )
    pisitools.dosed(
        "misc/conf/zabbix_server.conf", "^LogFile=.*", "LogFile=/%s/log/zabbix/zabbix_server.log" % get.localstateDIR()
    )
    pisitools.dosed(
        "misc/conf/zabbix_server.conf",
        "# AlertScriptsPath=/home/zabbix/bin/",
        "AlertScriptsPath=/%s/lib/zabbix/" % get.localstateDIR(),
    )
    pisitools.dosed("misc/conf/zabbix_server.conf", "^DBUser=root", "DBUser=zabbix")
    pisitools.dosed(
        "misc/conf/zabbix_server.conf",
        "# DBSocket=/tmp/mysql.sock",
        "DBSocket=/%s/run/mysqld/mysqld.sock" % get.localstateDIR(),
    )

    pisitools.dosed(
        "misc/conf/zabbix_proxy.conf", "# PidFile=.*", "PidFile=/%s/run/zabbix/zabbix.pid" % get.localstateDIR()
    )
    pisitools.dosed(
        "misc/conf/zabbix_proxy.conf", "^LogFile=.*", "LogFile=/%s/log/zabbix/zabbix_server.log" % get.localstateDIR()
    )
    pisitools.dosed("misc/conf/zabbix_proxy.conf", "^DBUser=root", "DBUser=zabbix")
    pisitools.dosed(
        "misc/conf/zabbix_proxy.conf",
        "# DBSocket=/tmp/mysql.sock",
        "DBSocket=/%s/run/mysqld/mysqld.sock" % get.localstateDIR(),
    )

    # Install config files
    pisitools.insinto("/%s/zabbix" % get.confDIR(), "misc/conf/zabbix_agent.conf")
    pisitools.insinto("/%s/zabbix" % get.confDIR(), "misc/conf/zabbix_agentd.conf")
    pisitools.insinto("/%s/zabbix" % get.confDIR(), "misc/conf/zabbix_server.conf")
    pisitools.insinto("/%s/zabbix" % get.confDIR(), "misc/conf/zabbix_proxy.conf")
    pisitools.insinto(
        "/%s/zabbix/web" % get.confDIR(),
        "frontends/php/conf/zabbix.conf.php.example",
        destinationFile="zabbix.conf.php",
    )

    # Install help files for databases
    pisitools.insinto("/%s/zabbix/mysql" % get.docDIR(), "create/schema/mysql.sql")
    pisitools.insinto("/%s/zabbix/mysql" % get.docDIR(), "create/data/data.sql")
    pisitools.insinto("/%s/zabbix/mysql" % get.docDIR(), "create/data/images_mysql.sql")
    pisitools.insinto("/%s/zabbix/mysql/upgrades/1.6" % get.docDIR(), "upgrades/dbpatches/1.6/mysql")
    pisitools.insinto("/%s/zabbix/mysql/upgrades/1.8" % get.docDIR(), "upgrades/dbpatches/1.8/mysql")

    pisitools.insinto("/%s/zabbix/postgresql" % get.docDIR(), "create/schema/postgresql.sql")
    pisitools.insinto("/%s/zabbix/postgresql" % get.docDIR(), "create/data/data.sql")
    pisitools.insinto("/%s/zabbix/postgresql" % get.docDIR(), "create/data/images_pgsql.sql")
    pisitools.insinto("/%s/zabbix/postgresql/upgrades/1.6" % get.docDIR(), "upgrades/dbpatches/1.6/postgresql")
    pisitools.insinto("/%s/zabbix/postgresql/upgrades/1.8" % get.docDIR(), "upgrades/dbpatches/1.8/postgresql")

    pisitools.insinto("/%s/zabbix/sqlite" % get.docDIR(), "create/schema/sqlite.sql")
    pisitools.insinto("/%s/zabbix/sqlite" % get.docDIR(), "create/data/data.sql")
    pisitools.insinto("/%s/zabbix/sqlite" % get.docDIR(), "create/data/images_sqlite3.sql")

    # Install common files
    pisitools.dodoc("AUTHORS", "ChangeLog", "COPYING", "CREDITS", "README")
Esempio n. 29
0
def build():
    # fix build with gcc-4.9.0
    pisitools.dosed("Makefile", "(Wall) -Werror", "\\1")
    # Not sure about MDASSEMBLE_AUTO=1. Need to investigate.
    autotools.make("SYSCONFDIR=/%s MDASSEMBLE_AUTO=1 mdassemble mdadm mdmon" % get.confDIR())
Esempio n. 30
0
def install():
    shelltools.export("LD_LIBRARY_PATH", "%s/%s/lib" % (get.installDIR(), get.defaultprefixDIR()))
    scons.install("install_prefix=/%s sysconfdir=/%s/aqsis install" % (get.defaultprefixDIR(), get.confDIR()), get.installDIR(), "destdir")

    pisitools.dosym("/usr/lib/aqsis/plugins/libjpg2tif.so", "/usr/lib/libjpg2tif.so.1")
    pisitools.dosym("/usr/lib/aqsis/plugins/libppm2tif.so", "/usr/lib/libppm2tif.so.1")

    pisitools.dodoc("AUTHORS", "COPYING", "README", "ReleaseNotes")
Esempio n. 31
0
def build():
    # Not sure about MDASSEMBLE_AUTO=1. Need to investigate.
    autotools.make("SYSCONFDIR=/%s MDASSEMBLE_AUTO=1 mdassemble mdadm mdmon" %
                   get.confDIR())
Esempio n. 32
0
def install():
    autotools.rawInstall("DESTDIR=%s sysconfdir=/%s mandir=/%s" % (get.installDIR(), get.confDIR(), get.manDIR()))

    pisitools.dodoc("COPYING", "NEWS")
Esempio n. 33
0
def build():
    # Not sure about MDASSEMBLE_AUTO=1. Need to investigate.
    autotools.make("SYSCONFDIR=/%s mdadm mdmon" % get.confDIR())
Esempio n. 34
0
# -*- coding: utf-8 -*-
#
# Copyright 2011 TUBITAK/BILGEM
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt

from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

mailrc = "/%s/mail.rc" % get.confDIR()
makeflags = """
PREFIX=/%s \
BINDIR=/bin \
MANDIR=/%s \
SYSCONFDIR=/%s \
MAILRC=%s \
MAILSPOOL=/%s/mail \
SENDMAIL=/%s/sendmail \
UCBINSTALL=install""" % (get.defaultprefixDIR(), get.manDIR(), get.confDIR(), mailrc, get.localstateDIR(), get.sbinDIR())

def setup():
    pisitools.dosed("mailx.1", "/etc/nail.rc", mailrc)

def build():
    autotools.make(makeflags + " CFLAGS=\"%s -D_GNU_SOURCE\"" % get.CFLAGS())

def install():
    autotools.rawInstall("DESTDIR=%s STRIP=\"/bin/true\" %s" % (get.installDIR(), makeflags))

    pisitools.dosym("mailx", "/bin/mail")
Esempio n. 35
0
def install():
    autotools.rawInstall("DESTDIR=%s sysconfdir=/%s mandir=/%s" %
                         (get.installDIR(), get.confDIR(), get.manDIR()))

    pisitools.dodoc("COPYING", "NEWS")
Esempio n. 36
0
def build():
    # fix build with gcc-4.9.0
    pisitools.dosed("Makefile", "(Wall) -Werror", "\\1")
    # Not sure about MDASSEMBLE_AUTO=1. Need to investigate.
    autotools.make("SYSCONFDIR=/%s MDASSEMBLE_AUTO=1 mdassemble mdadm mdmon" %
                   get.confDIR())