app-laptop/thinkfan: bump to v1.0.1
authorThomas Deutschmann <whissi@gentoo.org>
Sat, 19 Jan 2019 05:01:39 +0000 (06:01 +0100)
committerThomas Deutschmann <whissi@gentoo.org>
Sat, 19 Jan 2019 05:02:39 +0000 (06:02 +0100)
- fix DOCDIR

- modernize OpenRC runscript

Package-Manager: Portage-2.3.56, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
app-laptop/thinkfan/Manifest
app-laptop/thinkfan/files/thinkfan-1.0.1-update-runscript.patch [new file with mode: 0644]
app-laptop/thinkfan/thinkfan-1.0.1.ebuild [moved from app-laptop/thinkfan/thinkfan-1.0.ebuild with 73% similarity]

index 0df01627822a0617451f67e0408eb9a4ea537dd6..444109d9ddecf95b0a62a2eb2b0089fe3df3ddf3 100644 (file)
@@ -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
diff --git a/app-laptop/thinkfan/files/thinkfan-1.0.1-update-runscript.patch b/app-laptop/thinkfan/files/thinkfan-1.0.1-update-runscript.patch
new file mode 100644 (file)
index 0000000..a0896af
--- /dev/null
@@ -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 $?
+ }
similarity index 73%
rename from app-laptop/thinkfan/thinkfan-1.0.ebuild
rename to app-laptop/thinkfan/thinkfan-1.0.1.ebuild
index d114b72afb16211e827d9df4e9919afabb4549e1..e7e7da5f821fda3fcc3b7e71c6eebb430b77ba88 100644 (file)
@@ -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
@@ -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)"
@@ -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."