summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b3153210cd52cdf6f31b4730f39ab780d6de1d5f (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
# Maintainer: Jonathan Tremesaygues <killruana@slaanesh.org>
pkgname=magic-git
pkgver=r646.594fc58
pkgrel=1
pkgdesc="A VLSI layout system"
url="http://opencircuitdesign.com/magic/"
arch=('i686' 'x86_64')
license=('custom:copyright')
provides=('magic')
conflicts=('magic')
depends=('tcl' 'tk' 'libx11')
makedepends=('git' 'tcsh')
optdepends=('mesa: for better graphics'
            'cairo: for better graphics'
            'glu: for better graphics'
            'blt: to create a tree diagram of the cell hierarchy in a design')
source=("git://opencircuitdesign.com/magic#branch=magic-8.2")
md5sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname%-git}"

  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
   cd "$srcdir/${pkgname%-git}"
   ./configure --prefix=/usr
   make
}

package() {
   cd "$srcdir/${pkgname%-git}"
   make -j1 DESTDIR="$pkgdir" MANDIR=/usr/share/man install
   install -d "$pkgdir/usr/share/licenses/$pkgname"
   if [ -x /usr/bin/ps2ascii ]; then
      /usr/bin/ps2ascii "$pkgdir/usr/lib/magic/doc/copyright.ps" > "$pkgdir/usr/share/licenses/$pkgname/copyright"
   else
      install -m644 "$pkgdir/usr/lib/magic/doc/copyright.ps" "$pkgdir/usr/share/licenses/magic"
   fi
   mv "$pkgdir/usr/share/man/man1/extcheck.1" "$pkgdir/usr/share/man/man1/extcheck-magic.1"
}