summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiovanni Santini2021-09-09 23:51:14 +0200
committerGiovanni Santini2021-09-10 00:13:13 +0200
commit2b6b822823efc91579b370c730decf5a5b8fede9 (patch)
tree4882f08725d0e27866a9633f81b7a39f79bdc81e
downloadaur-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.
-rw-r--r--.SRCINFO31
-rw-r--r--PKGBUILD77
-rw-r--r--git-credential-manager-core.install17
-rw-r--r--trim-executables.diff28
4 files changed, 153 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e9b8f9536d89
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,31 @@
+pkgbase = git-credential-manager-core
+ pkgdesc = A secure Git credential helper built on .NET that runs on Windows, macOS, and Linux
+ pkgver = 2.0.498
+ pkgrel = 1
+ url = https://github.com/microsoft/Git-Credential-Manager-Core
+ install = git-credential-manager-core.install
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = dotnet-sdk
+ makedepends = dpkg
+ provides = git-credential-manager-core
+ conflicts = git-credential-manager-core-bin
+ replaces = git-credential-manager
+ options = !strip
+ source = git-credential-manager-core::git+https://github.com/microsoft/Git-Credential-Manager-Core.git#tag=v2.0.498
+ source = trim-executables.diff
+ sha256sums = SKIP
+ sha256sums = 3eb41718ef9c701307a6ca7ef85b6993d93fe55b5ad4fad632ff5722779397cf
+
+pkgname = git-credential-manager-core
+ depends = zlib
+ depends = krb5
+ optdepends = git-credential-manager-core-extras: additional QT UIs for logging in
+
+pkgname = git-credential-manager-core-extras
+ pkgdesc = Additional login UIs to Github and Bitbucket for Git Credential Manager Core
+ depends = zlib
+ depends = krb5
+ depends = fontconfig
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"
+}
diff --git a/git-credential-manager-core.install b/git-credential-manager-core.install
new file mode 100644
index 000000000000..96386db597f2
--- /dev/null
+++ b/git-credential-manager-core.install
@@ -0,0 +1,17 @@
+## arg 1: the new package version
+post_install() {
+ echo "Remember to execute:"
+ echo
+ echo " git-credential-manager-core configure"
+ echo
+ echo "In order to use Git-Credential-Manager-Core."
+ echo
+ echo "Additionally, follow the guide here:"
+ echo
+ echo " https://aka.ms/gcmcore-linuxcredstores"
+ echo
+}
+
+post_remove() {
+ echo "Control your 'git config' and remove all the informations related to Git-Credential-Manager-Core"
+}
diff --git a/trim-executables.diff b/trim-executables.diff
new file mode 100644
index 000000000000..b1b9ce81ec8a
--- /dev/null
+++ b/trim-executables.diff
@@ -0,0 +1,28 @@
+diff --git a/src/linux/Packaging.Linux/build.sh b/src/linux/Packaging.Linux/build.sh
+index f1c7473..7904b91 100755
+--- a/src/linux/Packaging.Linux/build.sh
++++ b/src/linux/Packaging.Linux/build.sh
+@@ -98,6 +98,7 @@ dotnet publish "$GCM_SRC" \
+ --runtime="$RUNTIME" \
+ --self-contained=true \
+ -p:PublishSingleFile=true \
++ -p:PublishTrimmed=true \
+ --output="$(make_absolute "$PAYLOAD")" || exit 1
+
+ echo "Publishing Bitbucket UI helper..."
+@@ -107,6 +108,7 @@ dotnet publish "$BITBUCKET_UI_SRC" \
+ --runtime="$RUNTIME" \
+ --self-contained=true \
+ -p:PublishSingleFile=true \
++ -p:PublishTrimmed=true \
+ --output="$(make_absolute "$PAYLOAD")" || exit 1
+
+ echo "Publishing GitHub UI helper..."
+@@ -116,6 +118,7 @@ dotnet publish "$GITHUB_UI_SRC" \
+ --runtime="$RUNTIME" \
+ --self-contained=true \
+ -p:PublishSingleFile=true \
++ -p:PublishTrimmed=true \
+ --output="$(make_absolute "$PAYLOAD")" || exit 1
+
+ # Collect symbols