summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2008-06-24 19:01:38 -0400
committerBrenton Leanhardt <bleanhar@redhat.com>2008-06-24 19:01:38 -0400
commitebc128bba254a6574b8c074b318e42541f9d6bd7 (patch)
tree47c985acd85d7d70260229f241d9dad052d55a70
parente0b3c363b11b27499be327d162156ddb534e2e48 (diff)
downloadthird_party-ruby-git-ebc128bba254a6574b8c074b318e42541f9d6bd7.zip
third_party-ruby-git-ebc128bba254a6574b8c074b318e42541f9d6bd7.tar.gz
third_party-ruby-git-ebc128bba254a6574b8c074b318e42541f9d6bd7.tar.xz
[INTERNAL ONLY] Adding RPM related stuff
-rw-r--r--Makefile35
-rw-r--r--extra/git.spec48
-rw-r--r--ruby-git.gemspec4
3 files changed, 85 insertions, 2 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..11dde72
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,35 @@
+NAME := git
+SPECFILE = extra/$(NAME).spec
+VERSION := $(shell rpm -q --qf "%{VERSION}\n" --specfile $(SPECFILE)| head -1)
+RELEASE := $(shell rpm -q --qf "%{RELEASE}\n" --specfile $(SPECFILE)| head -1)
+UPSTREAM_NAME = $(PROJECT)
+
+TAG = $(subst .,_,$(NAME)-$(VERSION)-$(RELEASE))
+
+CVS = cvs
+RPMBUILD = rpmbuild
+INSTALL = /usr/bin/install
+INSTALL_DIR = $(INSTALL) --verbose -d -m 755
+
+RPM_TOPDIR = /tmp/$(NAME)-$(VERSION)-$(RELEASE)-build
+_RPM_OPTS = --define "_topdir $(RPM_TOPDIR)" \
+ --define "_builddir %{_topdir}" \
+ --define "_sourcedir $(shell pwd)/pkg" \
+ --define "_specdir $(shell pwd)" \
+ --define "_rpmdir $(shell pwd)" \
+ --define "_srcrpmdir $(shell pwd)" \
+ --define '_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'
+RPM_OPTS = $(strip $(_RPM_OPTS))
+
+rpm: clean gem $(RPM_TOPDIR) $(SPECFILE)
+ $(RPMBUILD) --clean $(RPM_OPTS) -bb $(SPECFILE)
+
+gem:
+ rake package
+
+clean:
+ @rm -rfv *~ *.rpm $(RPM_TOPDIR) $(ARCHIVE)
+ rake clobber package
+
+$(RPM_TOPDIR):
+ @$(INSTALL_DIR) $@
diff --git a/extra/git.spec b/extra/git.spec
new file mode 100644
index 0000000..0f749a3
--- /dev/null
+++ b/extra/git.spec
@@ -0,0 +1,48 @@
+%define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
+%define gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
+%define gemname git
+%define geminstdir %{gemdir}/gems/%{gemname}-%{version}
+
+Summary: A package for using Git in Ruby code
+Name: rubygem-%{gemname}
+Version: 1.0.7.1
+Release: 1%{?dist}
+Group: Development/Languages
+License: MIT
+URL: http://git.rubyforge.org/
+Source0: %{gemname}-%{version}.gem
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Requires: rubygems
+BuildRequires: rubygems
+BuildArch: noarch
+Provides: rubygem(%{gemname}) = %{version}
+
+%description
+A package for using Git in Ruby code.
+
+
+%prep
+
+%build
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{gemdir}
+gem install --local --install-dir %{buildroot}%{gemdir} \
+ --force --rdoc %{SOURCE0}
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-, root, root, -)
+%{gemdir}/gems/%{gemname}-%{version}/
+%doc %{gemdir}/doc/%{gemname}-%{version}
+%doc %{geminstdir}/README
+%{gemdir}/cache/%{gemname}-%{version}.gem
+%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+
+
+%changelog
+* Tue Jun 24 2008 <bleanhar@redhat.com> - 1.0.7.1-1
+- Initial package
diff --git a/ruby-git.gemspec b/ruby-git.gemspec
index 264bdec..eb8c1ea 100644
--- a/ruby-git.gemspec
+++ b/ruby-git.gemspec
@@ -1,11 +1,11 @@
spec = Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = "git"
- s.version = "1.0.7"
+ s.version = "1.0.7.1"
s.author = "Scott Chacon"
s.email = "schacon@gmail.com"
s.summary = "A package for using Git in Ruby code."
- s.files = ["lib/git", "lib/git/author.rb", "lib/git/base.rb", "lib/git/branch.rb", "lib/git/branches.rb", "lib/git/diff.rb", "lib/git/index.rb", "lib/git/lib.rb", "lib/git/log.rb", "lib/git/object.rb", "lib/git/path.rb", "lib/git/remote.rb", "lib/git/repository.rb", "lib/git/stash.rb", "lib/git/stashes.rb", "lib/git/status.rb", "lib/git/working_directory.rb", "lib/git.rb"]
+ s.files = ["lib/git", "lib/git/author.rb", "lib/git/base.rb", "lib/git/branch.rb", "lib/git/branches.rb", "lib/git/diff.rb", "lib/git/index.rb", "lib/git/lib.rb", "lib/git/log.rb", "lib/git/object.rb", "lib/git/path.rb", "lib/git/remote.rb", "lib/git/repository.rb", "lib/git/stash.rb", "lib/git/stashes.rb", "lib/git/status.rb", "lib/git/working_directory.rb", "lib/git.rb", "extra/git.spec"]
s.require_path = "lib"
s.autorequire = "git"
s.test_files = Dir.glob('tests/*.rb')