summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO40
-rw-r--r--PKGBUILD84
2 files changed, 124 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..819f2aed5537
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,40 @@
+pkgbase = implicitcad
+ pkgdesc = A math-inspired programmatic 2D & 3D CAD system based on OpenSCAD
+ pkgver = 0.3.0.1
+ pkgrel = 1
+ url = http://www.implicitcad.org/
+ arch = x86_64
+ license = AGPL3
+ makedepends = ghc
+ makedepends = haskell-criterion
+ depends = ghc-libs
+ depends = haskell-blaze-builder
+ depends = haskell-blaze-markup
+ depends = haskell-blaze-svg
+ depends = haskell-bytestring
+ depends = haskell-containers
+ depends = haskell-deepseq
+ depends = haskell-directory
+ depends = haskell-filepath
+ depends = haskell-hspec
+ depends = haskell-juicypixels
+ depends = haskell-monads-tf
+ depends = haskell-parallel
+ depends = haskell-parsec
+ depends = haskell-storable-endian
+ depends = haskell-text
+ depends = haskell-transformers
+ depends = haskell-vector-space
+ depends = haskell-filepath
+ depends = haskell-optparse-applicative
+ depends = haskell-vector-space
+ depends = haskell-bytestring
+ depends = haskell-snap-core
+ depends = haskell-snap-server
+ depends = haskell-text
+ depends = haskell-vector-space
+ source = https://hackage.haskell.org/packages/archive/implicit/0.3.0.1/implicit-0.3.0.1.tar.gz
+ sha256sums = 360428a3ac1870d8fc33bd535cde56499d3411404b0a10a34f125812db4804a4
+
+pkgname = implicitcad
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..16982a455ee9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,84 @@
+# Maintainer: Daniel Mouritzen <dmrtzn at gmail dot com>
+
+_hkgname=implicit
+pkgname=implicitcad
+pkgver=0.3.0.1
+pkgrel=1
+pkgdesc='A math-inspired programmatic 2D & 3D CAD system based on OpenSCAD'
+url="http://www.implicitcad.org/"
+license=('AGPL3')
+arch=('x86_64')
+depends=(
+ 'ghc-libs'
+
+ # library
+ 'haskell-blaze-builder'
+ 'haskell-blaze-markup'
+ 'haskell-blaze-svg'
+ 'haskell-bytestring'
+ 'haskell-containers'
+ 'haskell-deepseq'
+ 'haskell-directory'
+ 'haskell-filepath'
+ 'haskell-hspec'
+ 'haskell-juicypixels'
+ 'haskell-monads-tf'
+ 'haskell-parallel'
+ 'haskell-parsec'
+ 'haskell-storable-endian'
+ 'haskell-text'
+ 'haskell-transformers'
+ 'haskell-vector-space'
+
+ # extopenscad
+ 'haskell-filepath'
+ 'haskell-optparse-applicative'
+ 'haskell-vector-space'
+
+ # implicitsnap
+ 'haskell-bytestring'
+ 'haskell-snap-core'
+ 'haskell-snap-server'
+ 'haskell-text'
+ 'haskell-vector-space'
+)
+makedepends=(
+ 'ghc'
+
+ # Benchmark
+ 'haskell-criterion'
+)
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
+sha256sums=('360428a3ac1870d8fc33bd535cde56499d3411404b0a10a34f125812db4804a4')
+
+build() {
+ cd "$_hkgname-$pkgver"
+
+ runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+ --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir="$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 haddock
+ 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" lib:implicit exe:extopenscad
+ install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
+}