summaryrefslogtreecommitdiffstats
path: root/abs/extra/p7zip/PKGBUILD
blob: 434bbeb1d193b4f3a4fad1381888ad7c419be3c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# $Id$
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Thayer Williams <thayer@archlinux.org>
# Contributor: Hugo Doria <hugo@archlinux.org>
# Contributor: TuxSpirit<tuxspirit@archlinux.fr>  2007/11/17 21:22:36 UTC
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=p7zip
pkgver=16.02
pkgrel=2
pkgdesc="Command-line file archiver with high compression ratio"
arch=('i686' 'x86_64')
url="http://p7zip.sourceforge.net/"
license=('LGPL' 'custom:unRAR')
depends=('gcc-libs' 'sh')
makedepends_i686=('nasm')
makedepends_x86_64=('yasm')
install=$pkgname.install
source=(https://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/${pkgname}_${pkgver}_src_all.tar.bz2)
sha256sums=('5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6e2341f')

prepare() {
  cd "$srcdir/${pkgname}_$pkgver"

  if [[ $CARCH = x86_64 ]]; then
    cp makefile.linux_amd64_asm makefile.machine
  else
    cp makefile.linux_x86_asm_gcc_4.X makefile.machine
  fi
}

build() {
  cd "$srcdir/${pkgname}_$pkgver"
  make all3 OPTFLAGS="$CFLAGS"
}

package() {
  cd "$srcdir/${pkgname}_$pkgver"

  make install \
    DEST_DIR="$pkgdir" \
    DEST_HOME=/usr \
    DEST_MAN=/usr/share/man

  # Remove documentation for the GUI file manager
  rm -r "$pkgdir/usr/share/doc/p7zip/DOC/MANUAL/fm"

  install -d "${pkgdir}"/usr/share/licenses/p7zip
  ln -s -t "$pkgdir/usr/share/licenses/p7zip/" \
    /usr/share/doc/p7zip/DOC/License.txt \
    /usr/share/doc/p7zip/DOC/unRarLicense.txt
}

# vim:set ts=2 sw=2 et: