예제 #1
0
파일: actions.py 프로젝트: DeepakBachu/2013
def setup():
    autotools.autoreconf("-vfi")
    autotools.configure("--disable-static \
                         --disable-scrollkeeper \
                         --enable-gtk-doc \
                         --with-gnome-distributor=\"Pardus\" \
                         --with-pnp-ids-path=%s/misc/pnp.ids" % get.dataDIR())
예제 #2
0
파일: autotools.py 프로젝트: zaxebo1/pisi-1
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()
예제 #3
0
파일: mesontools.py 프로젝트: marcin-/core
def configure(parameters='', build_dir='build'):
    """
    Configures the project into the build directory with the parameters using meson.

    Args:
        parameters (str): Extra parameters for the command. Default is empty string.
        build_dir (str): Build directory. Default is 'build'.

    Examples:
        >>> mesontools.configure()
        >>> mesontools.configure('extra parameters')
        >>> mesontools.configure('extra parameters', 'custom_build_dir')
    """
    default_parameters = ' '.join([
        '--prefix=/%s' % get.defaultprefixDIR(),
        '--bindir=/usr/bin',
        '--datadir=/%s' % get.dataDIR(),
        '--includedir=/usr/include',
        '--infodir=/%s' % get.infoDIR(),
        '--libdir=/%s' %
        ('usr/lib32' if get.buildTYPE() == 'emul32' else 'usr/lib'),
        '--libexecdir=/%s' % get.libexecDIR(),
        '--localedir=/usr/share/locale',
        '--localstatedir=/%s' % get.localstateDIR(),
        '--mandir=/%s' % get.manDIR(),
        '--sbindir=/%s' % get.sbinDIR(),
        '--sharedstatedir=com',
        '--sysconfdir=/etc',
        '--default-library=shared',
    ])
    if system('meson setup %s %s %s' %
              (default_parameters, parameters, build_dir)):
        raise ConfigureError(_('Configuration failed.'))
예제 #4
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()
예제 #5
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.'))
예제 #6
0
파일: autotools.py 프로젝트: zaxebo1/pisi
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")
예제 #7
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('..')
예제 #8
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."))
예제 #9
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."))
예제 #10
0
파일: autotools.py 프로젝트: zaxebo1/pisi
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.'))
예제 #11
0
파일: autotools.py 프로젝트: Tayyib/uludag
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.'))
예제 #12
0
def setup():
    autotools.autoreconf("-vfi")
    autotools.configure("--disable-static \
                         --disable-scrollkeeper \
                         --enable-gtk-doc \
                         --with-gnome-distributor=\"Pardus\" \
                         --with-pnp-ids-path=%s/misc/pnp.ids" % get.dataDIR())
예제 #13
0
파일: actions.py 프로젝트: mrust1/PisiLinux
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())
    autotools.rawInstall("-C easy-rsa/2.0 DESTDIR=%s/usr/share/%s/easy-rsa" % (get.installDIR(), get.srcNAME()))

    for val in ["auth-pam", "down-root"]:
        pisitools.dolib_so("plugin/%s/openvpn-%s.so" % (val, val), "/usr/lib/openvpn/plugin/lib/openvpn-%s.so" % val)

    for val in ["contrib", "sample-config-files", "sample-keys", "sample-scripts"]:
        pisitools.insinto("/%s/openvpn/%s" % (get.dataDIR(), val), "%s/*" % val)

    pisitools.dodir("/etc/openvpn")
    pisitools.dodir("/run/openvpn")
    pisitools.domove("/usr/share/openvpn/sample-config-files/server.conf", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample-config-files/client.conf", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample-config-files/firewall.sh", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample-config-files/xinetd-server-config", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample-config-files/xinetd-client-config", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample-config-files/loopback-server", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample-config-files/loopback-client", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample-config-files/openvpn-startup.sh", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample-config-files/openvpn-shutdown.sh", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample-keys/*.key", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample-keys/*.crt", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample-keys/*.pem", "/etc/openvpn")

     
    pisitools.dodoc("AUTHORS", "COPYING", "COPYRIGHT.GPL", "ChangeLog", "README")
예제 #14
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()
예제 #15
0
def install():
    pisitools.dobin("src/zynaddsubfx")
    pisitools.dobin("ExternalPrograms/Spliter/spliter")
    pisitools.dobin("ExternalPrograms/Controller/controller")

    pisitools.insinto("%s/%s" % (get.dataDIR(), get.srcNAME()), "banks")

    pisitools.dodoc("*.txt", "COPYING", "ChangeLog")
예제 #16
0
def install():
    pisitools.dobin("src/zynaddsubfx")
    pisitools.dobin("ExternalPrograms/Spliter/spliter")
    pisitools.dobin("ExternalPrograms/Controller/controller")

    pisitools.insinto("%s/%s" % (get.dataDIR(), get.srcNAME()), "banks")

    pisitools.dodoc("*.txt", "COPYING", "ChangeLog")
예제 #17
0
def setup():
    shelltools.makedirs("build")
    shelltools.cd("build")
    shelltools.system("../configure --mandir=/%s --datadir=/%s \
                       --prefix=/%s \
                       --target=avr \
                       --disable-werror \
                       --disable-nls" % (get.manDIR(), get.dataDIR(), get.defaultprefixDIR()))
예제 #18
0
def install():
    pisitools.dobin("ymuse")
    pisitools.insinto("/usr/share/applications", "resources/ymuse.desktop",
                      "ymuse.desktop")
    shelltools.copy("resources/icons",
                    "%s/%s/icons" % (get.installDIR(), get.dataDIR()))

    pisitools.dodoc("COPYING", "README.md")
예제 #19
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()))
예제 #20
0
def install():
    pisitools.dobin("ymuse")
    pisitools.insinto("/usr/share/applications", "resources/ymuse.desktop",
                      "ymuse.desktop")
    shelltools.copy("resources/icons",
                    "%s/%s/icons" % (get.installDIR(), get.dataDIR()))
    #	for i in shelltools.ls("resources/i18n/generated/*/LC_MESSAGES/ymuse.mo"):
    #		pisitools.domo(i)

    pisitools.dodoc("COPYING", "README.md")
예제 #21
0
def install():
    autotools.rawInstall(
        'DESTDIR=%s \
                          BINDIR=%s/usr/bin/ \
                          DATADIR=%s/%s/blobwars/ \
                          DOCDIR=%s/%s/%s/' %
        (get.installDIR(), get.installDIR(), get.installDIR(), get.dataDIR(),
         get.installDIR(), get.docDIR(), get.srcTAG()))
    pisitools.removeDir('/usr/share/icons/large')
    pisitools.removeDir('/usr/share/icons/mini')
예제 #22
0
def setup():
    autotools.autoreconf("-vfi")
    autotools.configure("--disable-static \
                         --disable-scrollkeeper \
                         --enable-gtk-doc \
                         --with-gnome-distributor=\"PisiLinux\" \
                         --with-pnp-ids-path=%s/misc/pnp.ids" % get.dataDIR())
    pisitools.dosed("libtool", "^(hardcode_libdir_flag_spec=).*", '\\1""')
    pisitools.dosed("libtool", "^(runpath_var=)LD_RUN_PATH", "\\1DIE_RPATH_DIE")
    pisitools.dosed("libtool"," -shared ", " -Wl,--as-needed -shared ")
예제 #23
0
def setup():
    autotools.autoreconf("-vfi")
    autotools.configure("--disable-static \
                         --disable-scrollkeeper \
                         --enable-gtk-doc \
                         --with-gnome-distributor=\"PisiLinux\" \
                         --with-pnp-ids-path=%s/misc/pnp.ids" % get.dataDIR())
    pisitools.dosed("libtool", "^(hardcode_libdir_flag_spec=).*", '\\1""')
    pisitools.dosed("libtool", "^(runpath_var=)LD_RUN_PATH",
                    "\\1DIE_RPATH_DIE")
    pisitools.dosed("libtool", " -shared ", " -Wl,--as-needed -shared ")
예제 #24
0
def setup():
    unset()

    shelltools.makedirs(_build_dir)
    shelltools.cd(_build_dir)
    shelltools.system("\
            ../configure \
            --mandir=/%s \
            --datadir=/%s \
            --prefix=%s \
            --target=avr \
            --disable-nls" % (get.manDIR(), get.dataDIR(), TOOLCHAIN_DIR))
예제 #25
0
def setup():
    unset()

    shelltools.makedirs(_build_dir)
    shelltools.cd(_build_dir)
    shelltools.system("\
            ../configure \
            --mandir=/%s \
            --datadir=/%s \
            --prefix=%s \
            --target=avr \
            --disable-nls" % (get.manDIR(), get.dataDIR(), TOOLCHAIN_DIR))
예제 #26
0
def install():
    autotools.rawInstall(
        'DESTDIR=%s \
                          BINDIR=%s/usr/bin/ \
                          DATADIR=%s/%s/blobwars/ \
                          DOCDIR=%s/%s/%s/' %
        (get.installDIR(), get.installDIR(), get.installDIR(), get.dataDIR(),
         get.installDIR(), get.docDIR(), get.srcTAG()))
    # if you want the map editor, comment out
    pisitools.insinto('/usr/bin/', 'mapeditor', '/usr/bin/blobwars-mapeditor')

    pisitools.removeDir('/usr/share/icons/large')
    pisitools.removeDir('/usr/share/icons/mini')
예제 #27
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())
    autotools.rawInstall("-C easy-rsa/2.0 DESTDIR=%s/usr/share/%s/easy-rsa" % (get.installDIR(), get.srcNAME()))

    for val in ["auth-pam", "down-root"]:
        pisitools.dolib_so("plugin/%s/openvpn-%s.so" % (val, val), "/usr/lib/openvpn/plugin/lib/openvpn-%s.so" % val)

    for val in ["contrib", "sample-config-files", "sample-keys", "sample-scripts"]:
        pisitools.insinto("/%s/openvpn/%s" % (get.dataDIR(), val), "%s/*" % val)

    pisitools.dodir("/etc/openvpn")
    pisitools.dodir("/run/openvpn")

    pisitools.dodoc("AUTHORS", "COPYING", "COPYRIGHT.GPL", "ChangeLog", "README")
예제 #28
0
def install():
    autotools.make(
        "DESTDIR=%s COMMAND_OPTS=\"\" INSTALL_OPTS=\"\" INIT_OPTS=\"\" CGIDIR=/%s/nagios/cgi-bin STRIP=/bin/true install install-commandmode install-config"
        % (get.installDIR(), get.dataDIR()))

    config_dirs = [
        "servers", "printers", "switches", "routers", "conf.d", "plugins.d"
    ]
    for d in config_dirs:
        pisitools.dodir("/etc/nagios/%s" % d)

    pisitools.dodir("/var/run/nagios")
    pisitools.dodir("/usr/lib/nagios/plugins")
    pisitools.dodir("/usr/lib/nagios/plugins/eventhandlers")
예제 #29
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())
    autotools.rawInstall("-C easy-rsa/2.0 DESTDIR=%s/usr/share/%s/easy-rsa" % (get.installDIR(), get.srcNAME()))

    for val in ["auth-pam", "down-root"]:
        pisitools.dolib_so("plugin/%s/openvpn-%s.so" % (val, val), "/usr/lib/openvpn/plugin/lib/openvpn-%s.so" % val)

    for val in ["contrib", "sample-config-files", "sample-keys", "sample-scripts"]:
        pisitools.insinto("/%s/openvpn/%s" % (get.dataDIR(), val), "%s/*" % val)

    pisitools.dodir("/etc/openvpn")
    pisitools.dodir("/var/run/openvpn")

    pisitools.dodoc("AUTHORS", "COPYING", "COPYRIGHT.GPL", "ChangeLog", "README")
예제 #30
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")
예제 #31
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()))
예제 #32
0
파일: actions.py 프로젝트: blue-devil/ugly
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    for val in [
            "contrib", "sample/sample-config-files", "sample/sample-keys",
            "sample/sample-scripts"
    ]:
        pisitools.insinto("/%s/openvpn/%s" % (get.dataDIR(), val),
                          "%s/*" % val)

    pisitools.dodir("/etc/openvpn")
    pisitools.dodir("/run/openvpn")
    pisitools.domove(
        "/usr/share/openvpn/sample/sample-config-files/server.conf",
        "/etc/openvpn")
    pisitools.domove(
        "/usr/share/openvpn/sample/sample-config-files/client.conf",
        "/etc/openvpn")
    pisitools.domove(
        "/usr/share/openvpn/sample/sample-config-files/firewall.sh",
        "/etc/openvpn")
    pisitools.domove(
        "/usr/share/openvpn/sample/sample-config-files/xinetd-server-config",
        "/etc/openvpn")
    pisitools.domove(
        "/usr/share/openvpn/sample/sample-config-files/xinetd-client-config",
        "/etc/openvpn")
    pisitools.domove(
        "/usr/share/openvpn/sample/sample-config-files/loopback-server",
        "/etc/openvpn")
    pisitools.domove(
        "/usr/share/openvpn/sample/sample-config-files/loopback-client",
        "/etc/openvpn")
    pisitools.domove(
        "/usr/share/openvpn/sample/sample-config-files/openvpn-startup.sh",
        "/etc/openvpn")
    pisitools.domove(
        "/usr/share/openvpn/sample/sample-config-files/openvpn-shutdown.sh",
        "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample/sample-keys/*.key",
                     "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample/sample-keys/*.crt",
                     "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample/sample-keys/*.pem",
                     "/etc/openvpn")

    pisitools.dodoc("AUTHORS", "ChangeLog", "Changes.rst", "COPYING",
                    "COPYRIGHT.GPL", "PORTS", "README*")
예제 #33
0
def setup():
    autotools.rawConfigure("--with-ssl \
                         --with-nsl \
                         --enable-LFS \
                         --sysconfdir=/etc/wget \
                         --enable-ipv6 \
                         --enable-nls \
                         --prefix=/%s \
                         --host=%s \
                         --mandir=/%s \
                         --infodir=/%s \
                         --datadir=/%s \
                         --localstatedir=/%s \
                        "                          % (get.defaultprefixDIR(), \
                         get.HOST(), get.manDIR(), \
                         get.infoDIR(), get.dataDIR(), \
                         get.localstateDIR()))
예제 #34
0
def setup():
    autotools.rawConfigure("--with-ssl \
                         --with-nsl \
                         --enable-LFS \
                         --sysconfdir=/etc/wget \
                         --enable-ipv6 \
                         --enable-nls \
                         --prefix=/%s \
                         --host=%s \
                         --mandir=/%s \
                         --infodir=/%s \
                         --datadir=/%s \
                         --localstatedir=/%s \
                        " % (get.defaultprefixDIR(), \
                         get.HOST(), get.manDIR(), \
                         get.infoDIR(), get.dataDIR(), \
                         get.localstateDIR()))
예제 #35
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.'))
예제 #36
0
def install():
    # qt
    qt5.install("-C qt INSTALL_ROOT=%s/usr" % get.installDIR())
    pisitools.insinto("%s/%s" % (get.docDIR(), get.srcNAME()), "qt/README.txt",
                      "README-QT")
    pisitools.insinto("%s/applications" % get.dataDIR(),
                      "qt/transmission-qt.desktop")

    # gtk
    autotools.rawInstall("-C gtk DESTDIR=%s" % get.installDIR())
    autotools.rawInstall("-C po DESTDIR=%s" % get.installDIR())

    # cli, web, deamon
    for _dir in ["cli", "web", "utils"]:
        autotools.rawInstall("-C %s DESTDIR=%s" % (_dir, get.installDIR()))

    # For daemon config files.
    pisitools.dodir("/etc/transmission-daemon")

    pisitools.dodoc("AUTHORS", "COPYING", "NEWS.md", "README.md")
예제 #37
0
def setup():
    fix_env()

    shelltools.makedirs(_build_dir)
    shelltools.cd(_build_dir)
    shelltools.system('\
            ../configure \
            --target=avr \
            --mandir=/%s \
            --datadir=/%s \
            --prefix=%s \
            --enable-languages="c,c++" \
            --disable-nls \
            --disable-libssp \
            --with-dwarf2 \
            --with-system-zlib \
            --enable-version-specific-runtime-libs \
            --with-pkgversion="Pardus Linux" \
            --with-bugurl=http://bugs.pardus.org.tr \
            ' % (get.manDIR(), get.dataDIR(), TOOLCHAIN_DIR))
예제 #38
0
def setup():
    fix_env()

    shelltools.makedirs(_build_dir)
    shelltools.cd(_build_dir)
    shelltools.system('\
            ../configure \
            --target=avr \
            --mandir=/%s \
            --datadir=/%s \
            --prefix=%s \
            --enable-languages="c,c++" \
            --disable-nls \
            --disable-libssp \
            --with-dwarf2 \
            --with-system-zlib \
            --enable-version-specific-runtime-libs \
            --with-pkgversion="Pardus Linux" \
            --with-bugurl=http://bugs.pardus.org.tr \
            ' % (get.manDIR(), get.dataDIR(), TOOLCHAIN_DIR))
예제 #39
0
파일: autotools.py 프로젝트: zaxebo1/pisi-1
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.'))
예제 #40
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.'))
예제 #41
0
파일: autotools.py 프로젝트: Tayyib/uludag
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')
예제 #42
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    for val in ["contrib", "sample/sample-config-files", "sample/sample-keys", "sample/sample-scripts"]:
        pisitools.insinto("/%s/openvpn/%s" % (get.dataDIR(), val), "%s/*" % val)

    pisitools.dodir("/etc/openvpn")
    pisitools.dodir("/run/openvpn")
    pisitools.domove("/usr/share/openvpn/sample/sample-config-files/server.conf", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample/sample-config-files/client.conf", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample/sample-config-files/firewall.sh", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample/sample-config-files/xinetd-server-config", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample/sample-config-files/xinetd-client-config", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample/sample-config-files/loopback-server", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample/sample-config-files/loopback-client", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample/sample-config-files/openvpn-startup.sh", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample/sample-config-files/openvpn-shutdown.sh", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample/sample-keys/*.key", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample/sample-keys/*.crt", "/etc/openvpn")
    pisitools.domove("/usr/share/openvpn/sample/sample-keys/*.pem", "/etc/openvpn")


    pisitools.dodoc("AUTHORS", "COPYING", "COPYRIGHT.GPL", "ChangeLog", "README")
예제 #43
0
WorkDir = "tzdata"
tzcode  = "tzcode2010l"
tzdata  = "tzdata2010l"

configTemplate = """
objpfx = %(pwd)s/obj/
sbindir = %(sbindir)s
datadir = %(datadir)s
install_root = %(buildroot)s
sysdep-CFLAGS = %(cflags)s
"""

configVars = {"pwd": "%s/%s" % (get.workDIR(), WorkDir),
              "sbindir": "/%s" % get.sbinDIR(),
              "datadir": "/%s" % get.dataDIR(),
              "buildroot": get.installDIR(),
              "cflags": get.CFLAGS()
}


def disableLocale():
    for i in ["LANG", "LANGUAGE", "LC_ALL"]:
        shelltools.export(i, "POSIX")

def setup():
    shelltools.sym("Makeconfig.in", "Makeconfig")
    shelltools.echo("config.mk", configTemplate % configVars)

def build():
    disableLocale()
예제 #44
0
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2010-2011 TUBITAK/UEKAE
# 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 shelltools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

bzinstallprefix = "/%s" % get.dataDIR()
bzdatadir = "/%s/lib/bugzilla" % get.localstateDIR()


def setup():
    # Do some cleanup about executable bits, .CVS directories, etc.
    shelltools.system("./cleanup")

    # Remove bundled libs
    shelltools.unlink("lib/CGI*")

    # Setup cron scripts
    pisitools.dosed("cron.daily", "%%bzinstallprefix%%", bzinstallprefix)
    pisitools.dosed("cron.whine", "%%bzinstallprefix%%", bzinstallprefix)

    # Fix paths
    pisitools.dosed("contrib/*.py", "/usr/local/bin/python", "/usr/bin/python")
    pisitools.dosed("contrib/*.rb", "/usr/local/bin/ruby", "/usr/bin/ruby")
    pisitools.dosed("contrib/*.pl", "/usr/lib/sendmail", "/usr/sbin/sendmail")
    pisitools.dosed("contrib/*.pl", "/usr/local/bin/perl", "/usr/bin/perl")
예제 #45
0
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2006-2008 TUBITAK/UEKAE
# 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

params = {"datadir": get.dataDIR(), \
          "docdir": get.docDIR(), \
          "srctag": get.srcTAG(), \
          "installdir": get.installDIR()}

def build():
    autotools.make('DATADIR=/%(datadir)s/blobwars/ DOCDIR=/%(docdir)s/%(srctag)s/' % params)

def install():
    autotools.rawInstall('DESTDIR=%(installdir)s \
                          BINDIR=%(installdir)s/usr/bin/ \
                          DATADIR=%(installdir)s/%(datadir)s/blobwars/ \
                          DOCDIR=%(installdir)s/%(docdir)s/%(srctag)s/' % params)
예제 #46
0
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# 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 shelltools
from pisi.actionsapi import autotools
from pisi.actionsapi import get
from pisi.actionsapi import pisitools

dataDir = "%s/%s/" % (get.dataDIR(), get.srcNAME())


def setup():
    MocFilesToRemove = shelltools.ls("moc_*")
    for i in MocFilesToRemove:
        shelltools.unlink(i)

    shelltools.system("qmake-qt4 QMAKE_CXXFLAGS_RELEASE='%s'" % get.CXXFLAGS())


def build():
    autotools.make("-j1")


def install():
    pisitools.dodir(dataDir)
    pisitools.dobin("clustalx")

    for i in ["colprot.xml", "coldna.xml", "colprint.xml", "clustalx.hlp"]:
예제 #47
0
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2006-2008 TUBITAK/UEKAE
# 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

WorkDir = "blobwars-1.09b2"

params = {"datadir": get.dataDIR(), \
          "docdir": get.docDIR(), \
          "srctag": get.srcTAG(), \
          "installdir": get.installDIR()}

def build():
    autotools.make('DATADIR=/%(datadir)s/blobwars/ DOCDIR=/%(docdir)s/%(srctag)s/' % params)

def install():
    autotools.rawInstall('DESTDIR=%(installdir)s \
                          BINDIR=%(installdir)s/usr/bin/ \
                          DATADIR=%(installdir)s/%(datadir)s/blobwars/ \
                          DOCDIR=%(installdir)s/%(docdir)s/%(srctag)s/' % params)

    for d in ["large", "mini"]:
        pisitools.removeDir('/usr/share/icons/%s' % d)

예제 #48
0
파일: actions.py 프로젝트: DeepakBachu/2013
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyleft 2012 Pardus ANKA Community
# Copyright 2005-2011 TUBITAK/UEAKE
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/copyleft/gpl.txt.

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

examples = "%s/%s/examples" % (get.docDIR(), get.srcNAME())
plugins = "%s/%s/plugins" % (get.dataDIR(), get.srcNAME())

def install():
    pisitools.insinto("/usr/include", "CImg.h")

    pisitools.insinto(examples, "examples/*")
    pisitools.insinto(plugins, "plugins/*")
    pisitools.dohtml("html/*")
    pisitools.dodoc("*.txt")
예제 #49
0
def install():
    autotools.rawInstall('DESTDIR=%s \
                          BINDIR=%s/usr/bin/ \
                          DATADIR=%s/%s/blobwars/ \
                          DOCDIR=%s/%s/%s/' % (get.installDIR(), get.installDIR(), get.installDIR(), get.dataDIR(), get.installDIR(), get.docDIR(), get.srcTAG()))
    pisitools.removeDir('/usr/share/icons/large')
    pisitools.removeDir('/usr/share/icons/mini')
예제 #50
0
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt

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

params = {"CXX": get.CXX(), \
          "datadir": get.dataDIR(), \
          "installdir": get.installDIR(), \
          "htmldir": "%s/%s/html" % (get.docDIR(),get.srcNAME())}

def build():
    autotools.make("CXX=%(CXX)s \
                    DATADIR=/%(datadir)s/blobAndConquer/ \
                    DOCDIR=/%(htmldir)s/" % params)

def install():
    autotools.rawInstall('DESTDIR=%(installdir)s \
                          BINDIR=%(installdir)s/usr/bin/ \
                          DATADIR=%(installdir)s/%(datadir)s/blobAndConquer/ \
                          DOCDIR=%(installdir)s/%(htmldir)s/' % params)

    pisitools.insinto("/usr/share/pixmaps", "icons/blobAndConquer.png")
예제 #51
0
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2010 TUBITAK/UEKAE
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/copyleft/gpl.txt.

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

examples = "%s/%s/examples" % (get.docDIR(), get.srcNAME())
plugins = "%s/%s/plugins" % (get.dataDIR(), get.srcNAME())


def install():
    pisitools.insinto("/usr/include", "CImg.h")

    pisitools.insinto(examples, "examples/*")
    pisitools.insinto(plugins, "plugins/*")
    pisitools.dohtml("html/*")
    pisitools.dodoc("*.txt")
예제 #52
0
WorkDir = "tzdata"
tzcode = "tzcode2010l"
tzdata = "tzdata2010l"

configTemplate = """
objpfx = %(pwd)s/obj/
sbindir = %(sbindir)s
datadir = %(datadir)s
install_root = %(buildroot)s
sysdep-CFLAGS = %(cflags)s
"""

configVars = {
    "pwd": "%s/%s" % (get.workDIR(), WorkDir),
    "sbindir": "/%s" % get.sbinDIR(),
    "datadir": "/%s" % get.dataDIR(),
    "buildroot": get.installDIR(),
    "cflags": get.CFLAGS()
}


def disableLocale():
    for i in ["LANG", "LANGUAGE", "LC_ALL"]:
        shelltools.export(i, "POSIX")


def setup():
    shelltools.sym("Makeconfig.in", "Makeconfig")
    shelltools.echo("config.mk", configTemplate % configVars)

예제 #53
0
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# 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

params = {"CXX": get.CXX(), \
          "datadir": get.dataDIR(), \
          "installdir": get.installDIR(), \
          "htmldir": "%s/%s/html" % (get.docDIR(),get.srcNAME())}


def build():
    autotools.make("CXX=%(CXX)s \
                    DATADIR=/%(datadir)s/blobAndConquer/ \
                    DOCDIR=/%(htmldir)s/" % params)


def install():
    autotools.rawInstall('DESTDIR=%(installdir)s \
                          BINDIR=%(installdir)s/usr/bin/ \
                          DATADIR=%(installdir)s/%(datadir)s/blobAndConquer/ \
                          DOCDIR=%(installdir)s/%(htmldir)s/' % params)

    pisitools.insinto("/usr/share/pixmaps", "icons/blobAndConquer.png")
예제 #54
0
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2010 TUBITAK/UEKAE
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/copyleft/gpl.txt.

from pisi.actionsapi import pythonmodules
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import get

WorkDir = "%s" % get.srcNAME()
installdir = get.installDIR()
sharedir = "/%s" % get.dataDIR()

shelltools.export("HOME", get.workDIR())
shelltools.export("CC", get.CC())
shelltools.export("CXX", get.CXX())
shelltools.export("OVERRIDE_CFLAGS", "%s %s" % (get.CFLAGS(), get.LDFLAGS()))

shelltools.export("XDG_DATA_DIRS", "%s/%s" % (installdir, sharedir))
# In order to avoid sandbox violations.
shelltools.export("XDG_UTILS_INSTALL_MODE", "system")
# shelltools.export("XDG_UTILS_INSTALL_MODE", "user")


def setup():
    # We have these fonts in liberation-fonts package
    shelltools.unlinkDir("resources/fonts/liberation/")
예제 #55
0
def build():
    autotools.make('DATADIR=/%s/blobwars/ DOCDIR=/%s/%s/' % (get.dataDIR(), get.docDIR(), get.srcTAG()))
예제 #56
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")