[packages/StormLib] new

atler atler at pld-linux.org
Mon Nov 15 00:56:39 CET 2021


commit 21c3ee918fd9ee4e1d2050fe389addf6daf34da8
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Nov 15 00:55:47 2021 +0100

    new

 StormLib-missing_typedefs.patch | 12 ++++++++
 StormLib-paths.patch            | 17 +++++++++++
 StormLib.spec                   | 64 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 93 insertions(+)
---
diff --git a/StormLib.spec b/StormLib.spec
new file mode 100644
index 0000000..bc423a4
--- /dev/null
+++ b/StormLib.spec
@@ -0,0 +1,64 @@
+Summary:	Library for accessing the MPQ archives
+Name:		StormLib
+Version:	9.23
+Release:	1
+License:	MIT
+Group:		Libraries
+Source0:	https://github.com/ladislav-zezula/StormLib/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	a498eedeb97d0a49fcc8e8b509f1a95b
+Patch0:		%{name}-paths.patch
+Patch1:		%{name}-missing_typedefs.patch
+URL:		http://www.zezula.net/mpq.html
+BuildRequires:	bzip2-devel
+BuildRequires:	cmake >= 2.8.12
+BuildRequires:	libstdc++-devel >= 6:4.8
+BuildRequires:	libtomcrypt-devel
+BuildRequires:	rpmbuild(macros) >= 1.605
+BuildRequires:	zlib-devel
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The StormLib library is a pack of modules, written in C++, which are
+able to read and also to write files from/to the MPQ archives.
+
+%package devel
+Summary:	Header files for the StormLib library
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header files for the StormLib library.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+%build
+%cmake -B build \
+	-DWITH_LIBTOMCRYPT:BOOL=ON
+%{__make} -C build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc README.md doc/History.txt
+%attr(755,root,root) %{_libdir}/libstorm.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libstorm.so.9
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libstorm.so
+%{_includedir}/StormLib.h
+%{_includedir}/StormPort.h
diff --git a/StormLib-missing_typedefs.patch b/StormLib-missing_typedefs.patch
new file mode 100644
index 0000000..88e0032
--- /dev/null
+++ b/StormLib-missing_typedefs.patch
@@ -0,0 +1,12 @@
+--- StormLib-9.23/src/StormLib.h.orig	2020-11-21 04:27:09.000000000 +0100
++++ StormLib-9.23/src/StormLib.h	2021-11-14 21:16:16.836297985 +0100
+@@ -480,7 +480,9 @@
+ typedef void (WINAPI * SFILE_COMPACT_CALLBACK)(void * pvUserData, DWORD dwWorkType, ULONGLONG BytesProcessed, ULONGLONG TotalBytes);
+ 
+ struct TFileStream;
++typedef struct TFileStream TFileStream;
+ struct TMPQBits;
++typedef struct TMPQBits TMPQBits;
+ 
+ //-----------------------------------------------------------------------------
+ // Structures related to MPQ format
diff --git a/StormLib-paths.patch b/StormLib-paths.patch
new file mode 100644
index 0000000..ca570e9
--- /dev/null
+++ b/StormLib-paths.patch
@@ -0,0 +1,17 @@
+--- StormLib-9.23/CMakeLists.txt.orig	2020-11-21 04:27:09.000000000 +0100
++++ StormLib-9.23/CMakeLists.txt	2021-11-14 20:48:28.601082259 +0100
+@@ -330,13 +330,7 @@
+ endif()
+ 
+ if (NOT STORM_SKIP_INSTALL)
+-    install(TARGETS ${LIBRARY_NAME} 
+-	    RUNTIME DESTINATION bin 
+-	    LIBRARY DESTINATION lib 
+-	    ARCHIVE DESTINATION lib 
+-	    FRAMEWORK DESTINATION /Library/Frameworks
+-	    PUBLIC_HEADER DESTINATION include
+-	    INCLUDES DESTINATION include)
++    install(TARGETS ${LIBRARY_NAME})
+ 
+         #CPack configurtion
+         SET(CPACK_GENERATOR "DEB" "RPM")
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/StormLib.git/commitdiff/21c3ee918fd9ee4e1d2050fe389addf6daf34da8



More information about the pld-cvs-commit mailing list