| Name |
file |
| Description |
File type identification utility |
| Version |
5.46-5 |
| Package Base |
file |
| Homepage |
https://www.darwinsys.com/file/ |
| Maintainers |
['Christian Hesse <eworm@archlinux.org>', 'Sébastien Luttringer <seblu@archlinux.org>'] |
| Contributors |
['Allan McRae <allan@archlinux.org>', 'Andreas Radke <andyrtr@archlinux.org>'] |
| Distro-repo |
https://gitlab.archlinux.org/archlinux/packaging/packages/file |
| Sources |
['0001-PR-579-net147-Fix-stack-overrun.patch', '0002-PR-571-jschleus-Some-zip-files-are-misclassified-as-data.patch', '0003-Fix-termios-handling.patch', '0004-glibc-2-42-tcgets2.patch', 'git+https://github.com/file/file.git#tag=FILE5_46'] |
| Dependencies |
['bzip2', 'glibc', 'libbz2.so', 'liblzma.so', 'libseccomp', 'libseccomp.so', 'libz.so', 'libzstd.so', 'xz', 'zlib', 'zstd'] |
| Optional-Dependencies |
[] |
| Build-Dependencies |
['git'] |
| Provides |
['libmagic.so'] |
| Builddate |
08-08-2025 23:51:59 |
| Architecture |
x86_64 |
| Distro-Version |
|
| Licenses |
['custom'] |
| Hash |
93563e406ca04e0bbb233826dfc3dacfc708c6f06a483601fa61f1605b87384b |
# Maintainer: Sébastien Luttringer <seblu@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>
pkgname=file
pkgver=5.46
pkgrel=5
pkgdesc='File type identification utility'
arch=('x86_64')
license=('custom')
url='https://www.darwinsys.com/file/'
depends=('glibc'
'bzip2' 'libbz2.so'
'libseccomp' 'libseccomp.so'
'xz' 'liblzma.so'
'zlib' 'libz.so'
'zstd' 'libzstd.so')
makedepends=('git')
provides=('libmagic.so')
options=('!emptydirs')
# Warning: Upstream commits update file version and date inside each file!
# Remove these changes from patches when cherry-picking to avoid
# conflicts!
source=("git+https://github.com/file/file.git#tag=FILE${pkgver//./_}"
'0001-PR-579-net147-Fix-stack-overrun.patch'
'0002-PR-571-jschleus-Some-zip-files-are-misclassified-as-data.patch'
'0003-Fix-termios-handling.patch'
'0004-glibc-2-42-tcgets2.patch')
validpgpkeys=('BE04995BA8F90ED0C0C176C471112AB16CB33B3A') # Christos Zoulas
sha256sums=('c0e07f4456de8ca4c7c8225f0675bc2709e9ed376db8d6e44c799884b1053cf2'
'fd618e04f3c52a77a74883ec81e918576b4c326b1d42be0dc5427033b181f7b2'
'c93c8ae784ba27c2eec02a94db7bc7080d1b116d4c8e4a9191bd67b4288f2b0e'
'c0b4e40b7f7782c3a4622d040a3fb66bd644458e86847705e9fba3949b3fdbd0'
'14beb50c014c312d84b1f99464032e2d6d07dbf77a165c943771cc45f69f79c7')
prepare() {
cd file
# apply patch from the source array (should be a pacman feature)
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
done
autoreconf -fiv
}
build() {
cd file
# Fix linking libmagic (vfork needs libpthread)
CFLAGS+=" -pthread"
./configure \
--prefix=/usr \
--datadir=/usr/share/file \
--enable-fsect-man5 \
--enable-libseccomp
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
check() {
cd file
make check
}
package() {
cd file
make DESTDIR="$pkgdir" install
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}
# vim:set ts=2 sw=2 et: