archrelease: copy trunk to community-any
[ArchLinux/community.git] / prjtrellis / repos / community-x86_64 / PKGBUILD
blobcfa951095f0225b7b9195a7efa039728864c0ad9
1 # Maintainer: Filipe LaĆ­ns (FFY00) <lains@archlinux.org>
3 _prj=trellis
4 pkgname=prj$_prj
5 pkgver=1.3
6 pkgrel=2
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=('custom:ISC' 'MIT')
11 depends=('boost-libs')
12 makedepends=('cmake' "$pkgname-db" 'boost' 'python')
13 optdepends=('python: Python support')
14 provides=('libtrellis')
15 conflicts=('libtrellis')
16 source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
17 sha512sums=('8cc6ccf7d2e723652d3a2cb2598f7d929fd1c7eb1d3f7b88c560fca931200d3eb41a69e6688857af572c1ba11b73ba0bac067f372c1f48dda6700114f06b0ad4')
19 prepare() {
20   cd $pkgname-$pkgver
22   sed -i 's|set(LIBDIR "lib64")|set(LIBDIR "lib")|
23           s|project(libtrellis)|project(libtrellis VERSION 1.0)|' libtrellis/CMakeLists.txt
26 build() {
27   mkdir $pkgname-$pkgver/libtrellis/build
28   cd $pkgname-$pkgver/libtrellis/build
30   cmake .. \
31     -DCMAKE_INSTALL_PREFIX=/usr \
32     -DCMAKE_INSTALL_LIBDIR=/lib \
33     -DCMAKE_BUILD_TYPE=Release
35   sed -i '/Boost::python-NOTFOUND/d' CMakeFiles/*.dir/build.make
36   sed -i 's|Boost::python-NOTFOUND||g' CMakeFiles/*.dir/link.txt
38   make
41 package() {
42   cd $pkgname-$pkgver
44   install -Dm 644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
46   cd libtrellis/build
48   make DESTDIR="$pkgdir" install
50   mv "$pkgdir"/lib "$pkgdir"/usr/lib
52   # The database is provided in a separate package
53   rmdir "$pkgdir"/usr/share/$_prj/database