summaryrefslogtreecommitdiff
path: root/core/file/PKGBUILD
blob: e81c14eb95be9d841647e2a38b607360e1d79a41 (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
# $Id: PKGBUILD 111169 2011-02-24 15:25:47Z stephane $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>

pkgname=file
pkgver=5.05
pkgrel=2
pkgdesc="File type identification utility"
arch=('i686' 'x86_64')
license=('custom')
groups=('base')
url="http://www.darwinsys.com/file/"
depends=('glibc' 'zlib')
options=('!libtool')
source=(ftp://ftp.astron.com/pub/${pkgname}/${pkgname}-${pkgver}.tar.gz 
        file-5.05-zip64.patch 
        file-5.05-python-3.2.patch)
md5sums=('0b429063710457be2bd17a18389cb018'
         '385f020467debd98bd2d8df6143f93d0'
         '3f5e147be5b9c36c74323a1317328538')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  sed -i 's#\$(datadir)/misc#\$(datadir)#' configure 

  # identify zip64 files
  patch -Np1 -i ${srcdir}/file-5.05-zip64.patch

  # identify python 3.2 files
  patch -Np1 -i ../file-5.05-python-3.2.patch

  ./configure --prefix=/usr --datadir=/usr/share/file
  make 
}

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

  make DESTDIR=${pkgdir} install
  install -dm755 ${pkgdir}/usr/share/misc
  ln -s ../file/magic.mgc ${pkgdir}/usr/share/misc
  
  install -D -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
}