commit ec145563124ff2d9941255b61acbdd260146fe12 Author: Russell Harrison rharriso@redhat.com Date: Sun Aug 26 17:03:14 2012 -0400
Initial Commit
rubygem-puppet-lint.spec | 101 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 101 insertions(+), 0 deletions(-) --- diff --git a/rubygem-puppet-lint.spec b/rubygem-puppet-lint.spec new file mode 100644 index 0000000..922ad15 --- /dev/null +++ b/rubygem-puppet-lint.spec @@ -0,0 +1,101 @@ +# Generated from puppet-lint-0.2.0.gem by gem2rpm -*- rpm-spec -*- +%global gem_name puppet-lint +%global rubyabi 1.9.1 + +Summary: Ensure your Puppet manifests conform with the Puppetlabs style guide +Name: rubygem-%{gem_name} +Version: 0.2.0 +Release: 1%{?dist} +Group: Development/Languages +License: MIT +URL: https://github.com/rodjek/puppet-lint/ +Source0: http://rubygems.org/gems/%%7Bgem_name%7D-%%7Bversion%7D.gem +# https://github.com/rodjek/puppet-lint/pull/98 +#Patch0: %{name}-0002-apply-bug-fix-from-comment-on-issue-81.patch +Requires: ruby(abi) = %{rubyabi} +Requires: ruby(rubygems) +Requires: puppet +BuildRequires: ruby(abi) = %{rubyabi} +BuildRequires: rubygems-devel +BuildRequires: ruby +BuildRequires: rubygem(rdoc) +BuildRequires: rubygem(rspec-core) +BuildArch: noarch +Provides: rubygem(%{gem_name}) = %{version} + +%description +Checks your Puppet manifests against the Puppetlabs +style guide and alerts you to any discrepancies. + + +%package doc +Summary: Documentation for %{name} +Group: Documentation +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{name} + +%prep +gem unpack %{SOURCE0} + +%setup -q -D -T -n %{gem_name}-%{version} + +gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec + +#%patch0 -p1 + +%build +mkdir -p .%{gem_dir} + +# Create the gem as gem install only works on a gem file +gem build %{gem_name}.gemspec + + +# gem install installs into a directory. We set that to be a local +# directory so that we can move it into the buildroot in install +gem install --local --install-dir ./%{gem_dir} \ + --bindir ./%{_bindir} \ + --force --rdoc %{SOURCE0} + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a ./%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + + +mkdir -p %{buildroot}%{_bindir} +cp -a ./%{_bindir}/* \ + %{buildroot}%{_bindir}/ + +find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x + +rm -f %{buildroot}/%{gem_instdir}/%{gem_name}.gemspec +rm -f %{buildroot}/%{gem_instdir}/.gitignore + +%check +cd %{buildroot}%{gem_instdir} +rake spec + +%files +%dir %{gem_instdir} +%{_bindir}/puppet-lint +%{gem_instdir}/bin +%{gem_libdir} +%{gem_instdir}/spec +%{gem_instdir}/.travis.yml +%{gem_instdir}/Gemfile +%{gem_instdir}/Rakefile +%doc %{gem_instdir}/README.md +%doc %{gem_instdir}/LICENSE +%exclude %{gem_cache} +%{gem_spec} + +%files doc +%doc %{gem_docdir} + +%changelog +* Sun Aug 26 2012 Russell Harrison rharrison@fedoraproject.org - 0.2.0-1 +- Initial package +