diff --git a/quazip-0.7.2-fix_static.patch b/quazip-0.7.2-fix_static.patch new file mode 100644 index 0000000..60ec615 --- /dev/null +++ b/quazip-0.7.2-fix_static.patch @@ -0,0 +1,26 @@ +diff -up quazip-0.7.2/quazip/CMakeLists.txt.orig quazip-0.7.2/quazip/CMakeLists.txt +--- quazip-0.7.2/quazip/CMakeLists.txt.orig 2016-01-03 07:01:40.000000000 +0100 ++++ quazip-0.7.2/quazip/CMakeLists.txt 2016-04-27 14:07:12.492586196 +0200 +@@ -15,17 +15,17 @@ qt_wrap_cpp(MOC_SRCS ${PUBLIC_HEADERS}) + set(SRCS ${SRCS} ${MOC_SRCS}) + + add_library(${QUAZIP_LIB_TARGET_NAME} SHARED ${SRCS}) +-add_library(quazip_static STATIC ${SRCS}) ++#add_library(quazip_static STATIC ${SRCS}) + + # Windows uses .lib extension for both static and shared library + # *nix systems use different extensions for SHARED and STATIC library and by convention both libraries have the same name + if (NOT WIN32) +- set_target_properties(quazip_static PROPERTIES OUTPUT_NAME quazip${QUAZIP_LIB_VERSION_SUFFIX}) ++ set_target_properties(${QUAZIP_LIB_TARGET_NAME} PROPERTIES OUTPUT_NAME quazip${QUAZIP_LIB_VERSION_SUFFIX}) + endif () + +-set_target_properties(${QUAZIP_LIB_TARGET_NAME} quazip_static PROPERTIES VERSION 1.0.0 SOVERSION 1 DEBUG_POSTFIX d) ++set_target_properties(${QUAZIP_LIB_TARGET_NAME} PROPERTIES VERSION 1.0.0 SOVERSION 1 DEBUG_POSTFIX d) + # Link against ZLIB_LIBRARIES if needed (on Windows this variable is empty) +-target_link_libraries(${QUAZIP_LIB_TARGET_NAME} quazip_static ${QT_QTMAIN_LIBRARY} ${QTCORE_LIBRARIES} ${ZLIB_LIBRARIES}) ++target_link_libraries(${QUAZIP_LIB_TARGET_NAME} ${QT_QTMAIN_LIBRARY} ${QTCORE_LIBRARIES} ${ZLIB_LIBRARIES}) + + install(FILES ${PUBLIC_HEADERS} DESTINATION include/quazip${QUAZIP_LIB_VERSION_SUFFIX}) +-install(TARGETS ${QUAZIP_LIB_TARGET_NAME} quazip_static LIBRARY DESTINATION ${LIB_DESTINATION} ARCHIVE DESTINATION ${LIB_DESTINATION} RUNTIME DESTINATION ${LIB_DESTINATION}) ++install(TARGETS ${QUAZIP_LIB_TARGET_NAME} LIBRARY DESTINATION ${LIB_DESTINATION} ARCHIVE DESTINATION ${LIB_DESTINATION} RUNTIME DESTINATION ${LIB_DESTINATION}) diff --git a/quazip-0.7.3.tar.gz b/quazip-0.7.3.tar.gz new file mode 100644 index 0000000..24258bf Binary files /dev/null and b/quazip-0.7.3.tar.gz differ diff --git a/quazip-qt5.spec b/quazip-qt5.spec new file mode 100644 index 0000000..3db1e8b --- /dev/null +++ b/quazip-qt5.spec @@ -0,0 +1,81 @@ +%global srcname quazip + +Name: %{srcname}-qt5 +Version: 0.7.3 +Release: 1%{?dist} +Summary: Qt5 wrapper for the minizip library +License: LGPLv2+ +URL: http://quazip.sourceforge.net/ +Source0: http://downloads.sourceforge.net/%{srcname}/%{srcname}-%{version}.tar.gz +Patch0: quazip-0.7.2-fix_static.patch +BuildRequires: cmake3 +BuildRequires: zlib-devel +BuildRequires: qt5-qtbase-devel +BuildRequires: doxygen graphviz + + +%description +QuaZIP is a simple C++ wrapper over Gilles Vollant's ZIP/UNZIP package that +can be used to access ZIP archives. It uses Trolltech's Qt toolkit. + +QuaZIP allows you to access files inside ZIP archives using QIODevice API, +and - yes! - that means that you can also use QTextStream, QDataStream or +whatever you would like to use on your zipped files. + +QuaZIP provides complete abstraction of the ZIP/UNZIP API, for both reading +from and writing to ZIP archives. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: qt5-qtbase-devel%{?_isa} + +%description devel +The %{name}-devel package contains libraries, header files and documentation +for developing applications that use %{name}. + + +%prep +%setup -q -n %{srcname}-%{version} +%patch0 -p1 -b .orig + +%build +mkdir build-qt5 +pushd build-qt5 +%cmake3 .. -DBUILD_WITH_QT4:BOOL=OFF + +make %{?_smp_mflags} +popd + +doxygen Doxyfile +for file in doc/html/*; do + touch -r Doxyfile $file +done + +%install +make install/fast DESTDIR=%{buildroot} -C build-qt5 + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + + +%files +%license COPYING +%doc NEWS.txt README.txt +%{_libdir}/libquazip5.so.1* + +%files devel +%doc doc/html +%{_includedir}/quazip5/ +%{_libdir}/libquazip5.so +%{_datadir}/cmake/ +%{_datadir}/cmake/Modules/ +%{_datadir}/cmake/Modules/FindQuaZip5.cmake + + +%changelog +* Wed Oct 27 2021 tanyulong - 0.7.3-1 +- init packages for OpenEuler +