3 %bcond_with tests # build without tests
6 Summary: Rugged is a Ruby binding to the libgit2 library
11 Group: Development/Languages
12 Source0: https://rubygems.org/gems/%{pkgname}-%{version}.gem
13 # Source0-md5: 9f86c5a2801b6727aa88a302dc018a2f
14 URL: https://github.com/libgit2/rugged
16 BuildRequires: git-core
17 BuildRequires: gmp-devel
18 BuildRequires: libgit2-devel
19 BuildRequires: rpm-rubyprov
20 BuildRequires: ruby-devel
21 BuildRequires: ruby-minitest
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 Rugged is a Ruby bindings to the libgit2 C Git library. This is for
26 testing and using the libgit2 library in a language that is awesome.
29 Summary: Documentation for %{name}
31 Requires: %{name} = %{version}-%{release}
32 %if "%{_rpmversion}" >= "5"
37 Documentation for %{name}
40 %setup -q -n %{pkgname}-%{version}
44 # The build system requres libgit2's version.h to be present, and defaults to
45 # using the vendor'd copy. Use the system copy instead.
46 sed -i -e 's|LIBGIT2_DIR = .*|LIBGIT2_DIR = "/usr"|' ext/rugged/extconf.rb
52 export CONFIGURE_ARGS="--with-cflags='%{rpmcflags}' --use-system-libraries"
57 LDFLAGS="%{rpmldflags}" \
58 CFLAGS="%{rpmcflags} -fPIC"
61 export LANG="en_US.UTF-8"
62 git config --global user.name John Doe
63 # Comment out the test until we get the minitest/autorun figured out
64 #testrb -Ilib test/*test.rb
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_vendorarchdir}/%{pkgname},%{ruby_specdir}}
70 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
71 install -p ext/%{pkgname}/*.so $RPM_BUILD_ROOT%{ruby_vendorarchdir}/%{pkgname}
72 cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
75 rm -rf $RPM_BUILD_ROOT
78 %defattr(644,root,root,755)
79 %doc README.md LICENSE
80 %{ruby_vendorlibdir}/%{pkgname}.rb
81 %dir %{ruby_vendorlibdir}/%{pkgname}
82 %{ruby_vendorlibdir}/%{pkgname}/*.rb
83 %{ruby_vendorlibdir}/%{pkgname}/diff
84 %dir %{ruby_vendorarchdir}/rugged
85 %attr(755,root,root) %{ruby_vendorarchdir}/rugged/rugged.so
86 %{ruby_specdir}/%{pkgname}-%{version}.gemspec