summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorShohei Maruyama2023-01-17 19:17:48 +0900
committerShohei Maruyama2023-01-17 19:17:48 +0900
commit9a377099f106958f421fa1611d258c6e014633aa (patch)
tree3699881bf48db53cfee925a9df4dc49085d65655
downloadaur-9a377099f106958f421fa1611d258c6e014633aa.tar.gz
Initial commit
Signed-off-by: Shohei Maruyama <cheat.sc.linux@outlook.com>
-rw-r--r--.SRCINFO27
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD64
3 files changed, 95 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..265b61eae669
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = elm-git
+ pkgdesc = Compiler for Elm, a functional language for reliable webapps
+ pkgver = 0.18.0.r1814.g047d5026
+ pkgrel = 1
+ url = https://github.com/elm/compiler
+ arch = x86_64
+ arch = aarch64
+ license = BSD
+ makedepends = ghc
+ makedepends = uusi
+ depends = ghc-libs
+ depends = haskell-file-embed
+ depends = haskell-filelock
+ depends = haskell-sha
+ depends = haskell-snap-server
+ depends = haskell-zip-archive
+ depends = haskell-raw-strings-qq
+ depends = haskell-language-glsl
+ depends = haskell-http
+ depends = haskell-ansi-wl-pprint
+ depends = haskell-http-client-tls
+ depends = haskell-edit-distance
+ depends = haskell-utf8-string
+ source = git+https://github.com/elm/compiler.git
+ sha256sums = SKIP
+
+pkgname = elm-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..e1e9014d7c68
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/src
+/pkg
+/compiler
+/*.pkg.tar.*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1d6d4cbf7a44
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,64 @@
+# Maintainer: Shohei Maruyama <cheat.sc.linux@outlook.com>
+
+pkgname='elm-git'
+pkgver=0.18.0.r1814.g047d5026
+pkgrel=1
+pkgdesc='Compiler for Elm, a functional language for reliable webapps'
+arch=('x86_64' 'aarch64')
+url='https://github.com/elm/compiler'
+license=('BSD')
+source=("git+https://github.com/elm/compiler.git")
+depends=(
+ 'ghc-libs'
+ 'haskell-file-embed'
+ 'haskell-filelock'
+ 'haskell-sha'
+ 'haskell-snap-server'
+ 'haskell-zip-archive'
+ 'haskell-raw-strings-qq'
+ 'haskell-language-glsl'
+ 'haskell-http'
+ 'haskell-ansi-wl-pprint'
+ 'haskell-http-client-tls'
+ 'haskell-edit-distance'
+ 'haskell-utf8-string'
+)
+makedepends=(
+ 'ghc'
+ 'uusi'
+)
+sha256sums=('SKIP')
+
+pkgver() {
+ cd compiler
+
+ git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd compiler
+
+ gen-setup
+ uusi -u HTTP -u ansi-terminal -u containers -u http-client -u network elm.cabal
+}
+
+build() {
+ cd compiler
+
+ runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+ --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --disable-tests \
+ --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
+ --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+ --ghc-option='-pie'
+
+ runhaskell Setup build ${MAKEFLAGS}
+}
+
+package() {
+ cd compiler
+
+ runhaskell Setup copy --destdir="${pkgdir}"
+ install -D -m644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
+ rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
+ rm -rf "${pkgdir}/usr/share/doc"
+}