-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[bkcrack] | ||
source = "git" | ||
git = "https://github.com/kimci86/bkcrack.git" | ||
use_max_tag = true | ||
prefix = "v" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
maintainers: | ||
- github: Xeonacid | ||
email: xeonacid@archlinuxcn.org | ||
|
||
pre_build_script: update_pkgver_and_pkgrel(_G.newver) | ||
|
||
post_build_script: | | ||
git_pkgbuild_commit() | ||
update_aur_repo() | ||
update_on: | ||
- source: github | ||
github: kimci86/bkcrack | ||
use_max_tag: true | ||
prefix: v |