70 lines
2 KiB
Text
70 lines
2 KiB
Text
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
|
|
pkgname=ngspice
|
|
pkgver=37
|
|
pkgrel=0
|
|
pkgdesc="open source spice simulator for electric and electronic circuits"
|
|
url="https://ngspice.sourceforge.net/"
|
|
arch="!armv7 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/old-releases/$pkgver/ngspice-$pkgver.tar.gz
|
|
$pkgname.pc
|
|
"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
sed -e "s/@PKGVER@/$pkgver/" -i "$srcdir"/$pkgname.pc
|
|
|
|
# a lot of tests fail because of unexpected "No compatibility mode selected!"
|
|
# this replaces them with no-op makefiles
|
|
echo -e "check: ;\nall: ;\ninstall: ;" > tests/regression/Makefile.in
|
|
echo -e "check: ;\nall: ;\ninstall: ;" > tests/xspice/Makefile.in
|
|
}
|
|
|
|
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.4 "$pkgdir"/usr/lib/libngspice.so.0.0.4
|
|
install -Dm644 src/include/ngspice/sharedspice.h "$pkgdir"/usr/include/ngspice/sharedspice.h
|
|
ln -s "libngspice.so.0.0.4" "$pkgdir/usr/lib/libngspice.so.0"
|
|
ln -s "libngspice.so.0.0.4" "$pkgdir/usr/lib/libngspice.so"
|
|
install -Dm644 "$srcdir"/ngspice.pc "$pkgdir"/usr/lib/pkgconfig/ngspice.pc
|
|
}
|
|
|
|
sha512sums="
|
|
d49f7e78d3dd17ac8ea03d79dfbe8a9cf57c012395285cc0c0cf379e0c0c81f11cad68d5366dc2d2478959ed197e4d43380fbc15baf44f987f20ad00f1ee04ca ngspice-37.tar.gz
|
|
211321d3c56f06a58ce500807284657294beef1e712c2ce3e9b2253e622c6882cf1f1233fa18427902cac5bd9d31f48c7be64a03bc6e2705d3f10f4752c41b7c ngspice.pc
|
|
"
|