-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
1 changed file
with
62 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,62 @@ | ||
# Maintainer: Maksim Bondarenkov <maksapple2306@gmail.com> | ||
|
||
_realname=rosenpass | ||
pkgbase=mingw-w64-${_realname} | ||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" | ||
pkgver=0.2.1 | ||
pkgrel=1 | ||
pkgdesc="Rosenpass is a post-quantum-secure VPN that uses WireGuard to transport the actual data (mingw-w64)" | ||
arch=('any') | ||
mingw_arch=('ucrt64' 'clang64') | ||
url='https://rosenpass.eu' | ||
msys2_repository_url='https://github.com/rosenpass/rosenpass' | ||
license=('Apache-2.0 OR MIT') | ||
depends=("${MINGW_PACKAGE_PREFIX}-liboqs" | ||
"${MINGW_PACKAGE_PREFIX}-libsodium" | ||
#"${MINGW_PACKAGE_PREFIX}-wireguard-tools" | ||
'gawk' | ||
'findutils') | ||
makedepends=("${MINGW_PACKAGE_PREFIX}-rust" | ||
"${MINGW_PACKAGE_PREFIX}-pkgconf") | ||
source=("https://github.com/rosenpass/rosenpass/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz") | ||
sha256sums=('09dffa62c9bbf3bfa4b34c7667f4052f3c262195a45da9c21c8123f197e7742a') | ||
|
||
_env() { | ||
export LIBOQS_NO_VENDOR=1 | ||
export PKG_CONFIG_ALL_DYNAMIC=1 | ||
} | ||
|
||
prepare() { | ||
cd "${srcdir}/${_realname}-${pkgver}" | ||
|
||
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" | ||
} | ||
|
||
build() { | ||
cd "${srcdir}/${_realname}-${pkgver}" | ||
|
||
_env | ||
cargo build --release --frozen -p rosenpass | ||
} | ||
|
||
check() { | ||
cd "${srcdir}/${_realname}-${pkgver}" | ||
|
||
_env | ||
cargo test --release --frozen -p rosenpass | ||
} | ||
|
||
package() { | ||
cd "${srcdir}/${_realname}-${pkgver}" | ||
|
||
export LIBOQS_NO_VENDOR=1 | ||
cargo install \ | ||
--offline \ | ||
--no-track \ | ||
--frozen \ | ||
--path rosenpass \ | ||
--root "${pkgdir}${MINGW_PREFIX}" | ||
install -Dm755 rp "${pkgdir}${MINGW_PREFIX}/bin/rp" | ||
|
||
install -Dm644 LICENSE-{APACHE,MIT} -t "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/" | ||
} |