summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4dc6ed8587744d6a9c1a8162dd30fb9c66bc3674 (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
# Maintainer: willemw <willemw12@gmail.com>
# Contributor: Meta Mantra <m3tamantra at gmail dot com>
# Contributor: DrZaius <lou at fakeoutdoorsman dot com>
# Contributor: Adam Wolk <netprobe at gmail dot com>

pkgname=scalpel-git
pkgver=r31.35e1367
pkgrel=1
pkgdesc="Recover files based on their headers, footers and internal data structures. This program is based on Foremost."
arch=('x86_64')
url="https://github.com/sleuthkit/scalpel"
license=('Apache')
depends=('tre')
makedepends=('git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=($pkgname::git+$url.git)
md5sums=('SKIP')

pkgver() {
  cd $pkgname
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd $pkgname
  sed -i 's|#define\s*SCALPEL_DEFAULT_CONFIG_FILE\s.*"scalpel.conf"|#define SCALPEL_DEFAULT_CONFIG_FILE "/etc/scalpel/scalpel.conf"|' src/scalpel.h
}

build() {
  cd $pkgname
  ./bootstrap
  ./configure --with-pic --prefix=/usr CXXFLAGS="${CXXFLAGS} --std=c++14"
  make
}

package() {
  cd $pkgname
  install -Dm644 scalpel.conf -t "$pkgdir/etc/scalpel"
  make DESTDIR="$pkgdir" install
}