packages: suspend-utils/suspend-utils.spec, suspend-utils/wlcsv2c.pl (NEW), ...

arekm arekm at pld-linux.org
Fri Apr 15 19:43:24 CEST 2011


Author: arekm                        Date: Fri Apr 15 17:43:24 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- up to 1.0 (use tarball); rename from suspend.spec to suspend-utils.spec

---- Files affected:
packages/suspend-utils:
   suspend-utils.spec (1.67 -> 1.68) , wlcsv2c.pl (NONE -> 1.1)  (NEW), suspend-whitelist.patch (1.4 -> NONE)  (REMOVED)

---- Diffs:

================================================================
Index: packages/suspend-utils/suspend-utils.spec
diff -u packages/suspend-utils/suspend-utils.spec:1.67 packages/suspend-utils/suspend-utils.spec:1.68
--- packages/suspend-utils/suspend-utils.spec:1.67	Wed Oct 27 19:08:35 2010
+++ packages/suspend-utils/suspend-utils.spec	Fri Apr 15 19:43:18 2011
@@ -10,22 +10,22 @@
 %undefine with_dietlibc
 %endif
 
-%define		snap	20101027
 Summary:	Suspend to RAM/Disk/Both
 Summary(de.UTF-8):	Einfrieren in den Systemspeicher
 Summary(pl.UTF-8):	Zamrażanie w RAM/Dysku/Jedno i drugie
-Name:		suspend
-Version:	0.8
-Release:	0.%{snap}.1
+Name:		suspend-utils
+Version:	1.0
+Release:	1
 License:	GPL v2
 Group:		Applications/System
 # git clone git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-utils.git
-Source0:	%{name}-%{snap}.tar.bz2
-# Source0-md5:	8f745115f0510895eb8cc16c760fb9af
-Patch0:		%{name}-sys-file-range-write.patch
-Patch1:		%{name}-fadvise.patch
-Patch2:		%{name}-diet.patch
-Patch3:		%{name}-whitelist.patch
+# Source0:	%{name}-%{snap}.tar.bz2
+Source0:	http://dl.sourceforge.net/project/suspend/suspend/suspend-1.0/suspend-utils-1.0.tar.bz2
+# Source0-md5:	02f7d4b679bad1bb294a0efe48ce5934
+Source1:	wlcsv2c.pl
+Patch0:		suspend-sys-file-range-write.patch
+Patch1:		suspend-fadvise.patch
+Patch2:		suspend-diet.patch
 URL:		http://sourceforge.net/projects/suspend
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -53,6 +53,8 @@
 BuildRequires:	zlib-devel
 Requires:	uname(release) >= 2.6.17
 Conflicts:	geninitrd < 8880
+Provides:	suspend = %{version}-%{release}
+Obsoletes:	suspend < 1.0
 ExclusiveArch:	%{ix86} %{x8664} ppc ppc64
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -82,11 +84,12 @@
 Zamrażanie w RAM/Dysku/Jedno i drugie - program resume dla initrd.
 
 %prep
-%setup -q -n %{name}-utils
+%setup -q
 %patch0 -p1
 %patch1 -p2
 %patch2 -p1
-%patch3 -p1
+
+install %{SOURCE1} .
 
 cat >syscalltest.c <<EOF
 #include <stdio.h>
@@ -134,6 +137,7 @@
 %configure \
 	%{?with_splashy:--enable-splashy} \
 	--enable-compress \
+	--enable-threads \
 	--enable-encrypt
 
 %{__make}
@@ -156,7 +160,7 @@
 
 %files
 %defattr(644,root,root,755)
-%doc HOWTO README* TODO
+%doc HOWTO README* AUTHORS ReleaseNotes
 %attr(755,root,root) %{_sbindir}/*
 %dir %{_libdir}/suspend
 %attr(755,root,root) %{_libdir}/suspend/resume
@@ -174,6 +178,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.68  2011/04/15 17:43:18  arekm
+- up to 1.0 (use tarball); rename from suspend.spec to suspend-utils.spec
+
 Revision 1.67  2010/10/27 17:08:35  arekm
 - up to 20101027; allow all T400 2764CTO bioses
 

================================================================
Index: packages/suspend-utils/wlcsv2c.pl
diff -u /dev/null packages/suspend-utils/wlcsv2c.pl:1.1
--- /dev/null	Fri Apr 15 19:43:24 2011
+++ packages/suspend-utils/wlcsv2c.pl	Fri Apr 15 19:43:18 2011
@@ -0,0 +1,79 @@
+#!/usr/bin/perl
+# Rodolfo Garcia kix_at_kix.es
+# suspend database management v1.0
+
+use Switch;
+
+switch ($#ARGV) {
+  case 0 {
+    my $fin = $ARGV[0];
+    open(INF, "<$fin") or die "Could not open input file\n";
+    open(OUF, ">&STDOUT") or die "Could not open output file\n";
+  }
+  case 1 {
+    my $fin = $ARGV[0];
+    my $fout = $ARGV[1];
+    open(INF, "<$fin") or die "Could not open input file\n";
+    open(OUF, ">$fout") or die "Could not open output file\n";
+  }
+  else {
+    my $msg = $0 . " <input-file> [output-file]";
+    die $msg;
+  }
+}
+
+&print_c_header;
+
+my $sys_vendor = "";
+my $sys_product = "";
+my $sys_version = "";
+my $bios_version = "";
+my $flags = "";
+my $comments = "";
+
+while(<INF>) {
+  if (/"([^"]*)",\s*"([^"]*)",\s*"([^"]*)",\s*"([^"]*)",\s*([^,]*),\s*(.*)/) {
+    $sys_vendor = $1;
+    $sys_product = $2;
+    $sys_version = $3;
+    $bios_version = $4;
+    $flags = $5;
+    $comments = $6;
+
+    printf OUF "\t$comments\n";
+    printf OUF "\t{ \"" . $sys_vendor . "\",\t\"" . $sys_product . "\",\t\"" . $sys_version . "\",\t\"" . $bios_version . "\",\t" . $flags . " },\n";
+  }
+}
+
+&print_c_footer;
+
+close(INF);
+close(OUF);
+
+sub print_c_header
+{
+  ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
+
+  printf OUF "/* whitelist.c\n";
+  printf OUF " * whitelist of machines that are known to work somehow\n";
+  printf OUF " * and all the workarounds\n";
+  printf OUF " * Script generated file, please do not edit by hand\n";
+  printf OUF " */\n";
+  printf OUF "\n";
+  printf OUF "\#include \"config.h\"\n";
+  printf OUF "\#include \<stdlib.h\>\n";
+  printf OUF "\#include \"whitelist.h\"\n";
+  printf OUF "\n";
+
+  printf OUF "char *whitelist_version = \"\$Id: whitelist.c ver. ";
+  printf OUF "%4d%02d%02d %02d:%02d:%02d",$year+1900,$mon+1,$mday,$hour,$min,$sec;
+  printf OUF " automatic generation - kix - Exp \$\";\n";
+  printf OUF "\n";
+  printf OUF "struct machine_entry whitelist[] = {\n";
+}
+
+sub print_c_footer
+{
+  print OUF "\t{ NULL, NULL, NULL, NULL, 0 }\n";
+  print OUF "};\n";
+}
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/suspend-utils/suspend-utils.spec?r1=1.67&r2=1.68&f=u



More information about the pld-cvs-commit mailing list