Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also fixes issue with ngspice binary not being packaged. Library is now moved to subpackage libngspice.
- Loading branch information
Showing
4 changed files
with
40 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ngspice |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,62 @@ | ||
# Template file for 'ngspice' | ||
pkgname=ngspice | ||
version=33 | ||
version=34 | ||
revision=1 | ||
build_style=gnu-configure | ||
configure_args="--with-readline=yes --with-ngshared --enable-xspice --enable-cider" | ||
configure_args="--with-ngshared --enable-xspice --enable-cider" | ||
hostmakedepends="bison byacc" | ||
makedepends="readline-devel libX11-devel libXaw-devel" | ||
short_desc="Mixed Mode Mixed Level Circuit Simulator based on Spice3F5" | ||
maintainer="Toyam Cox <Vaelatern@voidlinux.org>" | ||
license="BSD-3-Clause" | ||
homepage="http://ngspice.sourceforge.net" | ||
distfiles="${SOURCEFORGE_SITE}/ngspice/ng-spice-rework/${version}/${pkgname}-${version}.tar.gz" | ||
checksum=b99db66cc1c57c44e9af1ef6ccb1dcbc8ae1df3e35acf570af578f606f8541f1 | ||
checksum=2263fffc6694754972af7072ef01cfe62ac790800dad651bc290bfcae79bd7b5 | ||
|
||
# Configure can only handle building ngspice as a library or as a binary, but not both, | ||
# so essentially we have to build ngspice twice | ||
pre_configure() { | ||
install -d .build_bins | ||
cp -fpr * .build_bins/ | ||
} | ||
|
||
# --with-ngshared builds the library, but not binary, so remove flag for the second pass. | ||
# readline should not be configured for the library, but include it here, | ||
# see: https://github.com/imr/ngspice/commit/b86c85f85bbba6e45dc030af3e853edf8b9cfa3d | ||
post_configure() { | ||
cd .build_bins | ||
configure_args="--with-readline=yes $(printf %s\\n "$configure_args" | sed 's/--with-ngshared//')" do_configure | ||
} | ||
|
||
post_build() { | ||
cd .build_bins | ||
do_build | ||
} | ||
|
||
post_install() { | ||
vlicense COPYING | ||
cd .build_bins | ||
do_install | ||
# cmpp is not distributed in v34, so don't include man page | ||
rm -f "${DESTDIR}/usr/share/man/man1/cmpp.1" | ||
# config.h is an internal header file, so don't include | ||
# this will probably be fixed in v35 | ||
rm -f "${DESTDIR}/usr/include/config.h" | ||
} | ||
|
||
ngspice-devel_package() { | ||
short_desc+=" - development files" | ||
depends="${sourcepkg}>=${version}_${revision}" | ||
depends="libngspice>=${version}_${revision}" | ||
pkg_install() { | ||
vmove usr/include | ||
vmove "usr/lib/*.so" | ||
vmove usr/lib/pkgconfig | ||
} | ||
} | ||
|
||
libngspice_package() { | ||
short_desc+=" - library" | ||
pkg_install() { | ||
vmove "usr/lib/libngspice.so.*" | ||
} | ||
} |