diff options
author | Giovanni Santini | 2021-09-09 23:51:14 +0200 |
---|---|---|
committer | Giovanni Santini | 2021-09-10 00:13:13 +0200 |
commit | 2b6b822823efc91579b370c730decf5a5b8fede9 (patch) | |
tree | 4882f08725d0e27866a9633f81b7a39f79bdc81e /PKGBUILD | |
download | aur-2b6b822823efc91579b370c730decf5a5b8fede9.tar.gz |
newpkg: git-credential-manager-core 2.0.498
- Initial release. Package written from scratch using the PKGBUILD
template within `pacman`.
- Validated agains `namcap` as much as possible.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1f0ae0049974 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,77 @@ +# Maintainer: Giovanni Santini <giovannisantini93@yahoo.it> +pkgbase=git-credential-manager-core +pkgname=("$pkgbase" "${pkgbase}-extras") +pkgver=2.0.498 +pkgrel=1 +pkgdesc="A secure Git credential helper built on .NET that runs on Windows, macOS, and Linux" +arch=(i686 x86_64) +url="https://github.com/microsoft/Git-Credential-Manager-Core" +license=('MIT') +makedepends=(git dotnet-sdk dpkg) +provides=($pkgname) +conflicts=("${pkgname}-bin") +replaces=(git-credential-manager) +options=(!strip) +install=$pkgname.install +source=("$pkgbase::git+$url.git#tag=v$pkgver" + "trim-executables.diff") +sha256sums=('SKIP' + '3eb41718ef9c701307a6ca7ef85b6993d93fe55b5ad4fad632ff5722779397cf') + +prepare() { + cd "$pkgbase" + # Based on this chinese article: + # https://live4thee.github.io/posts/2021-02-09-dotnet-core-on-linux-2/ + # Thanks web translators :P + git apply ../trim-executables.diff +} + +build() { + cd "$pkgbase" + dotnet build --configuration=LinuxRelease +} + +check() { + cd "$pkgbase" + dotnet test --configuration LinuxRelease +} + +package_git-credential-manager-core() { + depends+=(zlib krb5) + optdepends=('git-credential-manager-core-extras: additional QT UIs for logging in') + + cd "$pkgbase" + mkdir -p "$pkgdir/usr/bin" + mkdir -p "$pkgdir/usr/lib/share/$pkgname" + mkdir -p "$pkgdir/usr/share/licenses/$pkgname" + + for bin in git-credential-manager-core + do + cp "out/linux/Packaging.Linux/payload/Release/$bin" "$pkgdir/usr/lib/share/$pkgname" + ln -s "/usr/lib/share/$pkgname/$bin" "$pkgdir/usr/bin/$bin" + done + + cp LICENSE "$pkgdir/usr/share/licenses/$pkgname" +} + +package_git-credential-manager-core-extras() { + pkgdesc="Additional login UIs to Github and Bitbucket for Git Credential Manager Core" + depends+=(zlib krb5 fontconfig) + + cd "$pkgbase" + + mkdir -p "$pkgdir/usr/lib/share/$pkgbase" + mkdir -p "$pkgdir/usr/share/licenses/$pkgname" + + for lib in libHarfBuzzSharp.so libSkiaSharp.so + do + cp "out/linux/Packaging.Linux/payload/Release/$lib" "$pkgdir/usr/lib/share/$pkgbase" + done + + for bin in GitHub.UI Atlassian.Bitbucket.UI + do + cp "out/linux/Packaging.Linux/payload/Release/$bin" "$pkgdir/usr/lib/share/$pkgbase" + done + + cp LICENSE "$pkgdir/usr/share/licenses/$pkgname" +} |