summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatheus Gabriel Werny de Lima2022-09-30 15:01:50 +0200
committerMatheus Gabriel Werny de Lima2022-09-30 15:01:50 +0200
commit8c5b73feb26ff3bed47c8a6f68678e16488ae1f8 (patch)
tree1451de2b8b1fbf2d2b60a1c1923e05105945ed9b
downloadaur-8c5b73feb26ff3bed47c8a6f68678e16488ae1f8.tar.gz
Initial commit.
-rw-r--r--.SRCINFO14
-rwxr-xr-xPKGBUILD47
2 files changed, 61 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0286025887e6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = dprint-plugin-markdown
+ pkgdesc = Markdown code formatting plugin for dprint.
+ pkgver = 0.14.1
+ pkgrel = 1
+ url = https://github.com/dprint/dprint-plugin-markdown
+ arch = any
+ license = MIT
+ makedepends = rust
+ makedepends = rust-wasm
+ depends = dprint
+ source = dprint-plugin-markdown-v0.14.1.tar.gz::https://github.com/dprint/dprint-plugin-markdown/archive/refs/tags/0.14.1.tar.gz
+ sha512sums = bb4a1f6bb506a14cb4679bfa3eae0d119de1a855308155db77c8f932e78565ab83d47794623c1041c6c16d01633310ea70667865a61adee5c85379ad27eb6bbd
+
+pkgname = dprint-plugin-markdown
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 000000000000..6294c64d5265
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+#!/usr/bin/env bash
+# shellcheck disable=SC2034
+# shellcheck disable=SC2154
+# Maintainer: Matheus Gabriel Werny de Lima <matheusgwdl@protonmail.com>
+
+pkgname="dprint-plugin-markdown"
+pkgver="0.14.1"
+pkgrel="1"
+pkgdesc="Markdown code formatting plugin for dprint."
+arch=("any")
+url="https://github.com/dprint/${pkgname}"
+license=("MIT")
+depends=("dprint")
+makedepends=("rust" "rust-wasm")
+source=("${pkgname}-v${pkgver}.tar.gz::${url}/archive/refs/tags/${pkgver}.tar.gz")
+sha512sums=("bb4a1f6bb506a14cb4679bfa3eae0d119de1a855308155db77c8f932e78565ab83d47794623c1041c6c16d01633310ea70667865a61adee5c85379ad27eb6bbd")
+
+prepare()
+{
+ cd "${srcdir}"/"${pkgname}"-"${pkgver}"/ || exit 1
+ cargo fetch --locked --target "${CARCH}-unknown-linux-gnu"
+}
+
+build()
+{
+ cd "${srcdir}"/"${pkgname}"-"${pkgver}"/ || exit 1
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target/
+ cargo build --all-features --frozen -r --target wasm32-unknown-unknown
+}
+
+package()
+{
+ # Assure that the directories exist.
+ mkdir -p "${pkgdir}"/usr/lib/dprint/
+ mkdir -p "${pkgdir}"/usr/share/doc/"${pkgname}"/
+ mkdir -p "${pkgdir}"/usr/share/licenses/"${pkgname}"/
+
+ # Install the software.
+ install -Dm755 "${srcdir}"/"${pkgname}"-"${pkgver}"/target/wasm32-unknown-unknown/release/"${pkgname//-/_}".wasm "${pkgdir}"/usr/lib/dprint/
+
+ # Install the documentation.
+ install -Dm644 "${srcdir}"/"${pkgname}"-"${pkgver}"/README.md "${pkgdir}"/usr/share/doc/"${pkgname}"/
+
+ # Install the license.
+ install -Dm644 "${srcdir}"/"${pkgname}"-"${pkgver}"/LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/
+}