summaryrefslogtreecommitdiff
path: root/community/pkgfile/PKGBUILD
blob: 73be9ebf8e205500ba14865b7786a59e6203a5b5 (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
# $Id: PKGBUILD 80498 2012-11-23 00:24:41Z dreisner $
# Maintainer: Dave Reisner <dreisner@archlinux.org>

pkgname=pkgfile
pkgver=7
pkgrel=2
pkgdesc="a pacman .files metadata explorer"
arch=('i686' 'x86_64' 'mips64el')
url="http://github.com/falconindy/pkgfile"
license=('MIT')
depends=('libarchive' 'curl' 'pcre' 'pacman')
conflicts=('pkgtools<24-2')
makedepends=('perl')
source=("https://github.com/downloads/falconindy/$pkgname/$pkgname-$pkgver.tar.xz"{,.sig}
        '0001-update-fix-use-after-free.patch')
install=pkgfile.install
md5sums=('f1dc0052b1c21597ea2fa0f0ce05608c'
         '28599a9b6e56860a9cba1c95ec797551'
         'a4f505d080795fd0c10fd1d93b4520f6')

build() {
  cd "$pkgname-$pkgver"

  patch -Np1 <"$srcdir/0001-update-fix-use-after-free.patch"

  ./configure
  make

  # generate a license file
  sed '/\*\//q' src/pkgfile.c >LICENSE
}

package() {
  cd "$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim: ft=sh syn=sh