1 # Maintainer: Sébastien Luttringer <seblu@archlinux.org>
2 # Contributor: Allan McRae <allan@archlinux.org>
3 # Contributor: Andreas Radke <andyrtr@archlinux.org>
8 pkgdesc='File type identification utility'
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'
23 # apply patch from the source array (should be a pacman feature)
25 for src in "${source[@]}"; do
28 [[ $src = *.patch ]] || continue
29 echo "Applying patch $src..."
30 patch -Np1 < "../$src"
37 # Fix linking libmagic (vfork needs libpthread)
42 --datadir=/usr/share/file \
45 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
56 make DESTDIR="$pkgdir" install
57 install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
60 # vim:set ts=2 sw=2 et: