update unrar

This commit is contained in:
Weng Xuetian 2014-05-13 19:33:48 +00:00
parent e4bc8908e4
commit 9f92b16e1b
2 changed files with 46 additions and 13 deletions

View File

@ -3,27 +3,49 @@
#
# maintainer abveritas@chakra-project.org
pkgname=unrar
pkgver=4.2.4
pkgbase=unrar
pkgname=('unrar' 'libunrar')
pkgver=5.1.5
pkgrel=1
pkgdesc="The RAR uncompression program"
arch=('i686' 'x86_64')
url="http://www.rarlab.com/rar_add.htm"
license=('custom')
depends=('gcc-libs')
source=(http://www.rarlab.com/rar/unrarsrc-${pkgver}.tar.gz)
md5sums=('8ea9d1b4139474b282d76e627a2de3e4')
makedepends=('gcc-libs')
source=("http://www.rarlab.com/rar/unrarsrc-${pkgver}.tar.gz"
'unrar-5.1.5-soname.patch')
md5sums=('809db67b74942af7cf1d40edcec92976'
'cd9a5291db0379d73148872cf6e6d3ce')
prepare() {
cd "${srcdir}/${pkgbase}"
patch -Np1 -i "${srcdir}/unrar-5.1.5-soname.patch"
}
build() {
cd "${srcdir}/${pkgname}"
make -f makefile.unix
cd "${srcdir}/${pkgbase}"
cp -a ${srcdir}/unrar ${srcdir}/libunrar
make -C "${srcdir}"/libunrar lib libversion=${pkgver} CXXFLAGS="-fPIC ${CXXFLAGS}"
make CXXFLAGS="-fPIC ${CXXFLAGS}" STRIP="true"
}
package() {
cd "${srcdir}/${pkgname}"
install -Dm755 unrar ${pkgdir}/usr/bin/unrar
package_unrar() {
pkgdesc="The RAR uncompression program"
depends=('gcc-libs')
cd "${srcdir}/${pkgbase}"
install -Dm755 unrar "${pkgdir}/usr/bin/unrar"
# install license
install -Dm644 license.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 license.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
package_libunrar() {
pkgdesc="Library and header file for applications that use libunrar"
depends=('gcc-libs')
cd "${srcdir}/libunrar"
install -Dm755 libunrar.so.${pkgver} "${pkgdir}/usr/lib/libunrar.so.${pkgver}"
install -Dm644 dll.hpp "${pkgdir}/usr/include/unrar/dll.hpp"
ln -s libunrar.so.${pkgver} "${pkgdir}/usr/lib/libunrar.so.5"
ln -s libunrar.so.${pkgver} "${pkgdir}/usr/lib/libunrar.so"
# install license
install -Dm644 license.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

View File

@ -0,0 +1,11 @@
--- a/makefile 2013-04-29 16:27:05.000000000 +0200
+++ b/makefile 2013-10-01 22:07:29.611485989 +0200
@@ -133,7 +133,7 @@
lib: CXXFLAGS+=$(LIBFLAGS)
lib: clean $(OBJECTS) $(LIB_OBJ)
@rm -f libunrar.so
- $(LINK) -shared -o libunrar.so $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
+ $(LINK) -shared -Wl,-soname,libunrar.so.$(libversion) -o libunrar.so.$(libversion) $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
install-unrar:
install -D unrar $(DESTDIR)/bin/unrar