PKGBUILD 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Maintainer (Arch): Filipe Laíns (FFY00) <lains@archlinux.org>
  2. # Maintainer: Sagar Acharya <sagar@hyperbola.info>
  3. _prj=trellis
  4. pkgname=prj$_prj
  5. pkgver=1.1
  6. pkgrel=1
  7. pkgdesc='Documentation and definitions for the Lattice ECP5 bit-stream format'
  8. arch=('x86_64')
  9. url='https://github.com/YosysHQ/prjtrellis'
  10. license=('ISC' 'Expat')
  11. depends=('boost-libs')
  12. makedepends=('cmake' "$pkgname-db" 'boost' 'python-sphinx' 'python-sphinx_rtd_theme' 'python-recommonmark')
  13. optdepends=('python: Python support')
  14. provides=('libtrellis')
  15. conflicts=('libtrellis')
  16. source=("https://github.com/YosysHQ/prjtrellis/archive/refs/tags/${pkgver}.tar.gz")
  17. sha512sums=('9f53e3eb605deadd635a957e4bdde6ade9f24c0b966b2f9ae62a01f8240508b623c30bf452ac276caffffc46edb00180b866f4bbc3ad58151d6b3c0263ab8f0d')
  18. prepare() {
  19. cd $pkgname-$pkgver
  20. sed -i 's|set(LIBDIR "lib64")|set(LIBDIR "lib")|
  21. s|project(libtrellis)|project(libtrellis VERSION 1.0)|' libtrellis/CMakeLists.txt
  22. }
  23. build() {
  24. mkdir $pkgname-$pkgver/libtrellis/build
  25. cd $pkgname-$pkgver/libtrellis/build
  26. cmake .. \
  27. -DCMAKE_INSTALL_PREFIX=/usr \
  28. -DCMAKE_INSTALL_LIBDIR=/lib \
  29. -DCMAKE_BUILD_TYPE=Release
  30. sed -i '/Boost::python-NOTFOUND/d' CMakeFiles/*.dir/build.make
  31. sed -i 's|Boost::python-NOTFOUND||g' CMakeFiles/*.dir/link.txt
  32. make
  33. cd ../../docs
  34. make html
  35. }
  36. package() {
  37. cd $pkgname-$pkgver
  38. install -dm 755 "$pkgdir"/usr/share/doc/$pkgname
  39. cp -r --no-preserve=ownership docs/_build/* "$pkgdir"/usr/share/doc/$pkgname/
  40. rm -rf "$pkgdir"/usr/share/doc/$pkgname/html/.doctrees
  41. install -Dm644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname
  42. cd libtrellis/build
  43. make DESTDIR="$pkgdir" install
  44. # The database is provided in a separate package
  45. rmdir "$pkgdir"/usr/share/$_prj/database
  46. }