rpms/unrar/EL-5 unrar-3.7.8-fixes.patch, NONE, 1.1 unrar.spec, 1.2, 1.3

Orion Poplawski orion at rpmfusion.org
Tue Nov 25 05:38:24 CET 2008


Author: orion

Update of /cvs/nonfree/rpms/unrar/EL-5
In directory se02.es.rpmfusion.net:/tmp/cvs-serv22641

Modified Files:
	unrar.spec 
Added Files:
	unrar-3.7.8-fixes.patch 
Log Message:
* Sat Oct 25 2008 Andreas Thienemann <andreas at bawue.net> - 3.7.8-3
- Added libunrar sub-packages
- Clarified license
- Added unrar robustness patches


unrar-3.7.8-fixes.patch:

--- NEW FILE unrar-3.7.8-fixes.patch ---
diff -up unrar/dll.cpp.fix unrar/dll.cpp
--- unrar/dll.cpp.fix	2007-09-10 13:49:28.000000000 +0200
+++ unrar/dll.cpp	2008-10-25 22:41:06.000000000 +0200
@@ -275,7 +275,8 @@ int PASCAL ProcessFile(HANDLE hArcData,i
       strcpy(Data->Cmd.Command,Operation==RAR_EXTRACT ? "X":"T");
       Data->Cmd.Test=Operation!=RAR_EXTRACT;
       bool Repeat=false;
-      Data->Extract.ExtractCurrentFile(&Data->Cmd,Data->Arc,Data->HeaderSize,Repeat);
+      if(Data->Extract.ExtractCurrentFile(&Data->Cmd,Data->Arc,Data->HeaderSize,Repeat) == false)
+        return (ERAR_UNKNOWN);
 
       while (Data->Arc.ReadHeader()!=0 && Data->Arc.GetHeaderType()==NEWSUB_HEAD)
       {
diff -up unrar/extract.cpp.fix unrar/extract.cpp
--- unrar/extract.cpp.fix	2007-09-10 13:49:28.000000000 +0200
+++ unrar/extract.cpp	2008-10-25 22:41:06.000000000 +0200
@@ -311,6 +311,7 @@ bool CmdExtract::ExtractCurrentFile(Comm
     char CurVolName[NM];
     strcpy(CurVolName,ArcName);
 
+    if(strcmp(ArcName,"")==0) return(false);
     VolNameToFirstName(ArcName,ArcName,(Arc.NewMhd.Flags & MHD_NEWNUMBERING));
     if (stricomp(ArcName,CurVolName)!=0 && FileExist(ArcName))
     {
diff -up unrar/makefile.unix.fix unrar/makefile.unix
--- unrar/makefile.unix.fix	2008-10-25 22:41:06.000000000 +0200
+++ unrar/makefile.unix	2008-10-25 22:42:24.000000000 +0200
@@ -86,7 +86,7 @@ COMPILE=$(CXX) $(CXXFLAGS) $(DEFINES)
 LINK=$(CXX)
 
 UNRAR_OBJ=filestr.o recvol.o rs.o scantree.o
-LIB_OBJ=filestr.o scantree.o dll.o
+LIB_OBJ=filestr.o recvol.o rs.o scantree.o dll.o
 
 OBJECTS=rar.o strlist.o strfn.o pathfn.o int64.o savepos.o global.o file.o filefn.o filcreat.o \
 	archive.o arcread.o unicode.o system.o isnt.o crypt.o crc.o rawread.o encname.o \
@@ -116,4 +116,4 @@ sfx:	$(OBJECTS)
 lib:	WHAT=RARDLL
 lib:	$(OBJECTS) $(LIB_OBJ)
 	@rm -f libunrar.so
-	$(LINK) -shared -o libunrar.so $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
+	$(LINK) -shared -Wl,-soname,libunrar.so.3.7 -o libunrar.so.3.7 $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)


Index: unrar.spec
===================================================================
RCS file: /cvs/nonfree/rpms/unrar/EL-5/unrar.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- unrar.spec	25 Jul 2008 06:12:22 -0000	1.2
+++ unrar.spec	25 Nov 2008 04:38:23 -0000	1.3
@@ -1,12 +1,16 @@
+# Might be needed to apply fuzzy patches with recent rpm
+#%%define _default_patch_fuzz 2
+
 Name:           unrar
 Version:        3.7.8
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Utility for extracting, testing and viewing RAR archives
-License:        Freeware
+License:        Freeware with further limitations
 Group:          Applications/Archiving
 URL:            http://www.rarlab.com/rar_archiver.htm
 Source0:        http://www.rarlab.com/rar/unrarsrc-%{version}.tar.gz
 Patch0:         http://ftp.debian.org/debian/pool/non-free/u/unrar-nonfree/unrar-nonfree_3.7.3-1.diff.gz
+Patch1:         unrar-3.7.8-fixes.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 
@@ -16,24 +20,57 @@
 1.50 and above.
 
 
+%package -n libunrar
+Summary:        Decompress library for RAR v3 archives
+Group:          System Environment/Libraries
+
+%description -n libunrar
+The libunrar library allows programs linking against it to decompress
+existing RAR v3 archives.
+
+
+%package -n libunrar-devel
+Summary:        Development files for libunrar
+Group:          Development/Libraries
+Requires:       libunrar = %{version}-%{release}
+Provides:       libunrar3-%{version}
+
+%description -n libunrar-devel
+The libunrar-devel package contains libraries and header files for
+developing applications that use libunrar.
+
+
 %prep
 %setup -q -n %{name}
 %patch0 -p1
+%patch1 -p1 -b .fix
 
 
 %build
 make %{?_smp_mflags} -f makefile.unix \
-  CXX="%{__cxx}" CXXFLAGS="$RPM_OPT_FLAGS" STRIP=:
+  CXX="%{__cxx}" CXXFLAGS="$RPM_OPT_FLAGS -fPIC -DPIC" STRIP=: RANLIB=ranlib
+make %{?_smp_mflags} -f makefile.unix lib \
+  CXX="%{__cxx}" CXXFLAGS="$RPM_OPT_FLAGS -fPIC -DPIC" STRIP=: RANLIB=ranlib
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
-install -Dpm 755 unrar $RPM_BUILD_ROOT%{_bindir}/unrar
-install -Dpm 644 debian/unrar.1 $RPM_BUILD_ROOT%{_mandir}/man1/unrar.1
+rm -rf %{buildroot}
+install -Dpm 755 unrar %{buildroot}%{_bindir}/unrar
+install -Dpm 644 debian/unrar.1 %{buildroot}%{_mandir}/man1/unrar.1
+install -Dpm 755 libunrar.so.3.7 %{buildroot}%{_libdir}/libunrar.so.3.7
+install -Dpm 644 dll.hpp %{buildroot}/%{_includedir}/unrar/dll.hpp
+ln -s libunrar.so.3.7 %{buildroot}%{_libdir}/libunrar.so.3
+ln -s libunrar.so.3 %{buildroot}%{_libdir}/libunrar.so
 
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
+
+
+%post -n libunrar -p /sbin/ldconfig
+
+
+%postun -n libunrar -p /sbin/ldconfig
 
 
 %files
@@ -42,8 +79,24 @@
 %{_bindir}/unrar
 %{_mandir}/man1/unrar.1*
 
+%files -n libunrar
+%defattr(-,root,root,-)
+%doc license.txt readme.txt
+%{_libdir}/*.so.*
+
+%files -n libunrar-devel
+%defattr(-,root,root,-)
+%doc license.txt readme.txt
+%{_includedir}/*
+%{_libdir}/*.so
+
 
 %changelog
+* Sat Oct 25 2008 Andreas Thienemann <andreas at bawue.net> - 3.7.8-3
+- Added libunrar sub-packages
+- Clarified license
+- Added unrar robustness patches
+
 * Thu Jul 24 2008 Conrad Meyer <konrad at tylerc.org> - 3.7.8-2
 - Import into RPM Fusion.
 



More information about the rpmfusion-commits mailing list