Update to 1.0.0

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Raits 2020-04-15 08:51:48 +02:00
parent 984d3f2cf1
commit f37fab884c
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C
4 changed files with 7 additions and 89 deletions

1
.gitignore vendored
View File

@ -34,3 +34,4 @@
/libgit2-0.28.3.tar.gz
/libgit2-0.28.4.tar.gz
/libgit2-0.99.0.tar.gz
/libgit2-1.0.0.tar.gz

View File

@ -1,81 +0,0 @@
From fbda0575b133a57d8f5d264742098994c7624c99 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= <kloczko.tomasz@gmail.com>
Date: Wed, 19 Feb 2020 12:54:19 +0000
Subject: [PATCH] Fix #5410: fix installing libgit2.pc in wrong location
Remove using custom PKG_BUILD_PREFIu, PKG_BUILD_LIBDIR and
PKG_BUILD_INCLUDEDIR variables.
Use cmake CMAKE_INSTALL_PREFIX, LIB_INSTALL_DIR, INCLUDE_INSTALL_DIR instead.
This patch fixes install libgit2.pc file in correct location and simpifies
cmake module.
---
cmake/Modules/PkgBuildConfig.cmake | 39 +++---------------------------
1 file changed, 4 insertions(+), 35 deletions(-)
diff --git a/cmake/Modules/PkgBuildConfig.cmake b/cmake/Modules/PkgBuildConfig.cmake
index 1c0079eb0..e4c574431 100644
--- a/cmake/Modules/PkgBuildConfig.cmake
+++ b/cmake/Modules/PkgBuildConfig.cmake
@@ -1,10 +1,5 @@
# pkg-config file generation
#
-# Uses the following globals:
-# - PKG_BUILD_PREFIX: the build location (aka prefix). Defaults to CMAKE_INSTALL_PREFIX
-# - PKG_BUILD_LIBDIR: the libdir location. Defaults to ${prefix}/lib.
-# - PKG_BUILD_INCLUDEDIR: the includedir location. Defaults to ${prefix}/include.
-#
function(pkg_build_config)
set(options)
@@ -29,37 +24,11 @@ function(pkg_build_config)
message(FATAL_ERROR "Missing VERSION argument")
endif()
- if (DEFINED PKG_BUILD_PREFIX)
- set(PKGCONFIG_PREFIX "${PKG_BUILD_PREFIX}")
- else()
- set(PKGCONFIG_PREFIX "${CMAKE_INSTALL_PREFIX}")
- endif()
-
- if(DEFINED PKG_BUILD_LIBDIR)
- if (IS_ABSOLUTE ${PKG_BUILD_LIBDIR})
- set(PKGCONFIG_LIBDIR ${PKG_BUILD_LIBDIR})
- else()
- set(PKGCONFIG_LIBDIR "\${prefix}/${PKG_BUILD_LIBDIR}")
- endif()
- else()
- set(PKGCONFIG_LIBDIR "\${prefix}/lib")
- endif()
-
- if(DEFINED PKG_BUILD_INCLUDEDIR)
- if (IS_ABSOLUTE ${PKG_BUILD_INCLUDEDIR})
- set(PKGCONFIG_INCLUDEDIR ${PKG_BUILD_INCLUDEDIR})
- else()
- set(PKGCONFIG_INCLUDEDIR "\${prefix}/${PKG_BUILD_INCLUDEDIR}")
- endif()
- else()
- set(PKGCONFIG_INCLUDEDIR "\${prefix}/include")
- endif()
-
# Write .pc "header"
file(WRITE "${PKGCONFIG_FILE}"
- "prefix=\"${PKGCONFIG_PREFIX}\"\n"
- "libdir=\"${PKGCONFIG_LIBDIR}\"\n"
- "includedir=\"${PKGCONFIG_INCLUDEDIR}\"\n"
+ "prefix=\"${CMAKE_INSTALL_PREFIX}\"\n"
+ "libdir=\"${LIB_INSTALL_DIR}\"\n"
+ "includedir=\"${INCLUDE_INSTALL_DIR}\"\n"
"\n"
"Name: ${PKGCONFIG_NAME}\n"
"Description: ${PKGCONFIG_DESCRIPTION}\n"
@@ -105,6 +74,6 @@ function(pkg_build_config)
# Install .pc file
install(FILES "${PKGCONFIG_FILE}"
- DESTINATION "${PKGCONFIG_PREFIX}/${PKGCONFIG_LIBDIR}/pkgconfig"
+ DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
)
endfunction()
--
2.25.1

View File

@ -1,11 +1,10 @@
Name: libgit2
Version: 0.99.0
Release: 2%{?dist}
Version: 1.0.0
Release: 1%{?dist}
Summary: C implementation of the Git core methods as a library with a solid API
License: GPLv2 with exceptions
URL: https://libgit2.org/
Source0: https://github.com/libgit2/libgit2/archive/v%{version}/%{name}-%{version}.tar.gz
Patch0001: 0001-Fix-5410-fix-installing-libgit2.pc-in-wrong-location.patch
BuildRequires: gcc
BuildRequires: cmake >= 3.5.1
@ -18,7 +17,6 @@ BuildRequires: pcre2-devel
BuildRequires: python3
BuildRequires: zlib-devel
Provides: bundled(libxdiff)
Obsoletes: libgit2_0.28 < 0.28.3-2
%description
libgit2 is a portable, pure C implementation of the Git core methods
@ -29,7 +27,6 @@ with bindings.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: libgit2_0.28-devel < 0.28.3-2
%description devel
This package contains libraries and header files for
@ -38,8 +35,6 @@ developing applications that use %{name}.
%prep
%autosetup -p1
sed -i -e '/LIBGIT2_PC_REQUIRES/s/libpcre2/libpcre2-8/' src/CMakeLists.txt
# Remove VCS files from examples
find examples -name ".gitignore" -delete -print
@ -79,6 +74,9 @@ rm -vr deps
%{_includedir}/git2/
%changelog
* Wed Apr 15 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.0.0-1
- Update to 1.0.0
* Tue Mar 03 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.99.0-2
- Fix broken deps for pcre2

View File

@ -1 +1 @@
SHA512 (libgit2-0.99.0.tar.gz) = e38e18da0e6ed1e5c8198c9eb2c362b21da2d0b9c8bc23309d2f70183549f4b9f23a6db8ce5f1f0f24b373e6427039c2a845b62dd74f91b02cfe8954f961a91b
SHA512 (libgit2-1.0.0.tar.gz) = 7e3b6582dd1567fd5ebfc829a98e22acfd5566ba08f2fb9b7a6783fa87f5e8952ac67f1a2c13adb543e56753d858e73a03204bac17a096c72f5daf4ba376d904