On Thu, Apr 28, 2005 at 12:34:50PM +0200, Henrik Brix Andersen wrote:
> On Thu, 2005-04-28 at 01:51 -0700, Robin H. Johnson wrote:
> > +1 here. Probably best to do it via an eclass since lots of packages
> > will be using it.
> It's as simple as:
> 
>       if use logrotate; then
>               insinto /etc/logrotate.d
>               newins ${FILESDIR}/${P}-logrotate ${PN}
>       fi
> Do we really need an eclass for that?
I meant an eclass to take care of all of it together.

(rough prototype here)
IUSE="$IUSE logrotate"
RDEPEND="$RDEPEND logrotate? ( app-admin/logrotate )"

dologrotated() {
        use logrotate && insinto /etc/logrotate.d && doins "$@"
}
newlogrotated() {
        use logrotate && insinto /etc/logrotate.d && newins "$1" "$2"
}

Then ebuilds can just do:
inherit logrotate
...
newlogrotated ${FILES}/${PN}-logrotate-basic ${PN}-logrotate
dologrotated ${FILES}/${PN}-logrotate-extra 
...

-- 
Robin Hugh Johnson
E-Mail     : [EMAIL PROTECTED]
Home Page  : http://www.orbis-terrarum.net/?l=people.robbat2
ICQ#       : 30269588 or 41961639
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

Attachment: pgpw1uPMtF7lm.pgp
Description: PGP signature

Reply via email to