summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Springer2020-08-02 01:56:58 +0200
committerFelix Springer2020-08-02 01:56:58 +0200
commitef9022d2441c88d96d171010ce14641b7dadd6d9 (patch)
tree8864f57c3e836edf23efa4ce8bbcd76fdcc89ccc
downloadaur-ef9022d2441c88d96d171010ce14641b7dadd6d9.tar.gz
initial commit
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD80
-rw-r--r--Setup.hs2
-rw-r--r--compile-dynamically.patch11
4 files changed, 119 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1ebc4df211d4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = bludigon
+ pkgver = 0.1.0.0
+ pkgrel = 1
+ url = https://github.com/jumper149/bludigon
+ arch = x86_64
+ license = custom:BSD3
+ depends = ghc
+ depends = ghc-libs
+ depends = haskell-data-default
+ depends = haskell-finite-typelits
+ depends = haskell-lifted-base
+ depends = haskell-monad-control
+ depends = haskell-time-compat
+ depends = haskell-transformers-base
+ depends = haskell-x11
+ depends = libx11
+ depends = libxrandr
+ source = git+https://github.com/jumper149/bludigon.git
+ source = compile-dynamically.patch
+ source = Setup.hs
+ sha256sums = SKIP
+ sha256sums = acb3e75bd709d855e4715bc48250fe01163ded72ad42a094d80925e3854b8b83
+ sha256sums = 5066653559d4d6134b022d66a634a17fdcf8db35d28b447e581fec284afa4689
+
+pkgname = bludigon
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d0d03052b859
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,80 @@
+# Maintainer: Felix Springer <felixspringer149@gmail.com>
+
+pkgname=bludigon
+pkgver=0.1.0.0
+pkgrel=1
+pkgdesc=""
+url="https://github.com/jumper149/bludigon"
+license=('custom:BSD3')
+arch=('x86_64')
+depends=(
+ 'ghc'
+ 'ghc-libs'
+ 'haskell-data-default'
+ 'haskell-finite-typelits'
+ 'haskell-lifted-base'
+ 'haskell-monad-control'
+ 'haskell-time-compat'
+ 'haskell-transformers-base'
+ 'haskell-x11'
+ 'libx11'
+ 'libxrandr'
+)
+source=(
+ "git+https://github.com/jumper149/${pkgname}.git"
+ "compile-dynamically.patch"
+ "Setup.hs"
+)
+sha256sums=(
+ 'SKIP'
+ 'acb3e75bd709d855e4715bc48250fe01163ded72ad42a094d80925e3854b8b83'
+ '5066653559d4d6134b022d66a634a17fdcf8db35d28b447e581fec284afa4689'
+)
+
+prepare() {
+ cd "${pkgname}"
+
+ patch -p1 -i "${srcdir}/compile-dynamically.patch"
+ cp "${srcdir}/Setup.hs" "./"
+}
+
+build() {
+ cd "${pkgname}"
+
+ runhaskell Setup configure -O \
+ --disable-library-vanilla \
+ --docdir="/usr/share/doc/${pkgname}" \
+ --dynlibdir="/usr/lib" \
+ --enable-executable-dynamic \
+ --enable-shared \
+ --enable-tests \
+ --libsubdir=\$compiler/site-local/\$pkgid \
+ --prefix="/usr" \
+ #--datasubdir="${pkgname}" \
+ #--ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+ #--ghc-option='-pie' \
+
+ runhaskell Setup build
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+check() {
+ cd ${pkgname}
+
+ runhaskell Setup test
+}
+
+package() {
+ cd "${pkgname}"
+
+ install -D -m744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
+ install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
+ runhaskell Setup copy --destdir="${pkgdir}"
+ install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
+}
+
+# vim: ts=2 sw=2 et:
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
index 000000000000..9a994af677b0
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/compile-dynamically.patch b/compile-dynamically.patch
new file mode 100644
index 000000000000..1217c5e4eac1
--- /dev/null
+++ b/compile-dynamically.patch
@@ -0,0 +1,11 @@
+diff -ura bludigon.orig/src/Bludigon/Main/CLI.hs bludigon/src/Bludigon/Main/CLI.hs
+--- bludigon.orig/src/Bludigon/Main/CLI.hs 2020-08-02 01:26:50.529886479 +0200
++++ bludigon/src/Bludigon/Main/CLI.hs 2020-08-02 01:39:45.761627593 +0200
+@@ -79,6 +79,7 @@
+ runProcess "ghc" [ "--make"
+ , configLeafname
+ , "-main-is", "main"
++ , "-dynamic"
+ , "-v0"
+ , "-o", cacheDir </> compiledConfigLeafname
+ ] (Just configDir) Nothing Nothing Nothing Nothing