Skip to content

Commit

Permalink
app-laptop/thinkfan: bump to v1.0.1
Browse files Browse the repository at this point in the history
- fix DOCDIR

- modernize OpenRC runscript

Package-Manager: Portage-2.3.56, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <[email protected]>
  • Loading branch information
Whissi committed Jan 19, 2019
1 parent de52578 commit 9001858
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app-laptop/thinkfan/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DIST thinkfan-0.9.3.tar.gz 39527 BLAKE2B e6a6d09493d94b4de9ada20dcc4b0251c5f2c148f7faa7f69c04fe2a279a9cfe253a0ea1a01fe94ed108e8731e2ba01edef5df10dfb887ea961a356dff733854 SHA512 d2a29f9cae636c22b66958f8ec50cb60a162d745c3967257bb5e20cc9e152894d4e8a66f897ffa4e49353eba4a42e3499bb9e554719974284089a46cfc6280d7
DIST thinkfan-1.0.tar.gz 77575 BLAKE2B cc4dfec48d2797079b053b0be923a008b2e740179de10bda549194008a83ce9ea47fdb23e82f0050fa594be81fa07b242b548303fff751845da544f1f8fdd226 SHA512 c85c8a4f3eb2735f065bf56312823a13277b803e4762a325bd250a47f1e35e1efbc45fa63bcd3b2e24184d6f95a9f8d7ceb1b31eb82c674ca2f2f8d57ee0ea30
DIST thinkfan-1.0.1.tar.gz 77587 BLAKE2B 7a2d4d77be8a9abdafe2cdb8485c92dfe9850ad2309d45d0ac32e8c0e7e6db22ef6c2e16161cccbd6e6147497accc8ec3f5d4467dbe5d2fe6d7fdfd06bb3261f SHA512 61fac9e99f5a2974c5a80e2565956d203baf670dc4b97625389e91fe3fe4d026c07847c10e7d46a4f57914a8156aeea0141570202c0ce2b497f8a1daefa47d6e
39 changes: 39 additions & 0 deletions app-laptop/thinkfan/files/thinkfan-1.0.1-update-runscript.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
https://github.com/vmatare/thinkfan/pull/61

--- a/rcscripts/openrc/thinkfan.cmake
+++ b/rcscripts/openrc/thinkfan.cmake
@@ -1,26 +1,19 @@
#!/sbin/openrc-run

+command="@CMAKE_INSTALL_PREFIX@/sbin/thinkfan"
+command_args="-q -s5 -c /etc/thinkfan.conf"
+pidfile="@PID_FILE@"
+
extra_started_commands="reload"

+required_files="/etc/thinkfan.conf"
+
depend() {
after modules
}

-start() {
- ebegin "Starting thinkfan"
- start-stop-daemon --start --exec @CMAKE_INSTALL_PREFIX@/sbin/thinkfan -- -q -s5 -c /etc/thinkfan.conf
- eend $?
-}
-
-stop() {
- ebegin "Stopping thinkfan"
- start-stop-daemon --stop --exec @CMAKE_INSTALL_PREFIX@/sbin/thinkfan
- eend $?
-}
-
reload() {
- PID=$(<@PID_FILE@)
- ebegin "Sending SIGHUP to thinkfan($PID)"
- kill -HUP $PID
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
eend $?
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2017 Gentoo Foundation
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6
Expand All @@ -19,15 +19,16 @@ DEPEND="atasmart? ( dev-libs/libatasmart )
RDEPEND="${DEPEND}
nvidia? ( x11-drivers/nvidia-drivers )"

src_prepare() {
cmake-utils_src_prepare
PATCHES=( "${FILESDIR}"/${PN}-1.0.1-update-runscript.patch )

sed -e "s:share/doc/${PN}:share/doc/${PF}:" \
-i CMakeLists.txt || die "sed failed"
}
DOC_CONTENTS="
Please read the documentation and copy an appropriate
file to /etc/thinkfan.conf.
"

src_configure() {
local mycmakeargs+=(
-DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF}
-DUSE_NVML="$(usex nvidia)"
-DUSE_ATASMART="$(usex atasmart)"
-DUSE_YAML="$(usex yaml)"
Expand All @@ -38,8 +39,6 @@ src_configure() {

src_install() {
cmake-utils_src_install

readme.gentoo_create_doc
}

DOC_CONTENTS="Please read the documentation and copy an
appropriate file to /etc/thinkfan.conf."

0 comments on commit 9001858

Please sign in to comment.