rpms/ruby-shadow/FC-6 ruby-shadow-1.4.1-cflags.patch, NONE, 1.1 ruby-shadow-1.4.1-struct.patch, NONE, 1.1 ruby-shadow.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Kostas Georgiou (georgiou) fedora-extras-commits at redhat.com
Thu May 24 14:55:09 UTC 2007


Author: georgiou

Update of /cvs/extras/rpms/ruby-shadow/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3229/FC-6

Modified Files:
	.cvsignore sources 
Added Files:
	ruby-shadow-1.4.1-cflags.patch ruby-shadow-1.4.1-struct.patch 
	ruby-shadow.spec 
Log Message:
Initial package import for FC-6 branch


ruby-shadow-1.4.1-cflags.patch:

--- NEW FILE ruby-shadow-1.4.1-cflags.patch ---
--- shadow-1.4.1/extconf.rb-orig	2007-05-15 09:16:03.000000000 +0100
+++ shadow-1.4.1/extconf.rb	2007-05-15 09:17:29.000000000 +0100
@@ -6,7 +6,7 @@
 
 require 'mkmf'
 
-$CFLAGS = ""
+$CFLAGS = "#{$CFLAGS}"
 $LDFLAGS = "-lshadow"
 
 if( ! (ok = have_library("shadow","getspent")) )

ruby-shadow-1.4.1-struct.patch:

--- NEW FILE ruby-shadow-1.4.1-struct.patch ---
--- shadow-1.4.1/shadow.c-orig	2007-05-15 13:09:41.000000000 +0100
+++ shadow-1.4.1/shadow.c	2007-05-15 13:18:17.000000000 +0100
@@ -60,7 +60,7 @@
 		      INT2FIX(entry->sp_inact),
 		      INT2FIX(entry->sp_expire),
 		      INT2FIX(entry->sp_flag),
-		      0);
+		      NULL);
   free(entry);
   return result;
 };
@@ -89,7 +89,7 @@
 		      INT2FIX(entry->sp_inact),
 		      INT2FIX(entry->sp_expire),
 		      INT2FIX(entry->sp_flag),
-		      0);
+		      NULL);
   return result;
 };
 
@@ -114,7 +114,7 @@
 		      INT2FIX(entry->sp_inact),
 		      INT2FIX(entry->sp_expire),
 		      INT2FIX(entry->sp_flag),
-		      0);
+		      NULL);
   return result;
 };
 
@@ -142,7 +142,7 @@
 		      INT2FIX(entry->sp_inact),
 		      INT2FIX(entry->sp_expire),
 		      INT2FIX(entry->sp_flag),
-		      0);
+		      NULL);
   return result;
 };
 
@@ -254,10 +254,10 @@
   rb_sPasswdEntry = rb_struct_define("PasswdEntry",
 				     "sp_namp","sp_pwdp","sp_lstchg",
 				     "sp_min","sp_max","sp_warn",
-				     "sp_inact","sp_expire","sp_flag",0);
+				     "sp_inact","sp_expire","sp_flag",NULL);
   rb_sGroupEntry = rb_struct_define("GroupEntry",
 				    "sg_name","sg_passwd",
-				    "sg_adm","sg_mem",0);
+				    "sg_adm","sg_mem",NULL);
 
   rb_mShadow = rb_define_module("Shadow");
   rb_eFileLock = rb_define_class_under(rb_mShadow,"FileLock",rb_eException);


--- NEW FILE ruby-shadow.spec ---
%{!?ruby_sitearch: %define ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")}
# This fails in mock since ruby doesn't exist in the default build env.
#%{!?ruby_abi: %define ruby_abi %(ruby -rrbconfig -e "puts Config::CONFIG['ruby_version']")}

Name:           ruby-shadow
Version:        1.4.1
Release:        5%{?dist}
Summary:        Ruby bindings for shadow password access
Group:          System Environment/Libraries
License:        Public Domain
URL:            http://ttsky.net/
Source0:        http://ttsky.net/src/ruby-shadow-%{version}.tar.gz
Patch0:         ruby-shadow-1.4.1-cflags.patch
Patch1:         ruby-shadow-1.4.1-struct.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  ruby ruby-devel
BuildRequires:  ruby(abi) = 1.8
Requires:       ruby(abi) = 1.8
Provides:       ruby(shadow) = %{version}-%{release}

%description
Ruby bindings for shadow password access

%prep
%setup -q -n shadow-%{version}
%patch0 -p1
%patch1 -p1
%{_bindir}/iconv -f EUCJP -t utf8 -o README.ja README.euc

%build
ruby extconf.rb --with-cflags="$RPM_OPT_FLAGS"
make

%install
rm -rf %{buildroot}
make %{?_smp_mflags} DESTDIR=%{buildroot} install

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc HISTORY README README.ja
%{ruby_sitearch}/shadow.so

%changelog

* Fri May 18 2007 Kostas Georgiou <k.georgiou at imperial.ac.uk> 1.4.1-5
Removed the ruby abi macro since it doesn't work in mock

* Tue May 15 2007 Kostas Georgiou <k.georgiou at imperial.ac.uk> 1.4.1-4
Cleaner ruby abi macro

* Tue May 15 2007 Kostas Georgiou <k.georgiou at imperial.ac.uk> 1.4.1-3
Fixed struct defines (0 != NULL in C) 
Calculate ruby abi at runtime instead of a hard coded version

* Tue May 15 2007 Kostas Georgiou <k.georgiou at imperial.ac.uk> 1.4.1-2
Converted README.euc to utf8 README.ja
Patched extconf.rb to use provided CFLAGS

* Mon May 14 2007 Kostas Georgiou <k.georgiou at imperial.ac.uk> 1.4.1-1
Initial rpm release


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/ruby-shadow/FC-6/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	21 May 2007 17:33:00 -0000	1.1
+++ .cvsignore	24 May 2007 14:54:32 -0000	1.2
@@ -0,0 +1 @@
+ruby-shadow-1.4.1.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/ruby-shadow/FC-6/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	21 May 2007 17:33:00 -0000	1.1
+++ sources	24 May 2007 14:54:32 -0000	1.2
@@ -0,0 +1 @@
+425b742ac43bff359c1717360f761790  ruby-shadow-1.4.1.tar.gz




More information about the fedora-extras-commits mailing list