%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) %global gemname activeldap %global geminstdir %{gemdir}/gems/%{gemname}-%{version} %global rubyabi 1.8 Summary: Ruby/ActiveLdap is a object-oriented API to LDAP Name: rubygem-%{gemname} Version: 1.2.2 Release: 2%{?dist} Group: Development/Languages # Overall license: GPLv2+ or Ruby # test-unit/: GPLv2 or Ruby License: (GPLv2+ or Ruby) and (GPLv2 or Ruby) URL: http://rubyforge.org/projects/ruby-activeldap/ Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem Requires: ruby(abi) = %{rubyabi} Requires: rubygems Requires: rubygem(activerecord) >= 2.3.8 Requires: rubygem(locale) >= 2.0.5 Requires: rubygem(gettext) >= 2.1.0 Requires: rubygem(gettext_activerecord) >= 2.1.0 Requires: ruby-ldap BuildRequires: ruby(abi) = %{rubyabi} BuildRequires: rubygems BuildRequires: gettext BuildArch: noarch Provides: rubygem(%{gemname}) = %{version}-%{name} %description 'Ruby/ActiveLdap' is a ruby extension library which provides a clean objected oriented interface to the Ruby/LDAP library. It was inspired by ActiveRecord. This is not nearly as clean or as flexible as ActiveRecord, but it is still trivial to define new objects and manipulate them with minimal difficulty. %package doc Summary: Documentation for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} %description doc This package contains documentation for %{name}. %prep %setup -q -c -T mkdir -p .%{gemdir} gem install \ --local \ --install-dir .%{gemdir} \ --force \ --rdoc \ -V \ %{SOURCE0} find . -name \*.gem | xargs chmod 0644 %build # Change the dependency against locale/gettext/active* # from "strictly equal (=)" to "not less than (>=)" # (bug 542917) find .%{gemdir} -name \*.gemspec | \ xargs sed -i -e '\@add_runtime_dependency@s|"= |">= |' grep -rl require_gem_if_need .%{geminstdir} | \ xargs sed -i -e '/require_gem_if_need/s|"= \([0-9\.][0-9\.]*\)"|">= \1"|' %install mkdir -p %{buildroot}%{gemdir} cp -a .%{gemdir}/* \ %{buildroot}/%{gemdir}/ #locale handling ## data/locale/en/LC_MESSAGES/active-ldap.mo %find_lang active-ldap echo "%%defattr(-,root,root,-)" >> active-ldap.lang find %{buildroot}%{geminstdir}/data -type d | while read dir do echo "%%dir ${dir#%{buildroot}}" >> active-ldap.lang done ## examples/al-admin/locale/en/LC_MESSAGES/al-admin.mo %find_lang al-admin echo "%%defattr(-,root,root,-)" >> al-admin.lang find %{buildroot}%{geminstdir}/examples -type d | while read dir do echo "%%dir ${dir#%{buildroot}}" >> al-admin.lang done find %{buildroot}%{geminstdir}/examples -type f | \ grep -v /locale/ | \ while read file do echo "${file#%{buildroot}}" >> al-admin.lang done %check # Net connection and some setup needed exit 0 %files -f active-ldap.lang %defattr(-, root, root, -) %dir %{geminstdir} %doc %{geminstdir}/[A-Z]* %exclude %{geminstdir}/Rakefile # listed in lang file #%%{geminstdir}/data/ %{geminstdir}/lib/ %{geminstdir}/rails*/ %{gemdir}/cache/%{gemname}-%{version}.gem %{gemdir}/specifications/%{gemname}-%{version}.gemspec %files doc -f al-admin.lang %defattr(-, root, root, -) %{geminstdir}/Rakefile %{geminstdir}/benchmark/ # listed in lang file #%%{geminstdir}/examples/ %{geminstdir}/po/ %{geminstdir}/test*/ %{gemdir}/doc/%{gemname}-%{version}/ %changelog * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Sat Sep 11 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.2.2-1 - Update to 1.2.2 - Split out document files * Mon Feb 15 2010 Darryl L. Pierce <dpierce@redhat.com> - 1.2.1-1 - Upgraded dependency on rubygem-activerecord to >= 2.3.5. - Upgraded dependency on rubygem-locale to >= 2.0.5. - Upgraded dependency on rubygem-gettext to >= 2.1.0. - Upgraded dependency on rubygem-gettext_activerecord to >= 2.1.0. - Upgraded dependency on rubygem-hoe to >= 2.4.0 - Release 1.2.1 of ActiveLDAP. * Fri Dec 4 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.2.0-4 - Change the dependency against locale/gettext/active* from "strictly equal (=)" to "not less than (>=)" (bug 542917) * Tue Sep 22 2009 Darryl L. Pierce <dpierce@redhat.com> - 1.2.0-1 - Release 1.2.0 of ActiveLDAP. - Changed dependency on rubygem-activerecord to be >= 2.3.4 - Changed dependency on rubygem-hoe to be >= 2.3.3 - Added new l12n files to spec. * Thu Jul 30 2009 Darryl L. Pierce <dpierce@redhat.com> - 1.1.0-3 - Changed dependency on rubygem-activerecord to be >= 2.3.2. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Mon Jul 20 2009 Darryl L. Pierce <dpierce@redhat.com> - 1.1.0-1 - Release 1.1.0 of ActiveLdap. - Dependency on rubygem-hoe changed to 2.3.2. - Dependency on rubygem-activerecord changed to 2.3.2. - Dependency on rubygem-locale added. - Dependency on rubygem-gettext added. - Dependency on rubygem-gettext_activerecord added. * Fri Jun 5 2009 Darryl L. Pierce <dpierce@redhat.com> - 1.0.9-1 - Release 1.0.9 of ActiveLdap. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Mon Feb 23 2009 Darryl L. Pierce <dpierce@redhat.com> - 1.0.2-1 - Release 1.0.2 of ActiveLdap. * Tue Jun 17 2008 Darryl L. Pierce <dpierce@redhat.com> - 1.0.1-1 - Release 1.0.1 of the gem. * Mon Jun 09 2008 Darryl L. Pierce <dpierce@redhat.com> - 1.0.0-1 - Release 1.0.0 of the gem. * Thu May 15 2008 Darryl L. Pierce <dpierce@redhat.com> - 0.10.0-10 - First official build for rawhide. * Mon May 12 2008 Darryl L. Pierce <dpierce@redaht.com> - 0.10.0-9 - First build updated for Fedora. * Tue Apr 29 2008 Darryl L. Pierce <dpierce@redhat.com> - 0.10.0-8 - Missed a script. * Tue Apr 29 2008 Darryl L. Pierce <dpierce@redhat.com> - 0.10.0-7 - Fixing three scripts to be executable. * Tue Apr 29 2008 Darryl L. Pierce <dpierce@redhat.com> - 0.10.0-6 - Fixed the shebang in all scripts to remove an implied dependency on /usr/bin/ruby1.8 * Mon Apr 28 2008 Darryl L. Pierce <dpierce@redhat.com> - 0.10.0-5 - Added requirement for ruby-ldap * Mon Apr 28 2008 Darryl L. Pierce <dpierce@redhat.com> - 0.10.0-4 - Moved all macro definitions to the top of the spec file. * Mon Apr 28 2008 Darryl L. Pierce <dpierce@redhat.com> - 0.10.0-3 - Modified the spec to fix rpmlint errors * Mon Apr 28 2008 Darryl L. Pierce <dpierce@redhat.com> - 0.10.0-2 - Fixed the spec file to comply with packaging guidelines * Fri Apr 18 2008 Darryl L. Pierce <dpierce@redhat.com> - 0.10.0-1 - Initial package