update to 1.4.0
switch to cmake add upstream patch for lib64
This commit is contained in:
parent
9db7c0ca16
commit
77b9bf3344
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@ libzip-0.9.3.tar.bz2
|
||||
/libzip-1.2.0.tar.xz
|
||||
/libzip-1.3.0.tar.xz
|
||||
/libzip-1.3.2.tar.xz
|
||||
/libzip-1.4.0.tar.xz
|
||||
|
||||
13
libzip-rpath.patch
Normal file
13
libzip-rpath.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff -up ./CMakeLists.txt.rpm ./CMakeLists.txt
|
||||
--- ./CMakeLists.txt.rpm 2017-12-30 07:46:53.988134130 +0100
|
||||
+++ ./CMakeLists.txt 2017-12-30 07:47:03.787185954 +0100
|
||||
@@ -139,9 +139,6 @@ endif(CMAKE_SYSTEM_NAME MATCHES WindowsP
|
||||
|
||||
ADD_DEFINITIONS("-DHAVE_CONFIG_H")
|
||||
|
||||
-# rpath handling: use rpath in installed binaries
|
||||
-SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
||||
-SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
# Testing
|
||||
ENABLE_TESTING()
|
||||
140
libzip-upstream.patch
Normal file
140
libzip-upstream.patch
Normal file
@ -0,0 +1,140 @@
|
||||
From 42a3c4a40b9925b8ef0fb8f38b200fdc9f6fe5a4 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Klausner <tk@giga.or.at>
|
||||
Date: Fri, 29 Dec 2017 22:29:37 +0100
|
||||
Subject: [PATCH] Use GNUInstallDirs variables to allow installation
|
||||
customization.
|
||||
|
||||
---
|
||||
CMakeLists.txt | 13 ++++++-------
|
||||
lib/CMakeLists.txt | 8 ++++----
|
||||
src/CMakeLists.txt | 6 +++---
|
||||
3 files changed, 13 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 69cdb8b..b61f5ea 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,6 +1,5 @@
|
||||
# TODO:
|
||||
-# 1. Problems generating html pages.
|
||||
-# 2. create usable libtool .la file
|
||||
+# create usable libtool .la file
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2)
|
||||
|
||||
@@ -141,7 +140,7 @@ endif(CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES Window
|
||||
ADD_DEFINITIONS("-DHAVE_CONFIG_H")
|
||||
|
||||
# rpath handling: use rpath in installed binaries
|
||||
-SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
+SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
||||
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
# Testing
|
||||
@@ -157,8 +156,8 @@ ADD_SUBDIRECTORY(examples)
|
||||
# pkgconfig file
|
||||
SET(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
SET(exec_prefix \${prefix})
|
||||
-SET(libdir \${exec_prefix}/lib)
|
||||
-SET(includedir \${prefix}/include)
|
||||
+SET(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR})
|
||||
+SET(includedir \${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
|
||||
IF(BZIP2_FOUND)
|
||||
SET(LIBS "${LIBS} -lbz2")
|
||||
ENDIF()
|
||||
@@ -167,7 +166,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES BSD)
|
||||
SET(PKG_CONFIG_RPATH "-Wl,-R\${libdir}")
|
||||
ENDIF(CMAKE_SYSTEM_NAME MATCHES BSD)
|
||||
CONFIGURE_FILE(libzip.pc.in libzip.pc @ONLY)
|
||||
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libzip.pc DESTINATION lib/pkgconfig)
|
||||
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libzip.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
|
||||
# write out config file
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
@@ -188,4 +187,4 @@ FILE(COPY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/runtest
|
||||
|
||||
# installation
|
||||
|
||||
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/zipconf.h DESTINATION include)
|
||||
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/zipconf.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
|
||||
index 855ccf5..ecbb45e 100644
|
||||
--- a/lib/CMakeLists.txt
|
||||
+++ b/lib/CMakeLists.txt
|
||||
@@ -1,6 +1,6 @@
|
||||
INCLUDE(CheckFunctionExists)
|
||||
|
||||
-INSTALL(FILES zip.h DESTINATION include)
|
||||
+INSTALL(FILES zip.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
||||
# from http://www.cmake.org/Wiki/CMakeMacroLibtoolFile
|
||||
MACRO(GET_TARGET_PROPERTY_WITH_DEFAULT _variable _target _property _default_value)
|
||||
@@ -203,7 +203,7 @@ ADD_LIBRARY(zip ${LIBZIP_SOURCES} ${LIBZIP_EXTRA_FILES} ${LIBZIP_OPSYS_FILES})
|
||||
SET_TARGET_PROPERTIES(zip PROPERTIES VERSION 5.0 SOVERSION 5)
|
||||
TARGET_LINK_LIBRARIES(zip ${ZLIB_LIBRARY} ${OPTIONAL_LIBRARY})
|
||||
INSTALL(TARGETS zip
|
||||
- RUNTIME DESTINATION bin
|
||||
- ARCHIVE DESTINATION lib
|
||||
- LIBRARY DESTINATION lib)
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
#CREATE_LIBTOOL_FILE(zip lib)
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 2a3f4d2..ccc8f7e 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -8,12 +8,12 @@ ENDIF(NOT HAVE_GETOPT)
|
||||
|
||||
ADD_EXECUTABLE(zipcmp zipcmp.c ${SRC_EXTRA_FILES})
|
||||
TARGET_LINK_LIBRARIES(zipcmp zip)
|
||||
-INSTALL(TARGETS zipcmp RUNTIME DESTINATION bin)
|
||||
+INSTALL(TARGETS zipcmp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
ADD_EXECUTABLE(zipmerge zipmerge.c ${SRC_EXTRA_FILES})
|
||||
TARGET_LINK_LIBRARIES(zipmerge zip)
|
||||
-INSTALL(TARGETS zipmerge RUNTIME DESTINATION bin)
|
||||
+INSTALL(TARGETS zipmerge RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
ADD_EXECUTABLE(ziptool ziptool.c ${SRC_EXTRA_FILES})
|
||||
TARGET_LINK_LIBRARIES(ziptool zip)
|
||||
-INSTALL(TARGETS ziptool RUNTIME DESTINATION bin)
|
||||
+INSTALL(TARGETS ziptool RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
From 3a7497b791289e316aa794b7f2f1a95dd26ced26 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Klausner <tk@giga.or.at>
|
||||
Date: Fri, 29 Dec 2017 22:35:53 +0100
|
||||
Subject: [PATCH] Set bindir in pkgconfig file and use it.
|
||||
|
||||
---
|
||||
CMakeLists.txt | 1 +
|
||||
libzip.pc.in | 3 ++-
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b61f5ea..3366b25 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -156,6 +156,7 @@ ADD_SUBDIRECTORY(examples)
|
||||
# pkgconfig file
|
||||
SET(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
SET(exec_prefix \${prefix})
|
||||
+SET(bindir \${exec_prefix}/${CMAKE_INSTALL_BINDIR})
|
||||
SET(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR})
|
||||
SET(includedir \${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
|
||||
IF(BZIP2_FOUND)
|
||||
diff --git a/libzip.pc.in b/libzip.pc.in
|
||||
index 53abc47..7be7f3e 100644
|
||||
--- a/libzip.pc.in
|
||||
+++ b/libzip.pc.in
|
||||
@@ -1,9 +1,10 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
+bindir=@bindir@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
-zipcmp=@prefix@/bin/zipcmp
|
||||
+zipcmp=@bindir@/zipcmp
|
||||
|
||||
Name: libzip
|
||||
Description: library for handling zip archives
|
||||
28
libzip.spec
28
libzip.spec
@ -1,7 +1,7 @@
|
||||
%global with_tests 0%{!?_without_tests:1}
|
||||
|
||||
Name: libzip
|
||||
Version: 1.3.2
|
||||
Version: 1.4.0
|
||||
Release: 1%{?dist}
|
||||
Summary: C library for reading, creating, and modifying zip archives
|
||||
|
||||
@ -9,11 +9,17 @@ License: BSD
|
||||
URL: https://libzip.org/
|
||||
Source0: https://libzip.org/download/libzip-%{version}.tar.xz
|
||||
|
||||
# allow path customization (lib64)
|
||||
Patch0: libzip-upstream.patch
|
||||
# drop RPATH from installed binaries
|
||||
Patch1: libzip-rpath.patch
|
||||
|
||||
# specific AES crypto for WinZip compatibility
|
||||
Provides: bundled(gladman-fcrypt)
|
||||
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: bzip2-devel
|
||||
BuildRequires: cmake >= 3.0.2
|
||||
# Needed to run the test suite
|
||||
# find regress/ -type f | /usr/lib/rpm/perl.req
|
||||
# find regress/ -type f | /usr/lib/rpm/perl.prov
|
||||
@ -60,16 +66,12 @@ The %{name}-tools package provides command line tools split off %{name}:
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
# Avoid lib64 rpaths (FIXME: recheck this on newer releases)
|
||||
%if "%{_libdir}" != "/usr/lib"
|
||||
sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure
|
||||
#autoreconf -f -i
|
||||
%endif
|
||||
# unwanted in package documentation
|
||||
rm INSTALL.md
|
||||
|
||||
|
||||
%build
|
||||
%configure \
|
||||
--disable-static
|
||||
%cmake .
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
@ -77,9 +79,6 @@ make %{?_smp_mflags}
|
||||
%install
|
||||
make install DESTDIR=%{buildroot} INSTALL='install -p'
|
||||
|
||||
## unpackaged files
|
||||
rm -fv %{buildroot}%{_libdir}/lib*.la
|
||||
|
||||
|
||||
%check
|
||||
%if %{with_tests}
|
||||
@ -104,7 +103,7 @@ make check
|
||||
%{_mandir}/man1/zip*
|
||||
|
||||
%files devel
|
||||
%doc API-CHANGES AUTHORS THANKS *.md
|
||||
%doc AUTHORS THANKS *.md
|
||||
%{_includedir}/zip.h
|
||||
%{_includedir}/zipconf*.h
|
||||
%{_libdir}/libzip.so
|
||||
@ -115,6 +114,11 @@ make check
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Dec 30 2017 Remi Collet <remi@remirepo.net> - 1.4.0-1
|
||||
- update to 1.4.0
|
||||
- switch to cmake
|
||||
- add upstream patch for lib64
|
||||
|
||||
* Mon Nov 20 2017 Remi Collet <remi@remirepo.net> - 1.3.2-1
|
||||
- update to 1.3.2
|
||||
- drop multilib header hack
|
||||
|
||||
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (libzip-1.3.2.tar.xz) = d7b678c4a39f7bc33f90febac1b42230eac4d414e835dab7d3458a81f047482cee9ee65b6374bdf8abbf5a33c23725e8771da51300ba92ddc6728b570caec255
|
||||
SHA512 (libzip-1.4.0.tar.xz) = 125e4de8b02781023f9bed450747b9c36942cbf41de7a863402786d1c7b848e19b425f4b0c26ab3857c6bbfd8571bcd9cb1434df355c59148db54f1b951f5c56
|
||||
|
||||
Loading…
Reference in New Issue
Block a user