[packages/laptop-mode-tools] - up to 1.71

arekm arekm at pld-linux.org
Fri Jan 13 13:21:27 CET 2017


commit c534031f1f3ab680be4d193960f5ce8545010ebe
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Jan 13 13:21:20 2017 +0100

    - up to 1.71

 laptop-mode-tools-kver.patch | 20 --------------
 laptop-mode-tools.spec       | 62 +++++++++++++++++++-------------------------
 laptop-mode-tools.tmpfiles   |  1 -
 3 files changed, 27 insertions(+), 56 deletions(-)
---
diff --git a/laptop-mode-tools.spec b/laptop-mode-tools.spec
index 69d92bc..45beed5 100644
--- a/laptop-mode-tools.spec
+++ b/laptop-mode-tools.spec
@@ -17,16 +17,14 @@
 Summary:	Laptop Mode Tools
 Summary(pl.UTF-8):	Narzędzia do trybu laptopowego
 Name:		laptop-mode-tools
-Version:	1.58
-Release:	2
+Version:	1.71
+Release:	1
 License:	GPL
 Group:		Applications/System
-Source0:	http://samwel.tk/laptop_mode/tools/downloads/%{name}_%{version}.tar.gz
-# Source0-md5:	c7a234ada284eaaece0e04bd260e87af
+Source0:	https://github.com/rickysarraf/laptop-mode-tools/archive/%{version}.tar.gz
+# Source0-md5:	8b9a2d9db7dd9d0a99b635a1185f292c
 Source1:	%{name}.init
-Source2:	%{name}.tmpfiles
-Patch0:		%{name}-kver.patch
-URL:		http://www.samwel.tk/laptop_mode/
+URL:		https://github.com/rickysarraf/laptop-mode-tools
 BuildRequires:	rpmbuild(macros) >= 1.268
 Requires(post,preun):	/sbin/chkconfig
 %if %{with apm} && %{with acpi}
@@ -83,36 +81,22 @@ APM scripts for laptop mode tools.
 Skrypty APM dla narzędzi do trybu laptopowego.
 
 %prep
-%setup -q -n %{name}_%{version}
-%patch0 -p1
+%setup -q
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d} \
-	$RPM_BUILD_ROOT{%{_mandir}/man8,%{_datadir}/%{name}/modules,%{_sbindir}} \
-	$RPM_BUILD_ROOT%{_sysconfdir}/laptop-mode/{{batt,lm-ac,nolm-ac}-{start,stop},conf.d} \
-	$RPM_BUILD_ROOT%{_varrun}/%{name} \
-	$RPM_BUILD_ROOT/usr/lib/tmpfiles.d
 
-install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/laptop-mode
-cp -a etc/laptop-mode/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/laptop-mode
-cp -a etc/laptop-mode/conf.d/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/laptop-mode/conf.d
-install usr/share/laptop-mode-tools/modules/* $RPM_BUILD_ROOT%{_datadir}/%{name}/modules
-install -p usr/sbin/{laptop_mode,lm-syslog-setup,lm-profiler} $RPM_BUILD_ROOT%{_sbindir}
-cp -a man/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
-
-install %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
-
-%if %{with acpi}
-install -d $RPM_BUILD_ROOT/etc/acpi/{actions,events}
-install -p etc/acpi/actions/* $RPM_BUILD_ROOT/etc/acpi/actions
-install -p etc/acpi/events/* $RPM_BUILD_ROOT/etc/acpi/events
-%endif
+%{__make} install \
+	INSTALL=install \
+	INIT_D=$RPM_BUILD_ROOT/etc/rc.d/init.d \
+	ULIB_D=%{_libdir} \
+	MAN_D=%{_mandir} \
+	TMPFILES_D=/usr/lib/tmpfiles.d \
+	%{!?with_acpi:ACPI=disabled} \
+	%{!?with_apm:APM=disabled} \
+	DESTDIR=$RPM_BUILD_ROOT
 
-%if %{with apm}
-install -d $RPM_BUILD_ROOT/etc/apm/event.d
-install -p etc/apm/event.d/* $RPM_BUILD_ROOT/etc/apm/event.d
-%endif
+install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/laptop-mode
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -129,7 +113,7 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc README Documentation/*
+%doc README.md Documentation/*
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/laptop-mode/*.conf
 %dir %{_sysconfdir}/laptop-mode
 %dir %{_sysconfdir}/laptop-mode/batt-start
@@ -141,11 +125,19 @@ fi
 %dir %{_sysconfdir}/laptop-mode/nolm-ac-start
 %dir %{_sysconfdir}/laptop-mode/nolm-ac-stop
 %attr(754,root,root) /etc/rc.d/init.d/laptop-mode
+%attr(755,root,root) /lib/udev/lmt-udev
+/lib/udev/rules.d/99-laptop-mode.rules
+/usr/lib/tmpfiles.d/laptop-mode.conf
+/lib/systemd/system/laptop-mode.service
+/lib/systemd/system/laptop-mode.timer
+/lib/systemd/system/lmt-poll.service
+%dir %{_libdir}/pm-utils/sleep.d
+%attr(755,root,root) %{_libdir}/pm-utils/sleep.d/01laptop-mode
 %dir %{_datadir}/%{name}
 %dir %{_datadir}/%{name}/modules
-%dir %{_varrun}/%{name}
-/usr/lib/tmpfiles.d/%{name}.conf
 %attr(755,root,root) %{_datadir}/%{name}/modules/*
+%dir %{_datadir}/%{name}/module-helpers
+%attr(755,root,root) %{_datadir}/%{name}/module-helpers/*
 %attr(755,root,root) %{_sbindir}/laptop_mode
 %attr(755,root,root) %{_sbindir}/lm-profiler
 %attr(755,root,root) %{_sbindir}/lm-syslog-setup
diff --git a/laptop-mode-tools-kver.patch b/laptop-mode-tools-kver.patch
deleted file mode 100644
index f0974b3..0000000
--- a/laptop-mode-tools-kver.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- laptop-mode-tools_1.57/usr/share/laptop-mode-tools/modules/laptop-mode~	2011-02-27 08:22:20.000000000 +0100
-+++ laptop-mode-tools_1.57/usr/share/laptop-mode-tools/modules/laptop-mode	2011-06-26 12:29:14.496372260 +0200
-@@ -193,7 +193,7 @@
- 			set_sysctl /proc/sys/vm/laptop_mode   1
- 			set_sysctl /proc/sys/vm/bdflush       "30 500 0 0 $AGE $AGE 60 20 0"
- 			;;
--		"2.6")
-+		"2.6"|3.*)
- 			log "VERBOSE" "Adjusting 2.6 kernel parameters to enable laptop mode."
- 			set_sysctl /proc/sys/vm/laptop_mode		  "$LM_SECONDS_BEFORE_SYNC"
- 			set_sysctl /proc/sys/vm/dirty_writeback_centisecs "$AGE"
-@@ -321,7 +321,7 @@
- 			log "VERBOSE" "Adjusting 2.4 kernel parameters to disable laptop mode."
- 			set_sysctl /proc/sys/vm/bdflush "30 500 0 0 $U_AGE $B_AGE 60 20 0"
- 			;;
--		"2.6")
-+		"2.6"|3.*)
- 			log "VERBOSE" "Adjusting 2.6 kernel parameters to disable laptop mode."
- 			set_sysctl /proc/sys/vm/dirty_writeback_centisecs   "$U_AGE"
- 			set_sysctl /proc/sys/vm/dirty_expire_centisecs      "$B_AGE"
diff --git a/laptop-mode-tools.tmpfiles b/laptop-mode-tools.tmpfiles
deleted file mode 100644
index 664456d..0000000
--- a/laptop-mode-tools.tmpfiles
+++ /dev/null
@@ -1 +0,0 @@
-d /var/run/laptop-mode-tools 0755 root root -
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/laptop-mode-tools.git/commitdiff/c534031f1f3ab680be4d193960f5ce8545010ebe



More information about the pld-cvs-commit mailing list