public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [gentoo-dev] How should I kill a daemon from an ebuild file?
@ 2007-07-27 13:52 99% Jules Colding
  0 siblings, 0 replies; 1+ results
From: Jules Colding @ 2007-07-27 13:52 UTC (permalink / raw
  To: Gentoo Dev

Hi,

I have an ebuild (see below) for a small keyring daemon. I would like to
kill the daemon process, if it is running, whenever it is emerged again
to ensure that no running daemon process refers to an old install.

Is there a clean and recommended way of doing this in an ebuild or
should I just use killall in pkg_postinst()?

Or is this ultimately a big no-no??

Thanks,
  jules



#  
# Ebuild file for the Brutus Keyring.
# Copyright (C) 2007 OMC Denmark ApS
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
# MA 02111-1307 USA
#
# Please see http://gentoo-wiki.com/HOWTO_Installing_3rd_Party_Ebuilds
# on how to use this ebuild file.
#
# $Header: $

inherit eutils

DESCRIPTION="Brutus Keyring daemon"
HOMEPAGE="http://www.omesc.com/"
SRC_URI="http://www.omesc.com/sites/default/files/downloads/dist/brutus-keyring/Gentoo/brutus-keyring-0.9.3.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"

IUSE="debug"
RESTRICT="nomirror"

DEPEND=">=gnome-base/orbit-2.14.1
        >=dev-libs/libIDL-0.8.5
        >=dev-util/pkgconfig-0.20
        >=dev-libs/libgcrypt-1.2.2
        gnome-base/gnome-common"

DOCS="COPYING README INSTALL docs/brutus-keyring-guide docs/brutus-keyring-devel-guide"

src_compile() {
        BRUTUS_ECONF="--enable-brutus-dist=yes \
                --enable-brutus-devel=yes \
                --enable-brutus-target=gentoo \
                $(use_enable debug brutus-debug yes)"

        econf ${BRUTUS_ECONF} || die "econf failed"
        emake || die "emake failed"
}

src_install() {
        emake DESTDIR="${D}" install || die "emake install failed"
        dodoc ${DOCS}
}


pkg_postinst() {
        elog "brutus-keyring has been installed"
}

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2007-07-27 13:52 99% [gentoo-dev] How should I kill a daemon from an ebuild file? Jules Colding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox