summaryrefslogtreecommitdiffstats
path: root/abs/core/file/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/file/PKGBUILD')
-rw-r--r--abs/core/file/PKGBUILD45
1 files changed, 31 insertions, 14 deletions
diff --git a/abs/core/file/PKGBUILD b/abs/core/file/PKGBUILD
index 805200e..8f78067 100644
--- a/abs/core/file/PKGBUILD
+++ b/abs/core/file/PKGBUILD
@@ -1,29 +1,47 @@
-# $Id$
# Maintainer: Sébastien Luttringer <seblu@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>
pkgname=file
-pkgver=5.23
-pkgrel=2
+pkgver=5.39
+pkgrel=1
pkgdesc='File type identification utility'
-arch=('i686' 'x86_64')
+arch=('x86_64')
license=('custom')
-groups=('base' 'base-devel')
-url='http://www.darwinsys.com/file/'
-depends=('glibc' 'zlib')
-source=("ftp://ftp.astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz"
- '001-fix-bug-with-long-options.patch')
-md5sums=('61db35209ce71a6d576392ce6e1d2f80'
- '4138dd409ad6d67ee35a61cf3c71b0fe')
+groups=('base-devel')
+url='https://www.darwinsys.com/file/'
+depends=('glibc' 'zlib' 'xz' 'bzip2' 'libseccomp' 'libseccomp.so')
+provides=('libmagic.so')
+source=("https://astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz"{,.asc})
+validpgpkeys=('BE04995BA8F90ED0C0C176C471112AB16CB33B3A') # Christos Zoulas
+sha256sums=('f05d286a76d9556243d0cb05814929c2ecf3a5ba07963f8f70bfaaa70517fad1'
+ 'SKIP')
prepare() {
- patch -p1 -d $pkgname-$pkgver < '001-fix-bug-with-long-options.patch'
+ cd $pkgname-$pkgver
+ # 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
}
build() {
cd $pkgname-$pkgver
- ./configure --prefix=/usr --datadir=/usr/share/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
}
@@ -36,7 +54,6 @@ package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
- rmdir "$pkgdir/usr/share/man/man5"
}
# vim:set ts=2 sw=2 et: