Summary(pl.UTF-8): CVSspam - wysyłanie różnic po wykonaniu zmiany w repozytorium CVS
Name: cvsspam
Version: 0.2.12
-Release: 12
+Release: 13
License: GPL
Group: Applications/System
Source0: http://www.badgers-in-foil.co.uk/projects/cvsspam/releases/%{name}-%{version}.tar.gz
Patch100: %{name}-branch.diff
Patch0: %{name}-textdiff.patch
Patch1: %{name}-tracfunc.patch
+Patch2: ruby19.patch
URL: http://www.badgers-in-foil.co.uk/projects/cvsspam/
BuildRequires: rpmbuild(macros) >= 1.277
Requires: cvs-client
%patch100 -p0
%patch0 -p0
%patch1 -p1
+%patch2 -p1
%install
rm -rf $RPM_BUILD_ROOT
--- /dev/null
+--- cvsspam-0.2.12/cvsspam.rb~ 2010-04-07 18:25:49.252489451 +0300
++++ cvsspam-0.2.12/cvsspam.rb 2010-04-07 18:27:22.000000000 +0300
+@@ -169,7 +171,7 @@
+
+ # test to see of the given string contains non-ASCII characters
+ def requires_rfc2047?(word)
+- (word =~ /[\177-\377]/) != nil
++ (word.force_encoding('ASCII-8BIT') =~ /[\177-\377]/) != nil
+ end
+ end
+
+@@ -2242,6 +2244,7 @@
+ if File.exists?($users_file)
+ File.open($users_file) do |io|
+ io.each_line do |line|
++ line.force_encoding($users_file_charset)
+ if line =~ /^([^:]+)\s*:\s*(['"]?)([^\n\r]+)(\2)/
+ if email.address == $1
+ return EmailAddress.new($3, $users_file_charset)