diff options
Diffstat (limited to 'academic/ngspice')
-rw-r--r-- | academic/ngspice/README | 27 | ||||
-rw-r--r-- | academic/ngspice/ngspice.SlackBuild | 100 | ||||
-rw-r--r-- | academic/ngspice/ngspice.info | 10 | ||||
-rw-r--r-- | academic/ngspice/patches/ngspice-xgraph.patch.gz | bin | 0 -> 26456 bytes | |||
-rw-r--r-- | academic/ngspice/slack-desc | 19 |
5 files changed, 156 insertions, 0 deletions
diff --git a/academic/ngspice/README b/academic/ngspice/README new file mode 100644 index 0000000000..d9b415f1cf --- /dev/null +++ b/academic/ngspice/README @@ -0,0 +1,27 @@ +Ngspice is a mixed-level/mixed-signal circuit simulator. Its code is +based on three open source software packages: Spice3f5, Cider1b1 and +Xspice. Ngspice is part of gEDA project, a full GPL'd suite of +Electronic Design Automation tools. + +Spice3 does not need any introduction, is the most popular circuit +simulator. In over 30 years of its life Spice3 has become a de-facto +standard for simulating circuits. + +Cider couples Spice3f5 circuit level simulator to DSIM device +simulator to provide greater simulation accuracy of critical +devices. DSIM devices are described in terms of their structures and +materials. + +Xspice is an extension to Spice3C1 that provides code modeling support +and simulation of digital components through an embedded event driven +algorithm. + +Ngspice is, anyway, a little more than the simple sum of the packages +above, as many people contributed to the project with their +experience, their bug fixes and their improvements. If you are +interested, browse the site and discover what ngspice offers and what +needs. If you think you can help, join the development team. + +Ngspice is an ongoing project, growing everyday from users +contributions, suggestions and reports. What we will be able to do +depends mostly on user interests, contributions and feedback. diff --git a/academic/ngspice/ngspice.SlackBuild b/academic/ngspice/ngspice.SlackBuild new file mode 100644 index 0000000000..ac2337ad49 --- /dev/null +++ b/academic/ngspice/ngspice.SlackBuild @@ -0,0 +1,100 @@ +#!/bin/sh + +# Slackware build script for ngspice +# Written by B. Jogai <jogaib {at} comcast [dot] net> + +# Set initial variables: + +PRGNAM=ngspice +VERSION=20 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/ng-spice-rework-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +# Apply patch for missing xgraph support +zcat $CWD/patches/ngspice-xgraph.patch.gz | patch -p1 + +# Fix the lib path to the code modules +if [ "$ARCH" = "x86_64" ]; then + sed -i "s%/lib/%/lib${LIBDIRSUFFIX}/%g" src/spinit.in +fi + +CFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix=/usr \ + --bindir=/usr/bin \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --disable-debug \ + --with-readline=yes \ + --enable-xgraph \ + --enable-xspice \ + --enable-cider \ + --enable-dot-global \ + --enable-intnoise \ + --enable-numparam \ + --enable-shared \ + --disable-static \ + --build=$ARCH-slackware-linux + +make +make DESTDIR=$PKG install + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples + +cp -a ANALYSES AUTHORS BUGS COPYING ChangeLog DEVICES FAQ \ + INSTALL NEWS README* doc/*.pdf doc/*.ps examples/ \ + xgraph/examples/ \ + $PKG/usr/doc/$PRGNAM-$VERSION/ +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \; + + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true +) + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +) + +rm -f $PKG/usr/info/dir +gzip -9 $PKG/usr/info/*.info* + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/academic/ngspice/ngspice.info b/academic/ngspice/ngspice.info new file mode 100644 index 0000000000..d06d8f8f7b --- /dev/null +++ b/academic/ngspice/ngspice.info @@ -0,0 +1,10 @@ +PRGNAM="ngspice" +VERSION="20" +HOMEPAGE="http://ngspice.sourceforge.net/" +DOWNLOAD="http://downloads.sourceforge.net/project/ngspice/ng-spice-rework/20/ng-spice-rework-20.tar.gz" +DOWNLOAD_x86_64="" +MD5SUM="81bc667a4190ef31081a6957d3c7f7b5" +MD5SUM_x86_64="" +MAINTAINER="B. Jogai" +EMAIL="jogaib <at> comcast {dot} net" +APPROVED="dsomero" diff --git a/academic/ngspice/patches/ngspice-xgraph.patch.gz b/academic/ngspice/patches/ngspice-xgraph.patch.gz Binary files differnew file mode 100644 index 0000000000..589a4d8417 --- /dev/null +++ b/academic/ngspice/patches/ngspice-xgraph.patch.gz diff --git a/academic/ngspice/slack-desc b/academic/ngspice/slack-desc new file mode 100644 index 0000000000..e643111733 --- /dev/null +++ b/academic/ngspice/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +ngspice: Ngspice (mixed-level/mixed-signal circuit simulator) +ngspice: +ngspice: Ngspice is a mixed-level/mixed-signal circuit simulator. Its code is +ngspice: based on three open source software packages: Spice3f5, Cider1b1 and +ngspice: Xspice. Ngspice is part of gEDA project, a full GPL'd suite of +ngspice: Electronic Design Automation tools. +ngspice: +ngspice: +ngspice: +ngspice: +ngspice: |