summaryrefslogtreecommitdiff
path: root/core/file/PKGBUILD
blob: 859091149e02c5d9d23238227a0af488980e4139 (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
# $Id: PKGBUILD 207101 2014-03-06 12:36:01Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>

pkgname=file
pkgver=5.17
pkgrel=2
pkgdesc="File type identification utility"
arch=('i686' 'x86_64')
license=('custom')
groups=('base' 'base-devel')
url="http://www.darwinsys.com/file/"
depends=('glibc' 'zlib')
source=(ftp://ftp.astron.com/pub/${pkgname}/${pkgname}-${pkgver}.tar.gz
        file-5.17-off-by-one.patch)
md5sums=('e19c47e069ced7b01ccb4db402cc01d3'
         'f36a87784f1db2e415ce09badb38fbe8')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  
  # https://github.com/file/file/commit/70c65d2e1841
  patch -p1 -i $srcdir/file-5.17-off-by-one.patch
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure --prefix=/usr --datadir=/usr/share/file
  make 
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR=${pkgdir} install
  
  install -Dm644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
}