blob: 8221a8ed2c89cef42827d54706b444b4d2a096c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# Mainainer: Christian Hesse <mail@eworm.de>
# Contributor: Sébastien Luttringer <seblu@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>
pkgname=file-git
pkgver=5.21.r4.g4f2c3a6
pkgrel=1
pkgdesc='File type identification utility - git checkout'
arch=('i686' 'x86_64')
license=('custom')
groups=('base' 'base-devel')
url='http://www.darwinsys.com/file/'
depends=('zlib')
makedepends=('git')
provides=('file')
conflicts=('file')
source=('git://github.com/file/file')
sha256sums=('SKIP')
pkgver() {
cd file/
if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then
echo "$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG}).r$(git rev-list --count ${GITTAG}..).g$(git log -1 --format="%h")"
else
echo "0.r$(git rev-list --count master).g$(git log -1 --format="%h")"
fi
}
build() {
cd file/
autoreconf -fi
./configure --prefix=/usr --datadir=/usr/share/file
make
}
package() {
cd file/
make DESTDIR="${pkgdir}" install
install -D -m0644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
rmdir "${pkgdir}/usr/share/man/man5"
}
|