summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO45
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD50
3 files changed, 98 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..3d3db6a7a82
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,45 @@
+pkgbase = haskell-brittany
+ pkgdesc = Haskell source code formatter
+ pkgver = 0.12.1.1
+ pkgrel = 1
+ url = https://hackage.haskell.org/package/brittany
+ arch = x86_64
+ license = AGPL-3
+ makedepends = ghc
+ depends = ghc-libs
+ depends = haskell-aeson
+ depends = haskell-butcher
+ depends = haskell-bytestring
+ depends = haskell-cmdargs
+ depends = haskell-containers
+ depends = haskell-czipwith
+ depends = haskell-data-tree-print
+ depends = haskell-deepseq
+ depends = haskell-directory
+ depends = haskell-extra
+ depends = haskell-filepath
+ depends = haskell-ghc-boot-th
+ depends = haskell-ghc-exactprint
+ depends = haskell-ghc-paths
+ depends = haskell-hspec
+ depends = haskell-monad-memo
+ depends = haskell-mtl
+ depends = haskell-multistate
+ depends = haskell-neat-interpolation
+ depends = haskell-parsec
+ depends = haskell-pretty
+ depends = haskell-random
+ depends = haskell-safe
+ depends = haskell-semigroups
+ depends = haskell-strict
+ depends = haskell-syb
+ depends = haskell-text
+ depends = haskell-transformers
+ depends = haskell-uniplate
+ depends = haskell-unsafe
+ depends = haskell-yaml
+ source = https://hackage.haskell.org/packages/archive/brittany/0.12.1.1/brittany-0.12.1.1.tar.gz
+ sha512sums = ac471ab778efd1a007e76594a54fe3bea8f96afc3f0714c7b0ec66273788a6c9d8e0d0b9d5e36c2a10d547d10a6ad2327ea540d836b9a12549a918b5c83a9425
+
+pkgname = haskell-brittany
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..8e840973051
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*
+!.*
+!PKGBUILD
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..efda09c5d64
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: 71e6fd52 <71e6fd52 at gmail dot com>
+
+_hkgname=brittany
+pkgname=haskell-brittany
+pkgver=0.12.1.1
+pkgrel=1
+pkgdesc="Haskell source code formatter (dynamic link)"
+url='https://hackage.haskell.org/package/brittany'
+license=('AGPL3')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-aeson' 'haskell-butcher' 'haskell-bytestring' 'haskell-cmdargs' 'haskell-containers' 'haskell-czipwith' 'haskell-data-tree-print' 'haskell-deepseq' 'haskell-directory' 'haskell-extra' 'haskell-filepath' 'haskell-ghc-boot-th' 'haskell-ghc-exactprint' 'haskell-ghc-paths' 'haskell-hspec' 'haskell-monad-memo' 'haskell-mtl' 'haskell-multistate' 'haskell-neat-interpolation' 'haskell-parsec' 'haskell-pretty' 'haskell-random' 'haskell-safe' 'haskell-semigroups' 'haskell-strict' 'haskell-syb' 'haskell-text' 'haskell-transformers' 'haskell-uniplate' 'haskell-unsafe' 'haskell-yaml')
+makedepends=('ghc')
+source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
+sha512sums=('ac471ab778efd1a007e76594a54fe3bea8f96afc3f0714c7b0ec66273788a6c9d8e0d0b9d5e36c2a10d547d10a6ad2327ea540d836b9a12549a918b5c83a9425')
+
+prepare() {
+ cd $_hkgname-$pkgver
+
+ sed -i -r 's/(neat-interpolation) .*$/\1/' $_hkgname.cabal
+}
+
+build() {
+ cd $_hkgname-$pkgver
+
+ runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+ --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \
+ --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
+ --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 $_hkgname-$pkgver
+ runhaskell Setup test
+}
+
+package() {
+ cd $_hkgname-$pkgver
+
+ 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
+}