summaryrefslogtreecommitdiff
path: root/extra/unrar
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-12-29 02:13:48 -0800
committerroot <root@rshg054.dnsready.net>2012-12-29 02:13:48 -0800
commit5dd7ed82e788ebad2e920e0f2db7468cc6547cfe (patch)
treef467412e09912ababcd8fe6c05193d829f514dcd /extra/unrar
parent3009e8addb4a894329bf8ab3e8fb763361833978 (diff)
Sat Dec 29 02:10:20 PST 2012
Diffstat (limited to 'extra/unrar')
-rw-r--r--extra/unrar/PKGBUILD49
-rw-r--r--extra/unrar/unrar-4.2.1-soname.patch11
2 files changed, 60 insertions, 0 deletions
diff --git a/extra/unrar/PKGBUILD b/extra/unrar/PKGBUILD
new file mode 100644
index 000000000..f4ef1a125
--- /dev/null
+++ b/extra/unrar/PKGBUILD
@@ -0,0 +1,49 @@
+# $Id: PKGBUILD 161802 2012-06-14 17:00:58Z giovanni $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: dorphell <dorphell@gmx.net>
+
+pkgbase=unrar
+pkgname=('unrar' 'libunrar')
+pkgver=4.2.4
+pkgrel=1
+arch=('i686' 'x86_64')
+url="http://www.rarlab.com/rar_add.htm"
+license=('custom')
+makedepends=('gcc-libs')
+source=("http://www.rarlab.com/rar/unrarsrc-${pkgver}.tar.gz"
+ 'unrar-4.2.1-soname.patch')
+md5sums=('8ea9d1b4139474b282d76e627a2de3e4'
+ 'b9ec767da9a36f5ac38034c974e77758')
+
+build() {
+ cd "${srcdir}/${pkgbase}"
+
+ patch -Np0 -i "${srcdir}/unrar-4.2.1-soname.patch"
+
+ cp -a ${srcdir}/unrar ${srcdir}/libunrar
+ make -C "${srcdir}"/libunrar -f makefile.unix lib libversion=${pkgver} CXXFLAGS="-fPIC ${CXXFLAGS}"
+ make -f makefile.unix CXXFLAGS="-fPIC ${CXXFLAGS}" STRIP="true"
+}
+
+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"
+}
+
+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.4"
+ ln -s libunrar.so.${pkgver} "${pkgdir}/usr/lib/libunrar.so"
+ # install license
+ install -Dm644 license.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/extra/unrar/unrar-4.2.1-soname.patch b/extra/unrar/unrar-4.2.1-soname.patch
new file mode 100644
index 000000000..83ebe9611
--- /dev/null
+++ b/extra/unrar/unrar-4.2.1-soname.patch
@@ -0,0 +1,11 @@
+--- makefile.unix 2012-02-23 10:23:14.000000000 +0100
++++ makefile.unix 2012-05-05 12:58:13.000000000 +0200
+@@ -131,7 +131,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