summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgesh2023-12-31 21:29:23 +0200
committergesh2023-12-31 21:29:23 +0200
commitab230c8ea776c97221860c4c15d2035bf0a34b20 (patch)
treec483aebba0d54bc880e38c383644467a2cafc8e0
downloadaur-ab230c8ea776c97221860c4c15d2035bf0a34b20.tar.gz
Initial commit
-rw-r--r--.SRCINFO15
-rw-r--r--.gitattributes2
-rw-r--r--PKGBUILD43
3 files changed, 60 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ef70fc9a1177
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = ormolu-static-git
+ pkgdesc = A formatter for Haskell source code
+ pkgver = 0.7.3.0.r6.g05647fd
+ pkgrel = 1
+ url = https://github.com/tweag/ormolu
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = stack
+ depends = gmp
+ provides = ormolu
+ source = ormolu-static-git::git+https://github.com/tweag/ormolu
+ sha256sums = SKIP
+
+pkgname = ormolu-static-git
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000000..d056e18cf48a
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+.SRCINFO -whitespace
+0001-Build-with-GHC-8.10.4-and-9.0.1.patch binary
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6ead0e0f9edc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Gesh <gesh@gesh.uni.cx>
+# Contributor: amesgen <amesgen AT amesgen DOT de>
+# Based on ormolu and ormolu-bin by amesgen
+
+pkgname=ormolu-static-git
+_pkgname="${pkgname%-static-git}"
+pkgver=0.7.3.0.r6.g05647fd
+pkgrel=1
+pkgdesc="A formatter for Haskell source code"
+arch=('i686' 'x86_64')
+url="https://github.com/tweag/${_pkgname}"
+license=('custom')
+provides=("$_pkgname")
+depends=('gmp')
+makedepends=('stack')
+source=("${pkgname}::git+${url}")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$pkgname"
+ git describe --tags --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "${pkgname}"
+ stack build
+}
+
+package() {
+ cd "${pkgname}"
+ stack install --local-bin-path "${pkgdir}/usr/bin"
+ install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
+
+ _install_completion_script bash bash-completion/completions/ormolu
+ _install_completion_script zsh zsh/site-functions/_ormolu
+ _install_completion_script fish fish/vendor_completions.d/ormolu.fish
+}
+
+_install_completion_script() {
+ install -Dm644 \
+ <("$pkgdir/usr/bin/ormolu" --$1-completion-script /usr/bin/ormolu) \
+ "$pkgdir/usr/share/$2"
+}