db-move: moved adwaita-icon-theme from [testing] to [extra] (any)
[arch-packages.git] / file / repos / core-x86_64 / PKGBUILD
blob05cd63d82811b2e5fb137dec8671ce8fb9a38ae2
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.44
7 pkgrel=3
8 pkgdesc='File type identification utility'
9 arch=('x86_64')
10 license=('custom')
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'
18             'SKIP')
20 prepare() {
21   cd $pkgname-$pkgver
22   # apply patch from the source array (should be a pacman feature)
23   local src
24   for src in "${source[@]}"; do
25     src="${src%%::*}"
26     src="${src##*/}"
27     [[ $src = *.patch ]] || continue
28     echo "Applying patch $src..."
29     patch -Np1 < "../$src"
30   done
33 build() {
34   cd $pkgname-$pkgver
36   # Fix linking libmagic (vfork needs libpthread)
37   CFLAGS+=" -pthread"
39   ./configure \
40     --prefix=/usr \
41     --datadir=/usr/share/file \
42     --enable-fsect-man5 \
43     --enable-libseccomp
44   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
45   make
48 check() {
49   cd $pkgname-$pkgver
50   make check
53 package() {
54   cd $pkgname-$pkgver
55   make DESTDIR="$pkgdir" install
56   install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
59 # vim:set ts=2 sw=2 et: