blob: 8fac03956301b5da4fafac056667d6f5e295fc1b (
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
49
50
51
52
53
54
55
|
# Maintainer: Xeonacid <h.dwwwwww@gmail.com>
pkgname=bkcrack
pkgver=1.7.1
pkgrel=1
pkgdesc="Crack legacy zip encryption with Biham and Kocher's known plaintext attack."
arch=(x86_64)
url="https://github.com/kimci86/bkcrack"
license=(Zlib)
depends=(gcc-libs glibc)
makedepends=(cmake doxygen git)
optdepends=('python: deflate/inflate tools')
source=(git+$url.git#tag=v$pkgver)
sha256sums=('2fa55116d9baae24b56b5ef9ed55eaff341e781477d8b014758f8b017bb13777')
build() {
local cmake_options=(
-B build
-S $pkgname
-W no-dev
-D CMAKE_BUILD_TYPE=None
-D CMAKE_INSTALL_PREFIX=/usr
-D BKCRACK_BUILD_DOC=ON
-D BKCRACK_BUILD_TESTING=ON
)
cmake "${cmake_options[@]}"
cmake --build build
}
check() {
local excluded_tests=""
local ctest_flags=(
--test-dir build
# show the stdout and stderr when the test fails
--output-on-failure
# execute tests in parallel
--parallel $(nproc)
# exclude problematic tests
--exclude-regex "$excluded_tests"
)
ctest "${ctest_flags[@]}"
}
package() {
cd build
install -Dm755 src/bkcrack "$pkgdir/usr/bin/bkcrack"
install -dm755 "$pkgdir/usr/share/doc/$pkgname"
cp -r doc/html "$pkgdir/usr/share/doc/$pkgname"
cd ../$pkgname
install -Dm644 license.txt -t "$pkgdir/usr/share/licenses/$pkgname"
install -Dm644 readme.md -t "$pkgdir/usr/share/doc/$pkgname"
cp -r example "$pkgdir/usr/share/doc/$pkgname"
install -dm755 "$pkgdir/usr/share/$pkgname"
cp -r tools "$pkgdir/usr/share/$pkgname"
}
|