unrar: update 3.9.10 to 5.1.2

This commit is contained in:
Emery Hemingway 2014-04-07 17:13:24 -04:00 committed by Bjørn Forsman
parent e325926595
commit 0af5954f5b
1 changed files with 19 additions and 15 deletions

View File

@ -1,28 +1,32 @@
{stdenv, fetchurl}: {stdenv, fetchurl}:
let
version = "5.1.2";
in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "unrar-3.9.10"; name = "unrar-${version}";
src = fetchurl { src = fetchurl {
url = http://www.rarlab.com/rar/unrarsrc-3.9.10.tar.gz; url = "http://www.rarlab.com/rar/unrarsrc-${version}.tar.gz";
sha256 = "0yi0i2j4srca8cag96ajc80m5xb5328ydzjab6y8h1bhypc2fiiv"; sha256 = "0344cn4w3lw2111m3g431khiyndx9ibbp952bli1inx2fixps9cq";
}; };
# Add a missing objects to the library patchPhase = ''
#patchPhase = '' sed -i \
# sed -i 's/^\(LIB_OBJ=.*\)/\1 recvol.o rs.o/' makefile.unix -e "/CXX=/d" \
#''; -e "/CXXFLAGS=/d" \
makefile
buildPhase = ''
make -f makefile.unix unrar
rm *.o
make -f makefile.unix lib CXXFLAGS="-fPIC -O2 -DSILENT";
''; '';
installPhase = '' installPhase = ''
mkdir -p $out/bin $out/lib mkdir -p $out/bin
cp unrar $out/bin cp unrar $out/bin
cp libunrar.so $out/lib
''; '';
buildInputs = []; meta = {
description = "Utility for RAR archives";
license = "freeware";
maintainers = [ stdenv.lib.maintainers.emery ];
platforms = stdenv.lib.platforms.linux; # arbitrary
};
} }