Skip to content

Commit

Permalink
addpkg: bkcrack
Browse files Browse the repository at this point in the history
  • Loading branch information
Xeonacid committed Jan 21, 2025
1 parent bf738e6 commit 78acbd3
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
5 changes: 5 additions & 0 deletions archlinuxcn/bkcrack/.nvchecker.toml
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"
55 changes: 55 additions & 0 deletions archlinuxcn/bkcrack/PKGBUILD
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"
}
15 changes: 15 additions & 0 deletions archlinuxcn/bkcrack/lilac.yaml
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

0 comments on commit 78acbd3

Please sign in to comment.