summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 38142bd8d280e2cc0e08707e91f03b189d72816e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Maintainer: Jean-Luc Tambasco <an.obscurity@gmail.com>
# Based off `klayout` Arch AUR package.

_pkgname=klayout
pkgname=klayout-git
pkgver=v0.25.8
pkgrel=1
pkgdesc="High Performance Layout Viewer And Editor. Support of GDS and OASIS files."
arch=('i686' 'x86_64')
url="http://www.klayout.org/"
license=('GPL')
depends=('qt5-base' 'qt5-tools' 'qt5-multimedia' 'qt5-xmlpatterns' 'qt5-svg' 'ruby' 'python')
source=(
    'klayout::git+https://github.com/klayoutmatthias/klayout#branch=master'
	klayoutEditor.desktop
	klayoutViewer.desktop
)
md5sums=(SKIP
         'e790f7fca3c1138e21068d7927fb8ff4'
         'e6b98e9146c476a5cb76162999964aa8')

pkgver() {
  cd "$_pkgname"
  git tag | tail -1
}

build() {
	cd "$srcdir/klayout"

    # Checkout the latest release.
    git checkout tags/${pkgver}

    # Get thread count to multithread build process.
    threads="$(($(grep -c ^processor /proc/cpuinfo) + 1))"

	build_opt="-qmake /usr/bin/qmake
		-ruby /usr/bin/ruby
		-python /usr/bin/python3
        -j${threads}
        -qt5"

	./build.sh $build_opt
}

package() {
	cd "$srcdir"
	install -D -m 644 klayoutEditor.desktop ${pkgdir}/usr/share/applications/klayoutEditor.desktop
	install -D -m 644 klayoutViewer.desktop ${pkgdir}/usr/share/applications/klayoutViewer.desktop

	cd klayout
	install -D -m 644 etc/logo.png ${pkgdir}/usr/share/icons/hicolor/32x32/apps/klayout.png
	install -D -m 755 build-release/klayout ${pkgdir}/usr/bin/klayout

	cd bin-release
	for lib in `find . -type f | grep so`; do
		install -D -m 755 $lib ${pkgdir}/usr/lib/$lib
	done
	for lib in `find . -type l | grep so`; do
		cp -a $lib ${pkgdir}/usr/lib/$lib
	done
}