示例#1
0
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.'))
示例#2
0
def setup():
    shelltools.export("CLDFLAGS", get.LDFLAGS())
    shelltools.export("LIB_PTHREAD", "-lpthread")

    autotools.autoreconf("-fi")
    autotools.configure("--enable-lvm1_fallback \
                         --enable-fsadm \
                         --with-pool=internal \
                         --with-snapshots=internal \
                         --with-mirrors=internal \
                         --with-interface=ioctl \
                         --with-user= \
                         --with-group= \
                         --with-usrlibdir=/usr/lib \
                         --with-usrsbindir=%s \
                         --with-device-uid=0 \
                         --with-device-gid=6 \
                         --with-device-mode=0660 \
                         --enable-pkgconfig \
                         --enable-applib \
                         --enable-cmdlib \
                         --enable-dmeventd \
                         --enable-static_link=no \
                         --disable-readline \
                         --disable-realtime \
                         --disable-selinux" % get.sbinDIR())
示例#3
0
def setup():
    # Breaks linking when sandbox is disabled
    #shelltools.export("CLDFLAGS", get.LDFLAGS())

    shelltools.export("LIB_PTHREAD", "-lpthread")

    autotools.autoreconf("-fi")
    autotools.configure("--enable-lvm1_fallback \
                         --enable-fsadm \
                         --with-pool=internal \
                         --with-user= \
                         --with-group= \
                         --with-usrlibdir=/usr/lib \
                         --with-usrsbindir=%s \
                         --with-udevdir=/lib/udev/rules.d \
                         --with-device-uid=0 \
                         --with-device-gid=6 \
                         --with-device-mode=0660 \
                         --enable-pkgconfig \
                         --enable-applib \
                         --enable-cmdlib \
                         --enable-dmeventd \
                         --enable-udev_sync \
                         --with-snapshots=internal \
                         --with-mirrors=internal \
                         --with-interface=ioctl \
                         --enable-static_link=no \
                         --disable-readline \
                         --disable-realtime \
                         --disable-selinux" % get.sbinDIR())

    pisitools.dosed("make.tmpl","-lm","")
示例#4
0
def setup():
    # Breaks linking when sandbox is disabled
    #shelltools.export("CLDFLAGS", get.LDFLAGS())

    shelltools.export("LIB_PTHREAD", "-lpthread")

    autotools.autoreconf("-fi")
    autotools.configure("--enable-lvm1_fallback \
                         --enable-fsadm \
                         --with-pool=internal \
                         --with-user= \
                         --with-group= \
                         --with-usrlibdir=/usr/lib \
                         --with-usrsbindir=%s \
                         --with-udevdir=/lib/udev/rules.d \
                         --with-device-uid=0 \
                         --with-device-gid=6 \
                         --with-device-mode=0660 \
                         --enable-pkgconfig \
                         --enable-applib \
                         --enable-cmdlib \
                         --enable-dmeventd \
                         --enable-udev_sync \
                         --with-snapshots=internal \
                         --with-mirrors=internal \
                         --with-interface=ioctl \
                         --enable-static_link=no \
                         --disable-readline \
                         --disable-realtime \
                         --disable-selinux" % get.sbinDIR())

    pisitools.dosed("make.tmpl", "-lm", "")
示例#5
0
文件: actions.py 项目: suvari/core
def setup():
    shelltools.export("CONFIG_SHELL", "/bin/bash")
    autotools.configure("--with-usrlibdir=/usr/lib \
                         --with-usrsbindir=%s \
                         --with-confdir=/etc \
                         --with-udevdir=/lib/udev/rules.d \
                         --with-default-pid-dir=/run \
                         --with-default-run-dir=/run/lvm \
                         --with-default-locking-dir=/run/lock/lvm \
                         --with-device-uid=0 \
                         --with-device-gid=6 \
                         --with-device-mode=0660 \
                         --with-cache=internal \
                         --with-snapshots=internal \
                         --with-mirrors=internal \
                         --with-thin=internal \
                         --with-interface=ioctl \
                         --enable-udev_rules \
                         --enable-udev_sync \
                         --disable-selinux \
                         --enable-readline \
                         --enable-fsadm \
                         --enable-applib \
                         --enable-cmdlib \
                         --enable-pkgconfig \
                         --enable-dmeventd \
                         --enable-lvmetad \
                         --enable-lvmpolld" % get.sbinDIR())
示例#6
0
def build():
    MINOR = "7"
    REL = "6"

    args = 'REAL_DAEMON_DIR=%s \
            RPM_OPT_FLAGS="%s -fPIC -DPIC -D_REENTRANT -DHAVE_STRERROR" \
            LDFLAGS="%s -pie" \
            MAJOR=0 MINOR=%s REL=%s linux' % (get.sbinDIR(), get.CFLAGS(), get.LDFLAGS(), MINOR, REL)

    autotools.make('%s' % args)
示例#7
0
def build():
    MINOR = "7"
    REL = "6"

    args = 'REAL_DAEMON_DIR=%s \
            RPM_OPT_FLAGS="%s -fPIC -DPIC -D_REENTRANT -DHAVE_STRERROR" \
            LDFLAGS="%s -pie" \
            MAJOR=0 MINOR=%s REL=%s linux' % (get.sbinDIR(), get.CFLAGS(),
                                              get.LDFLAGS(), MINOR, REL)

    autotools.make('%s' % args)
示例#8
0
def build():
    MINOR = "7"
    REL = "6"

    shelltools.export("PARDUS_CFLAGS", "%s" % get.CFLAGS())

    args = 'REAL_DAEMON_DIR=%s \
            PARDUS_OPT="-fPIC -DPIC -D_REENTRANT -DHAVE_STRERROR -DHAVE_WEAKSYMS -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" \
            MAJOR=0 MINOR=%s REL=%s' % ( get.sbinDIR(), MINOR, REL )

    autotools.make("%s config-check" % args)
    autotools.make('%s LDFLAGS="-pie %s" linux' % (args, get.LDFLAGS()))
示例#9
0
def build():
    MINOR = "7"
    REL = "6"

    shelltools.export("PARDUS_CFLAGS", "%s" % get.CFLAGS())

    args = "REAL_DAEMON_DIR=%s \
            PARDUS_OPT=\"-DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len\" \
            MAJOR=0 MINOR=%s REL=%s" % ( get.sbinDIR(), MINOR, REL )
    
    autotools.make("%s config-check" % args)
    autotools.make("%s linux" % args)
示例#10
0
def build():
    MINOR = "7"
    REL = "6"

    shelltools.export("PARDUS_CFLAGS", "%s" % get.CFLAGS())

    args = "REAL_DAEMON_DIR=%s \
            PARDUS_OPT=\"-DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len\" \
            MAJOR=0 MINOR=%s REL=%s" % (get.sbinDIR(), MINOR, REL)

    autotools.make("%s config-check" % args)
    autotools.make("%s linux" % args)
示例#11
0
def build():
    MINOR = "7"
    REL = "6"

    shelltools.export("PARDUS_CFLAGS", "%s" % get.CFLAGS())

    args = 'REAL_DAEMON_DIR=%s \
            PARDUS_OPT="-fPIC -DPIC -D_REENTRANT -DHAVE_STRERROR -DHAVE_WEAKSYMS -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" \
            MAJOR=0 MINOR=%s REL=%s' % (get.sbinDIR(), MINOR, REL)

    autotools.make("%s config-check" % args)
    autotools.make('%s LDFLAGS="-pie %s" linux' % (args, get.LDFLAGS()))
示例#12
0
文件: actions.py 项目: marcin-/core
def setup():
    # Breaks linking when sandbox is disabled
    shelltools.export("CLDFLAGS", "%s -lpthread" % get.LDFLAGS())

    shelltools.export("LIB_PTHREAD", "-lpthread")
    pisitools.dosed("conf/example.conf.in", "use_lvmetad = 0",
                    "use_lvmetad = 1")

    #shelltools.system(""" sed -i -e "1iAR = $(tc-getAR)" -e "s:CC ?= @CC@:CC = $(tc-getCC):" make.tmpl.in || die """)
    shelltools.system(""" sed -i -e '/FLAG/s:-O2::' configure || die """)
    shelltools.system(""" sed -i -e '/FLAG/s:-O2::' configure.ac || die """)

    autotools.autoreconf("-fi")
    autotools.configure("--with-thin-check=    \
                         --with-thin-dump=     \
                         --with-thin-repair=   \
                         --with-thin-restore=  \
                         --with-cache-check=   \
                         --with-cache-dump=    \
                         --with-cache-repair=  \
                         --with-cache-restore= \
                         --enable-lvm1_fallback \
                         --with-default-pid-dir=/run \
                         --with-default-run-dir=/run/lvm \
                         --with-default-locking-dir=/run/lock/lvm \
                         --with-dmeventd-path=/sbin/dmeventd \
                         --enable-fsadm \
                         --with-pool=internal \
                         --with-user= \
                         --with-group= \
                         --with-usrlibdir=/usr/lib \
                         --with-usrsbindir=%s \
                         --with-udevdir=/lib/udev/rules.d \
                         --with-device-uid=0 \
                         --with-device-gid=6 \
                         --with-device-mode=0660 \
                         --enable-dmeventd \
                         --enable-udev_rules \
                         --enable-udev_sync \
                         --with-snapshots=internal \
                         --with-mirrors=internal \
                         --with-interface=ioctl \
                         --enable-static_link=no \
                         --disable-readline \
                         --disable-realtime \
                         --disable-selinux \
                         --with-confdir=/etc \
                         --enable-applib \
                         --enable-cmdlib \
                         --enable-pkgconfig " % get.sbinDIR())
示例#13
0
def build():
    MINOR = "7"
    REL = "6"

    shelltools.export("PARDUS_CFLAGS", "%(CFLAGS)s" % crosstools.environment)

    args = 'REAL_DAEMON_DIR=%s \
            PARDUS_OPT="-fPIC -DPIC -D_REENTRANT -DHAVE_STRERROR -DHAVE_WEAKSYMS -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" \
            MAJOR=0 MINOR=%s REL=%s' % (get.sbinDIR(), MINOR, REL)

    crosstools.environment["args"] = args
    crosstools.make('%(args)s config-check \
                     CC="%(CC)s" \
                     CXX="%(CXX)s" \
                     AR="%(AR)s" ' % crosstools.environment)
    crosstools.make('%(args)s LDFLAGS="-pie %(LDFLAGS)s" linux' %
                    crosstools.environment)
示例#14
0
文件: actions.py 项目: aligulle1/core
def setup():
    # Breaks linking when sandbox is disabled
    shelltools.export("CLDFLAGS", get.LDFLAGS())

    shelltools.export("LIB_PTHREAD", "-lpthread")
    pisitools.dosed("conf/example.conf.in", "use_lvmetad = 0", "use_lvmetad = 1")

    autotools.autoreconf("-fi")
    autotools.configure("--with-thin-check=    \
                         --with-thin-dump=     \
                         --with-thin-repair=   \
                         --with-thin-restore=  \
                         --with-cache-check=   \
                         --with-cache-dump=    \
                         --with-cache-repair=  \
                         --with-cache-restore= \
                         --enable-lvm1_fallback \
                         --with-default-pid-dir=/run \
                         --with-default-run-dir=/run/lvm \
                         --with-default-locking-dir=/run/lock/lvm \
                         --with-dmeventd-path=/sbin/dmeventd \
                         --enable-fsadm \
                         --with-pool=internal \
                         --with-user= \
                         --with-group= \
                         --with-usrlibdir=/usr/lib \
                         --with-usrsbindir=%s \
                         --with-udevdir=/lib/udev/rules.d \
                         --with-device-uid=0 \
                         --with-device-gid=6 \
                         --with-device-mode=0660 \
                         --enable-dmeventd \
                         --enable-udev_rules \
                         --enable-udev_sync \
                         --with-snapshots=internal \
                         --with-mirrors=internal \
                         --with-interface=ioctl \
                         --enable-static_link=no \
                         --disable-readline \
                         --disable-realtime \
                         --disable-selinux \
                         --with-confdir=/etc \
                         --enable-applib \
                         --enable-cmdlib \
                         --enable-pkgconfig " % get.sbinDIR())
示例#15
0
def build():
    MINOR = "7"
    REL = "6"

    shelltools.export("PARDUS_CFLAGS", "%(CFLAGS)s" % crosstools.environment)

    args = (
        'REAL_DAEMON_DIR=%s \
            PARDUS_OPT="-fPIC -DPIC -D_REENTRANT -DHAVE_STRERROR -DHAVE_WEAKSYMS -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" \
            MAJOR=0 MINOR=%s REL=%s'
        % (get.sbinDIR(), MINOR, REL)
    )

    crosstools.environment["args"] = args
    crosstools.make(
        '%(args)s config-check \
                     CC="%(CC)s" \
                     CXX="%(CXX)s" \
                     AR="%(AR)s" '
        % crosstools.environment
    )
    crosstools.make('%(args)s LDFLAGS="-pie %(LDFLAGS)s" linux' % crosstools.environment)
示例#16
0
def setup():
    # Breaks linking when sandbox is disabled
    shelltools.export("CLDFLAGS", get.LDFLAGS())

    shelltools.export("LIB_PTHREAD", "-lpthread")
    pisitools.dosed("conf/example.conf.in", "use_lvmetad = 0",
                    "use_lvmetad = 1")

    autotools.autoreconf("-fi")
    autotools.configure("--enable-lvm1_fallback \
                         --with-default-pid-dir=/run \
                         --with-default-run-dir=/run/lvm \
                         --with-default-locking-dir=/run/lock/lvm \
                         --with-dmeventd-path=/sbin/dmeventd \
                         --enable-fsadm \
                         --with-pool=internal \
                         --with-user= \
                         --with-group= \
                         --with-usrlibdir=/usr/lib \
                         --with-usrsbindir=%s \
                         --with-udevdir=/lib/udev/rules.d \
                         --with-device-uid=0 \
                         --with-device-gid=6 \
                         --with-device-mode=0660 \
                         --enable-dmeventd \
                         --enable-udev_rules \
                         --enable-udev_sync \
                         --with-snapshots=internal \
                         --with-mirrors=internal \
                         --with-interface=ioctl \
                         --enable-static_link=no \
                         --disable-readline \
                         --disable-realtime \
                         --disable-selinux \
                         --with-confdir=/etc \
                         --enable-applib \
                         --enable-cmdlib \
                         --enable-pkgconfig " % get.sbinDIR())
示例#17
0
def setup():
    autotools.autoreconf("-fi")
    autotools.configure("--enable-lvm1_fallback \
                         --enable-fsadm \
                         --with-pool=internal \
                         --with-snapshots=internal \
                         --with-mirrors=internal \
                         --with-interface=ioctl \
                         --with-user= \
                         --with-group= \
                         --with-usrlibdir=/usr/lib \
                         --with-usrsbindir=%s \
                         --with-device-uid=0 \
                         --with-device-gid=6 \
                         --with-device-mode=0660 \
                         --enable-pkgconfig \
                         --enable-applib \
                         --enable-cmdlib \
                         --enable-dmeventd \
                         --enable-static_link=no \
                         --disable-readline \
                         --disable-realtime \
                         --disable-selinux" % get.sbinDIR())
示例#18
0
from pisi.actionsapi import get

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():
示例#19
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)
示例#20
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")
示例#21
0
# 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")
    pisitools.dosym("mailx", "/bin/Mail")

    pisitools.dosym("mailx.1", "/%s/man1/mail.1" % get.manDIR())
    pisitools.dosym("mailx.1", "/%s/man1/Mail.1" % get.manDIR())
示例#22
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")