d3af3a5
Name: libgit2
fe4e349
Version: 0.19.0
808259a
Release: 2%{?dist}
d3af3a5
Summary: A C implementation of the Git core methods as a library
d3af3a5
d3af3a5
License: GPLv2 with exceptions
d3af3a5
URL: http://libgit2.github.com/
d3af3a5
Source0: https://github.com/libgit2/libgit2/archive/v%{version}.tar.gz
d3af3a5
d3af3a5
# Use system libxdiff
fe4e349
Patch0: libgit2-0.19.0-system-libxdiff.patch
d3af3a5
5ba7399
# Add htonl() and friends declarations on non-x86 arches
fe4e349
Patch1: libgit2-0.19.0-non-x86.patch
5ba7399
d3af3a5
BuildRequires: cmake >= 2.6
d3af3a5
BuildRequires: http-parser-devel
d3af3a5
BuildRequires: libxdiff-devel
d3af3a5
BuildRequires: openssl-devel
d3af3a5
BuildRequires: python
d3af3a5
BuildRequires: zlib-devel
d3af3a5
d3af3a5
%description
d3af3a5
libgit2 is a portable, pure C implementation of the Git core methods 
d3af3a5
provided as a re-entrant linkable library with a solid API, allowing
d3af3a5
you to write native speed custom Git applications in any language
d3af3a5
with bindings.
d3af3a5
d3af3a5
d3af3a5
%package devel
d3af3a5
Summary: Development files for %{name}
d3af3a5
Requires: %{name}%{?_isa} = %{version}-%{release}
d3af3a5
d3af3a5
%description devel
d3af3a5
The %{name}-devel package contains libraries and header files for
d3af3a5
developing applications that use %{name}.
d3af3a5
d3af3a5
d3af3a5
%prep
d3af3a5
%setup -q
d3af3a5
# Remove VCS files from examples
d3af3a5
find examples -name ".gitignore" -delete
d3af3a5
d3af3a5
# Apply patches
fe4e349
%patch0 -p1 -b .system-libxdiff
fe4e349
%patch1 -p1 -b .non-x86
d3af3a5
d3af3a5
# Fix pkgconfig generation
d3af3a5
sed -i 's|@CMAKE_INSTALL_PREFIX@/||' libgit2.pc.in
d3af3a5
d3af3a5
# Don't test network
d3af3a5
sed -i 's/ionline/xonline/' CMakeLists.txt
d3af3a5
d3af3a5
# Remove bundled libraries
d3af3a5
rm -rf deps
d3af3a5
rm -rf src/xdiff
d3af3a5
d3af3a5
d3af3a5
%build
d3af3a5
%cmake .
d3af3a5
make %{_smp_mflags}
d3af3a5
d3af3a5
d3af3a5
%check
d3af3a5
ctest -V
d3af3a5
d3af3a5
d3af3a5
%install
d3af3a5
make install DESTDIR=%{buildroot}
d3af3a5
d3af3a5
d3af3a5
%post -p /sbin/ldconfig
d3af3a5
%postun -p /sbin/ldconfig
d3af3a5
d3af3a5
d3af3a5
%files
d3af3a5
%doc README.md COPYING AUTHORS
d3af3a5
%{_libdir}/libgit2.so.*
d3af3a5
d3af3a5
d3af3a5
%files devel
d3af3a5
%doc docs examples
d3af3a5
%{_libdir}/libgit2.so
d3af3a5
%{_libdir}/pkgconfig/libgit2.pc
d3af3a5
%{_includedir}/git2*
d3af3a5
d3af3a5
d3af3a5
%changelog
808259a
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.19.0-2
808259a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
808259a
fe4e349
* Tue Jun 25 2013 Veeti Paananen <veeti.paananen@rojekti.fi> - 0.19.0-1
fe4e349
- 0.19.0
fe4e349
5ba7399
* Wed Jun 19 2013 Dan HorĂ¡k <dan[at]danny.cz> - 0.18.0-5
5ba7399
- Add htonl() and friends declarations on non-x86 arches
5ba7399
- Rebuilt with fixed libxdiff for big endian arches
5ba7399
d3af3a5
* Thu May 30 2013 Veeti Paananen <veeti.paananen@rojekti.fi> - 0.18.0-4
d3af3a5
- Update the http-parser patch
d3af3a5
- Skip tests that require network connectivity
d3af3a5
d3af3a5
* Thu May 30 2013 Tom Callaway <spot@fedoraproject.org> - 0.18.0-3
d3af3a5
- use system libxdiff instead of bundled copy
d3af3a5
d3af3a5
* Fri May 24 2013 Veeti Paananen <veeti.paananen@rojekti.fi> - 0.18.0-2
d3af3a5
- Remove unnecessary CMake build flags
d3af3a5
- Fix the pkgconfig file
d3af3a5
d3af3a5
* Thu May 02 2013 Veeti Paananen <veeti.paananen@rojekti.fi> - 0.18.0-1
d3af3a5
- Update to version 0.18.0
d3af3a5
- Unbundle the http-parser library
d3af3a5
d3af3a5
* Fri Oct 19 2012 Veeti Paananen <veeti.paananen@rojekti.fi> - 0.17.0-2
d3af3a5
- Use make for building and installation
d3af3a5
- Specify minimum CMake version
d3af3a5
- Remove useless OpenSSL build dependency
d3af3a5
- Move development documentation to the -devel package
d3af3a5
- Add code examples to the -devel package
d3af3a5
d3af3a5
* Thu Oct 18 2012 Veeti Paananen <veeti.paananen@rojekti.fi> - 0.17.0-1
d3af3a5
- Initial package.