summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorShohei Maruyama2023-01-17 19:17:48 +0900
committerShohei Maruyama2023-01-17 19:17:48 +0900
commit9a377099f106958f421fa1611d258c6e014633aa (patch)
tree3699881bf48db53cfee925a9df4dc49085d65655 /PKGBUILD
downloadaur-9a377099f106958f421fa1611d258c6e014633aa.tar.gz
Initial commit
Signed-off-by: Shohei Maruyama <cheat.sc.linux@outlook.com>
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD64
1 files changed, 64 insertions, 0 deletions
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"
+}