summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-backup/amanda/amanda-2.5.2_p1-r2.ebuild')
-rw-r--r--app-backup/amanda/amanda-2.5.2_p1-r2.ebuild98
1 files changed, 50 insertions, 48 deletions
diff --git a/app-backup/amanda/amanda-2.5.2_p1-r2.ebuild b/app-backup/amanda/amanda-2.5.2_p1-r2.ebuild
index 0abac1bc52c7..7c2e41ee380f 100644
--- a/app-backup/amanda/amanda-2.5.2_p1-r2.ebuild
+++ b/app-backup/amanda/amanda-2.5.2_p1-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-2.5.2_p1-r2.ebuild,v 1.2 2007/08/03 01:53:02 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-2.5.2_p1-r2.ebuild,v 1.3 2007/10/09 09:23:15 robbat2 Exp $
inherit eutils
@@ -142,7 +142,7 @@ src_compile() {
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
source "${TMPENVFILE}"
local myconf
- cd ${S}
+ cd "${S}"
einfo "Using '${AMANDA_DBMODE}' style database"
myconf="${myconf} --with-db=${AMANDA_DBMODE}"
@@ -232,11 +232,11 @@ src_install() {
source ${TMPENVFILE}
einfo "Doing stock install"
- make DESTDIR=${D} install || die
+ emake -j1 DESTDIR="${D}" install || die
# Prepare our custom files
einfo "Building custom configuration files"
- cp ${FILESDIR}/amanda-* ${MYFILESDIR}
+ cp "${FILESDIR}"/amanda-* "${MYFILESDIR}"
local i # our iterator
local sedexpr # var for sed expr
sedexpr=''
@@ -250,19 +250,21 @@ src_install() {
# now apply the sed expr
for i in "${FILESDIR}"/amanda-* ; do
local filename
- filename=`basename ${i}`
+ filename="`basename ${i}`"
#einfo "Applying compiled SED expression to ${filename}"
- sed -re "${sedexpr}" <${i} >"${MYFILESDIR}/${filename}"
+ sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}"/${filename}
done
# Build the envdir file
# Don't forget this..
einfo "Building environment file"
- echo "# These settings are what was present in the environment when this" >>${MYFILESDIR}/${ENVDFILE}
- echo "# Amanda was compiled. Changing anything below this comment will" >>${MYFILESDIR}/${ENVDFILE}
- echo "# have no effect on your application, but it merely exists to" >>${MYFILESDIR}/${ENVDFILE}
- echo "# preserve them for your next emerge of Amanda" >>${MYFILESDIR}/${ENVDFILE}
- cat ${TMPENVFILE} | sed "s,=\$,='',g" >>${MYFILESDIR}/${ENVDFILE}
+ local t
+ t="${MYFILESDIR}"/${ENVDFILE}
+ echo "# These settings are what was present in the environment when this" >>"${t}"
+ echo "# Amanda was compiled. Changing anything below this comment will" >>"${t}"
+ echo "# have no effect on your application, but it merely exists to" >>"${t}"
+ echo "# preserve them for your next emerge of Amanda" >>"${t}"
+ cat "${TMPENVFILE}" | sed "s,=\$,='',g" >>"${t}"
into /usr
@@ -275,35 +277,35 @@ src_install() {
dodoc AUTHORS C* INSTALL NEWS README
# Clean up some bits
dodoc /usr/share/amanda/*
- rm -rf ${D}/usr/share/amanda
- mkdir -p ${D}/${MYINSTTMPDIR} || die
- cp ${TMPENVFILE} "${D}/${TMPINSTENVFILE}" || die
+ rm -rf "${D}"/usr/share/amanda
+ mkdir -p "${D}"/${MYINSTTMPDIR} || die
+ cp "${TMPENVFILE}" "${D}"/${TMPINSTENVFILE} || die
# our inetd sample
einfo "Installing standard inetd sample"
- newdoc ${MYFILESDIR}/amanda-inetd.amanda.sample-2.5.1_p3-r1 amanda-inetd.amanda.sample
+ newdoc "${MYFILESDIR}"/amanda-inetd.amanda.sample-2.5.1_p3-r1 amanda-inetd.amanda.sample
# Stock extra docs
docinto docs
- dodoc ${S}/docs/*
+ dodoc "${S}"/docs/*
# Labels
einfo "Installing labels"
docinto labels
- dodoc ${S}/example/3hole.ps
- dodoc ${S}/example/8.5x11.ps
- dodoc ${S}/example/DIN-A4.ps
- dodoc ${S}/example/DLT.ps
- dodoc ${S}/example/EXB-8500.ps
- dodoc ${S}/example/HP-DAT.ps
+ dodoc "${S}"/example/3hole.ps
+ dodoc "${S}"/example/8.5x11.ps
+ dodoc "${S}"/example/DIN-A4.ps
+ dodoc "${S}"/example/DLT.ps
+ dodoc "${S}"/example/EXB-8500.ps
+ dodoc "${S}"/example/HP-DAT.ps
# Amanda example configs
einfo "Installing example configurations"
docinto example
- dodoc ${S}/example/*
+ dodoc "${S}"/example/*
docinto example1
- newdoc ${FILESDIR}/example_amanda.conf amanda.conf
- newdoc ${FILESDIR}/example_disklist-2.5.1_p3-r1 disklist
- newdoc ${FILESDIR}/example_global.conf global.conf
+ newdoc "${FILESDIR}"/example_amanda.conf amanda.conf
+ newdoc "${FILESDIR}"/example_disklist-2.5.1_p3-r1 disklist
+ newdoc "${FILESDIR}"/example_global.conf global.conf
docinto example2
- newdoc ${S}/example/amanda.conf amanda.conf
- newdoc ${S}/example/disklist disklist
+ newdoc "${S}"/example/amanda.conf amanda.conf
+ newdoc "${S}"/example/disklist disklist
# Compress it all
prepalldocs
@@ -313,21 +315,21 @@ src_install() {
insinto /etc/amanda
einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
- cat ${MYFILESDIR}/amanda-amandahosts-client-2.5.1_p3-r1 \
- >>${D}/etc/amanda/amandahosts
+ cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1 \
+ >>"${D}"/etc/amanda/amandahosts
use minimal \
- || cat ${MYFILESDIR}/amanda-amandahosts-server-2.5.1_p3-r1 \
- >>${D}/etc/amanda/amandahosts
+ || cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1 \
+ >>"${D}"/etc/amanda/amandahosts
- dosym /etc/amanda/amandahosts ${AMANDA_USER_HOMEDIR}/.amandahosts
- insinto ${AMANDA_USER_HOMEDIR}
+ dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}"/.amandahosts
+ insinto "${AMANDA_USER_HOMEDIR}"
einfo "Installing .profile for ${AMANDA_USER_NAME} user"
- newins ${MYFILESDIR}/amanda-profile .profile
+ newins "${MYFILESDIR}"/amanda-profile .profile
einfo "Installing Sample Daily Cron Job for Amanda"
CRONDIR=/etc/cron.daily/
exeinto ${CRONDIR}
- newexe ${MYFILESDIR}/amanda-cron amanda
+ newexe "${MYFILESDIR}"/amanda-cron amanda
# Not executable by default
fperms 644 ${CRONDIR}/amanda
@@ -348,37 +350,37 @@ src_install() {
done
einfo "Setting setuid permissions"
- amanda_permissions_fix ${D}
+ amanda_permissions_fix "${D}"
# DevFS
einfo "Installing DevFS config file"
insinto /etc/devfs.d
- newins ${MYFILESDIR}/amanda-devfs amanda
+ newins "${MYFILESDIR}"/amanda-devfs amanda
# Env.d
einfo "Installing environment config file"
- doenvd ${MYFILESDIR}/${ENVDFILE}
+ doenvd "${MYFILESDIR}"/${ENVDFILE}
# Installing Amanda Xinetd Services Definition
einfo "Installing xinetd service file"
insinto /etc/xinetd.d
- newins ${MYFILESDIR}/amanda-xinetd-2.5.1_p3-r1 amanda
+ newins "${MYFILESDIR}"/amanda-xinetd-2.5.1_p3-r1 amanda
}
pkg_postinst() {
- local aux="${ROOT}/${TMPINSTENVFILE}"
+ local aux="${ROOT}"/${TMPINSTENVFILE}
[ ! -f "${aux}" ] && die "Variable setting file (${aux}) should exist!"
source "${aux}"
rm "${aux}"
- rmdir ${ROOT}/${MYINSTTMPDIR} 2>/dev/null # ignore error
+ rmdir "${ROOT}"/${MYINSTTMPDIR} 2>/dev/null # ignore error
local i
for i in amandates dumpdates; do
einfo "Creating inital Amanda file (${i})"
- touch ${ROOT}/etc/${i}
- chown ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${ROOT}/etc/${i}
- chmod 600 ${ROOT}/etc/${i}
+ touch "${ROOT}"/etc/${i}
+ chown ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} "${ROOT}"/etc/${i}
+ chmod 600 "${ROOT}"/etc/${i}
done
# If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
@@ -397,7 +399,7 @@ pkg_postinst() {
fi
einfo "Checking setuid permissions"
- amanda_permissions_fix ${ROOT}
+ amanda_permissions_fix "${ROOT}"
elog "You should configure Amanda in /etc/amanda now."
elog
@@ -432,7 +434,7 @@ amanda_permissions_fix() {
for i in /usr/sbin/amcheck /usr/libexec/calcsize /usr/libexec/killpgrp \
/usr/libexec/rundump /usr/libexec/runtar /usr/libexec/dumper \
/usr/libexec/planner ; do
- chown root:${AMANDA_GROUP_NAME} ${root}/${i}
- chmod u=srwx,g=rx,o= ${root}/${i}
+ chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
+ chmod u=srwx,g=rx,o= "${root}"/${i}
done
}