aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ngspice/APKBUILD
blob: 076d0e0469a382c160564714b2faa1f17e8d4df6 (plain) (blame)
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
62
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=ngspice
pkgver=33
pkgrel=0
pkgdesc="open source spice simulator for electric and electronic circuits"
url="http://ngspice.sourceforge.net/"
arch="all"
license="BSD-3-Clause"
makedepends="libxaw-dev libedit-dev readline-dev"
depends="python3"
subpackages="$pkgname-doc $pkgname-dev"
source="
	https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/$pkgver/ngspice-$pkgver.tar.gz
	$pkgname.pc
	"

prepare() {
	default_prepare
	sed -e "s/@PKGVER@/$pkgver/" -i "$srcdir"/$pkgname.pc
}

build() {
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--with-readline=yes \
		--enable-xspice \
		--enable-cider \
		--enable-openmp \
		--with-ngshared

	make

	# build the binary ngspice, which is only build without --with-ngshared

	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--with-readline=yes \
		--enable-xspice \
		--enable-cider \
		--enable-openmp

	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm755 src/.libs/libngspice.so.0.0.0 "$pkgdir/usr/lib/libngspice.so.0.0.0"
	ln -s "libngspice.so.0.0.0" "$pkgdir/usr/lib/libngspice.so.0"
	ln -s "libngspice.so.0.0.0" "$pkgdir/usr/lib/libngspice.so"
	install -Dm644 "$srcdir"/$pkgname.pc "$pkgdir"/usr/lib/pkgconfig/$pkgname.pc
}

sha512sums="895e39f7de185df18bf443a9fa5691cdb3bf0a5091d9860d20ccb02254ef396a4cca5a1c8bf4ba19a03783fc89bb86649218cee977b0fe4565d3c84548943c09  ngspice-33.tar.gz
211321d3c56f06a58ce500807284657294beef1e712c2ce3e9b2253e622c6882cf1f1233fa18427902cac5bd9d31f48c7be64a03bc6e2705d3f10f4752c41b7c  ngspice.pc"