Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 466594 - sys-power/sispmctl-3.1 version bump
Summary: sys-power/sispmctl-3.1 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Wolfram Schlich (RETIRED)
URL:
Whiteboard:
Keywords: EBUILD, PATCH
: 452864 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-04-20 19:42 UTC by gentooer
Modified: 2014-03-30 13:47 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Updated ebuild (sispmctl-3.1.ebuild,1.44 KB, text/plain)
2013-04-20 19:42 UTC, gentooer
Details
Patch to adjust the webserver's files directory to conform to Gentoo standards. (sispmctl-3.1-webdir.patch,1.30 KB, patch)
2013-04-20 19:43 UTC, gentooer
Details | Diff
sispmctl-3.1.ebuild (sispmctl-3.1.ebuild,1.48 KB, text/plain)
2013-04-20 19:47 UTC, gentooer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gentooer 2013-04-20 19:42:49 UTC
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.
Comment 1 gentooer 2013-04-20 19:43:43 UTC
Created attachment 346116 [details, diff]
Patch to adjust the webserver's files directory to conform to Gentoo standards.
Comment 2 gentooer 2013-04-20 19:47:11 UTC
Created attachment 346120 [details]
sispmctl-3.1.ebuild
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2013-04-23 15:18:36 UTC
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
 }
Comment 4 Markos Chandras (RETIRED) gentoo-dev 2013-05-12 20:13:18 UTC
Does ebuild from comment #3 look good to you? I am not what we need to commit here
Comment 5 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-05-20 20:57:40 UTC
*** Bug 452864 has been marked as a duplicate of this bug. ***
Comment 6 Wolfram Schlich (RETIRED) gentoo-dev 2014-03-30 13:47:55 UTC
=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.