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'
11 url='https://www.darwinsys.com/file/'
12 depends=('glibc' 'zlib' 'xz' 'bzip2' 'libseccomp' 'libseccomp.so' 'zstd' 'libzstd.so')
13 provides=('libmagic.so')
14 options=('!emptydirs')
15 source=("https://astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz"{,.asc})
16 validpgpkeys=('BE04995BA8F90ED0C0C176C471112AB16CB33B3A') # Christos Zoulas
17 sha256sums=('3751c7fba8dbc831cb8d7cc8aff21035459b8ce5155ef8b0880a27d028475f3b'
22 # apply patch from the source array (should be a pacman feature)
24 for src in "${source[@]}"; do
27 [[ $src = *.patch ]] || continue
28 echo "Applying patch $src..."
29 patch -Np1 < "../$src"
36 # Fix linking libmagic (vfork needs libpthread)
41 --datadir=/usr/share/file \
44 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
55 make DESTDIR="$pkgdir" install
56 install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
59 # vim:set ts=2 sw=2 et: