[arch-commits] Commit in prjtrellis/trunk (PKGBUILD)

Filipe Laíns ffy00 at archlinux.org
Sun Mar 29 02:37:43 UTC 2020


    Date: Sunday, March 29, 2020 @ 02:37:43
  Author: ffy00
Revision: 605871

upgpkg: prjtrellis 1.0-1

Added:
  prjtrellis/trunk/PKGBUILD

----------+
 PKGBUILD |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

Added: PKGBUILD
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-03-29 02:37:43 UTC (rev 605871)
@@ -0,0 +1,59 @@
+# Maintainer: Filipe Laíns (FFY00) <lains at archlinux.org>
+
+_prj=trellis
+pkgname=prj$_prj
+pkgver=1.0
+pkgrel=1
+pkgdesc='Documentation and definitions for the Lattice ECP5 bit-stream format'
+arch=('x86_64')
+url='https://github.com/SymbiFlow/prjtrellis'
+license=('custom:ISC' 'MIT')
+depends=('boost-libs')
+makedepends=('cmake' "$pkgname-db" 'boost' 'python-sphinx' 'python-sphinx_rtd_theme' 'python-recommonmark')
+optdepends=('python: Python support')
+provides=('libtrellis')
+conflicts=('libtrellis')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
+sha512sums=('9418cd8b20e0121ca8fce3978b25209df5211b13692db9f86c08c01fc28e40b15dce5c1aed73e09f5e4d9b038259a2a4a8d346bc689d9f6f20782be170728b84')
+
+prepare() {
+  sed -i -e 's|set(LIBDIR "lib64")|set(LIBDIR "lib")|' \
+         -e 's|project(libtrellis)|project(libtrellis VERSION 1.0)|' \
+            $pkgname-$pkgver/libtrellis/CMakeLists.txt
+}
+
+build() {
+  mkdir $pkgname-$pkgver/libtrellis/build
+  cd $pkgname-$pkgver/libtrellis/build
+
+  cmake .. \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=/lib \
+    -DCMAKE_BUILD_TYPE=Release
+
+  sed -i '/Boost::python-NOTFOUND/d' CMakeFiles/*.dir/build.make
+  sed -i 's|Boost::python-NOTFOUND||g' CMakeFiles/*.dir/link.txt
+
+  make
+
+  cd ../../docs
+
+  make html
+}
+
+package() {
+  cd $pkgname-$pkgver
+
+  install -dm 755 "$pkgdir"/usr/share/doc/$pkgname
+  cp -r --no-preserve=ownership docs/_build/* "$pkgdir"/usr/share/doc/$pkgname/
+
+  install -Dm 644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+  cd libtrellis/build
+
+  make DESTDIR="$pkgdir" install
+
+  # The database is provided in a separate package
+  rmdir "$pkgdir"/usr/share/$_prj/database
+}
+



More information about the arch-commits mailing list