archrelease: copy trunk to extra-x86_64
[arch-packages.git] / file / trunk / PKGBUILD
blob7045821383eec1ccbdca063f947aa539ca8b3c31
1 # Maintainer: Sébastien Luttringer <seblu@archlinux.org>
2 # Contributor: Allan McRae <allan@archlinux.org>
3 # Contributor: Andreas Radke <andyrtr@archlinux.org>
5 pkgname=file
6 pkgver=5.41
7 pkgrel=1
8 pkgdesc='File type identification utility'
9 arch=('x86_64')
10 license=('custom')
11 groups=('base-devel')
12 url='https://www.darwinsys.com/file/'
13 depends=('glibc' 'zlib' 'xz' 'bzip2' 'libseccomp' 'libseccomp.so')
14 provides=('libmagic.so')
15 options=('!emptydirs')
16 source=("https://astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz"{,.asc})
17 validpgpkeys=('BE04995BA8F90ED0C0C176C471112AB16CB33B3A') # Christos Zoulas
18 sha256sums=('13e532c7b364f7d57e23dfeea3147103150cb90593a57af86c10e4f6e411603f'
19             'SKIP')
21 prepare() {
22   cd $pkgname-$pkgver
23   # apply patch from the source array (should be a pacman feature)
24   local src
25   for src in "${source[@]}"; do
26     src="${src%%::*}"
27     src="${src##*/}"
28     [[ $src = *.patch ]] || continue
29     echo "Applying patch $src..."
30     patch -Np1 < "../$src"
31   done
34 build() {
35   cd $pkgname-$pkgver
37   # Fix linking libmagic (vfork needs libpthread)
38   CFLAGS+=" -pthread"
40   ./configure \
41     --prefix=/usr \
42     --datadir=/usr/share/file \
43     --enable-fsect-man5 \
44     --enable-libseccomp
45   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
46   make
49 check() {
50   cd $pkgname-$pkgver
51   make check
54 package() {
55   cd $pkgname-$pkgver
56   make DESTDIR="$pkgdir" install
57   install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
60 # vim:set ts=2 sw=2 et: