Created attachment 346114 [details] Updated ebuild I have created an updated ebuild for sispmctl, which is used for controlling the GEMBIRD switchable powerplug. The actual version in portage is 2.7, but the recent version of the program is 3.1. Whilst updating the ebuild, I have added webserver and bash-completion support by use flags. Files are attached.
Created attachment 346116 [details, diff] Patch to adjust the webserver's files directory to conform to Gentoo standards.
Created attachment 346120 [details] sispmctl-3.1.ebuild
Comment on attachment 346120 [details] sispmctl-3.1.ebuild --- sispmctl-2.7.ebuild 2011-03-22 00:57:37.000000000 +0100 +++ - 2013-04-23 17:18:23.222136518 +0200 @@ -4,6 +4,8 @@ EAPI=2 +inherit eutils + DESCRIPTION="GEMBIRD SiS-PM control utility" HOMEPAGE="http://sispmctl.sourceforge.net/" SRC_URI="mirror://sourceforge/sispmctl/${P}.tar.gz" @@ -11,16 +13,45 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~arm ~x86" -IUSE="" +IUSE="bash-completion webserver" RDEPEND="virtual/libusb:0" DEPEND="${RDEPEND}" +src_prepare() { + if use webserver; then + epatch "${FILESDIR}/${P}-webdir.patch" + fi +} + src_configure() { - econf --enable-webless + if use webserver; then + econf + else + econf --enable-webless --with-webdir="/usr/share/${PN}" + fi } src_install() { emake DESTDIR="${D}" install || die - dodoc README ChangeLog NEWS + dodoc README ChangeLog NEWS extras/gemplug/gemplug.1 || die + dobin extras/gemplug/gemplug || die + + if use bash-compleion; then + insinto /usr/share/bash-completion || die + mv extras/gemplug/gemplug-completion.sh gemplug + doins gemplug || die + fi + + insinto /lib/udev/rules.d || die + doins extras/gemplug/74-sispmctl.rules || die + + if use webserver; then + dodir "/usr/share/${PN}" || die + insinto "/usr/share/${PN}" || die + doins src/web1/index.html src/web1/logo.png src/web1/off1.html \ + src/web1/off2.html src/web1/off3.html src/web1/off4.html src/web1/ \ + src/web1/on1.html src/web1/on2.html src/web1/on3.html src/web1/on4.html \ + src/web1/status0.png src/web1/status1.png src/web1/style.css || die + fi }
Does ebuild from comment #3 look good to you? I am not what we need to commit here
*** Bug 452864 has been marked as a duplicate of this bug. ***
=sys-power/sispmctl-3.1 is now in CVS. I opt against supporting the usage of the builtin webserver (seems like a security nightmare to me), therefore I didn't add it (neither in the first place, nor in the latest commit). Anyone who is not happy with this can add the webserver stuff by himself or open a new bug about it (which I won't take care of myself, but somebody else can ;-)). Nevertheless I added USE=gemplug (off by default) which enables the installation of the gemplug management script.