install.sh
changeset 32 ceb700bc4a80
parent 31 b7a7e566833c
child 37 89f952b0f366
equal deleted inserted replaced
31:b7a7e566833c 32:ceb700bc4a80
     7 LANG=C
     7 LANG=C
     8 PATH=/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
     8 PATH=/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
     9 PREFIX=/usr/local
     9 PREFIX=/usr/local
    10 PF_CONFDIR=$(postconf -h config_directory)
    10 PF_CONFDIR=$(postconf -h config_directory)
    11 PF_GID=$(id -g $(postconf -h mail_owner))
    11 PF_GID=$(id -g $(postconf -h mail_owner))
       
    12 LOCALE_DIR=${PREFIX}/share/locale
    12 DOC_DIR=${PREFIX}/share/doc/vmm
    13 DOC_DIR=${PREFIX}/share/doc/vmm
    13 MAN1DIR=${PREFIX}/share/man/man1
    14 MAN1DIR=${PREFIX}/share/man/man1
    14 MAN5DIR=${PREFIX}/share/man/man5
    15 MAN5DIR=${PREFIX}/share/man/man5
    15 DOCS="ChangeLog COPYING INSTALL README"
    16 DOCS="ChangeLog COPYING INSTALL README"
    16 
    17 
    35 
    36 
    36 install -b -m 0600 ${INSTALL_OPTS} vmm.cfg ${PREFIX}/etc/
    37 install -b -m 0600 ${INSTALL_OPTS} vmm.cfg ${PREFIX}/etc/
    37 install ${INSTALL_OPTS_CF} pgsql-*.cf ${PF_CONFDIR}/
    38 install ${INSTALL_OPTS_CF} pgsql-*.cf ${PF_CONFDIR}/
    38 install -m 0700 ${INSTALL_OPTS} vmm ${PREFIX}/sbin
    39 install -m 0700 ${INSTALL_OPTS} vmm ${PREFIX}/sbin
    39 
    40 
       
    41 [ -d ${LOCALE_DIR} ] || mkdir -m 0755 -p ${LOCALE_DIR}
       
    42 cd po
       
    43 for po in $(ls -1 *.po); do
       
    44     lang=$(basename ${po} .po)
       
    45     ddir=${LOCALE_DIR}/${lang}/LC_MESSAGES
       
    46     [ -d ${ddir}  ] || mkdir -m 0755 -p ${ddir}
       
    47     msgfmt -o ${LOCALE_DIR}/${lang}/LC_MESSAGES/vmm.mo ${po}
       
    48 done
       
    49 cd -
       
    50 
    40 [ -d ${MAN1DIR} ] || mkdir -m 0755 -p ${MAN1DIR}
    51 [ -d ${MAN1DIR} ] || mkdir -m 0755 -p ${MAN1DIR}
    41 install -m 0644 ${INSTALL_OPTS} vmm.1 ${MAN1DIR}
    52 install -m 0644 ${INSTALL_OPTS} vmm.1 ${MAN1DIR}
    42 
    53 
    43 [ -d ${MAN5DIR} ] || mkdir -m 0755 -p ${MAN5DIR}
    54 [ -d ${MAN5DIR} ] || mkdir -m 0755 -p ${MAN5DIR}
    44 install -m 0644 ${INSTALL_OPTS} vmm.cfg.5 ${MAN5DIR}
    55 install -m 0644 ${INSTALL_OPTS} vmm.cfg.5 ${MAN5DIR}