Portage is a package management system used by Gentoo Linux
# ChangeLog for app-backup/afbackup-client
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/app-backup/afbackup-client/ChangeLog,v 1.3 2007/02/21 20:06:27 peper Exp $
21 Feb 2007; Piotr JaroszyĆski
Transition to Manifest2.
24 Jan 2007; Marius Mauch
afbackup-client-3.3.8.1.ebuild:
Replacing einfo with elog
*afbackup-client-3.3.8.1 (10 May 2006)
10 May 2006; Lisa Seelye
+afbackup-client-3.3.8.1.ebuild:
New Package submitted by Kevin Mescher kmescher@vt.edu. This closes bug 33865
DIST afbackup-3.3.8.1.tar.gz 970885 RMD160 ac3b17f97ddd5b0c020eddf48c0aff8b98e155a6 SHA1 4023b6c7e153e34d06bda546545a14b7581ac11d SHA256 810f5dab07d07767d7286b907e8611a585a002ea7c8285298a548a7cc3a14f1f
EBUILD afbackup-client-3.3.8.1.ebuild 3171 RMD160 73b5be232711457c212559bb42ce778855d2048a SHA1 936b708dc69534dd77727d76f0cf6f5ff5b6f5cc SHA256 30aa0879731755cc3954422c23e5ead14a27b979e72b796a9f3ef2a8f4d7eba1
MISC ChangeLog 643 RMD160 4324c0fd29e63a81d861362f23b515911c4b81f9 SHA1 03188de795dad29ad1f5e39bcaef71d92ba74407 SHA256 1693cffadfcfbc5d5ed1c94f379d389df336292cd32c8a87aba353b26620d2ed
MISC metadata.xml 229 RMD160 361faad2aa64dc56553b74541a2b31f2ca2cce87 SHA1 0749e155f785cbd2eedd01806ca945627353d811 SHA256 dd8168978da302bbe4ca583614aa9721a9bedf46c72e6259c73a47decae7dae9
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-backup/afbackup-client/afbackup-client-3.3.8.1.ebuild,v 1.2 2007/01/24 04:03:06 genone Exp $
inherit eutils
# is this the server ebuild, otherwise client
if [ "${PN/afbackup-/}" = "server" ];then
MY_PN=${PN/-server/}
MY_MODE=server
else
MY_PN=${PN/-client/}
MY_MODE=client
fi
MY_P=${MY_PN}-${PV}
DESCRIPTION="AFBackup is a client/server backup tool"
HOMEPAGE="http://afbackup.sourceforge.net/"
SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="zlib"
DEPEND="zlib? ( sys-libs/zlib )"
RDEPEND="zlib? ( sys-libs/zlib )"
S=${WORKDIR}/${MY_P}
src_unpack() {
unpack ${A}
cd ${S}
sed -i -e 's:subdir="/backup":subdir="/afbackup":' configure
# Setting up authentication key
einfo "Searching for your afbackup.key..."
if [ -f /etc/afbackup/afbackup.key ]; then
AFBACKUPKEY=`echo /etc/afbackup/afbackup.key`
einfo "...found."
fi
# if none, generate a random key
if [ "x${AFBACKUPKEY}" = "x" ]; then
ewarn "AFBACKUPKEY environment variable not set, generating new key..."
AFBACKUPKEY=`head -c4 /dev/urandom | od -N4 -tu4 | sed -ne '1s/.* //p'`
fi
einfo "Using ${AFBACKUPKEY} as your backup key."
sed -i -e "s:k=\" \":k=\"${AFBACKUPKEY}\":" ask_for_key
echo ${AFBACKUPKEY} > ${S}/afbackup.key
}
src_compile() {
local myconf=""
use zlib && myconf="${myconf} --with-zlib"
./configure \
--host=${CHOST} \
--prefix=/opt \
--with-serverconfdir=/etc/afbackup \
--with-serverconf=server.conf \
--with-servermandir=/usr/share/man \
--with-clientconfdir=/etc/afbackup \
--with-clientconf=client.conf \
--with-clientmandir=/usr/share/man \
--mandir=/usr/share/man \
${myconf} || die "./configure failed"
einfo "Building: afbackup-${MY_MODE}"
emake ${MY_MODE} || die "emake failed"
}
src_install() {
local myconf=""
use zlib && myconf="${myconf} --with-zlib"
einfo "Reconfiguring ${MY_MODE} installation path..."
./configure \
--host=${CHOST} \
--prefix=${D}/opt \
--with-serverconfdir=${D}/etc/afbackup \
--with-serverconf=server.conf \
--with-servermandir=${D}/usr/share/man \
--with-clientconfdir=${D}/etc/afbackup \
--with-clientconf=client.conf \
--with-clientmandir=${D}/usr/share/man \
--mandir=${D}/usr/share/man \
${myconf} || die "./configure failed"
einfo "Installing: afbackup-${MY_MODE}"
make DESTDIR=${D} install.${MY_MODE} || die
# fix path in config files
einfo "Fixing paths in ${MY_MODE}.conf"
if [ "x${MY_MODE}" = "xserver" ]; then
sed -i -e "s:${D}::g" ${D}/etc/afbackup/server.conf
fi
if [ "x${MY_MODE}" = "xclient" ]; then
sed -i -e "s:${D}::g" ${D}/etc/afbackup/client.conf
fi
# if new, install key and set permissions
if [ ! -f /etc/afbackup/afbackup.key ]; then
einfo "Installing backup key..."
insinto /etc/afbackup
doins afbackup.key
einfo "Restricting permissions on keyfile..."
fperms 600 /etc/afbackup/afbackup.key
fi
}
pkg_postinst() {
elog "The key of afbackup server and client have to match."
elog "Be sure to use the same environment variable or keyfile."
}