Репозиторий Sisyphus
Последнее обновление: 22 января 2021 | Пакетов: 17776 | Посещений: 20112873
en ru br
Репозитории ALT

Группа :: Engineering
Пакет: ngspice

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

# Unpackaged files in buildroot should terminate build
%define _unpackaged_files_terminate_build 1

%define _pkgdocdir %_docdir/%name-%version

Name: ngspice
Version: 28
Release: alt1
Summary: A mixed level/signal circuit simulator

License: BSD
Group: Engineering
Url: http://ngspice.sourceforge.net

Packager: Anton Midyukov <antohami at altlinux.org>

Source: %name-%version.tar
Source1: https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/%version/ngspice-%version-manual.pdf

# Link libspice.so with -lBLT or -lBLIlite, depending on whether in tk mode or

# not (bug 1047056, debian bug 737279)
Patch: ngspice-26-blt-linkage-workaround.patch

BuildRequires: gcc libgomp-devel flex glibc-kernheaders-generic
BuildRequires: libXaw-devel
BuildRequires: libXext-devel
BuildRequires: libtinfo-devel
BuildRequires: mot-adms
BuildRequires: libfftw3-devel
BuildRequires: readline-devel libncurses-devel
Requires: %name-data = %EVR
Requires: lib%name = %EVR

Ngspice is a general-purpose circuit simulator program.
It implements three classes of analysis:
- Nonlinear DC analyses
- Nonlinear Transient analyses
- Linear AC analyses

Ngspice implements the usual circuits elements, like resistors, capacitors,
inductors (single or mutual), transmission lines and a growing number of
semiconductor devices like diodes, bipolar transistors, mosfets (both bulk
and SOI), mesfets, jfet and HFET. Ngspice implements the EKV model but it
cannot be distributed with the package since its license does not allow to
redistribute EKV source code.

Ngspice integrates Xspice, a mixed-mode simulator built upon spice3c1 (and
then some tweak is necessary merge it with spice3f5). Xspice provides a
codemodel interface and an event-driven simulation algorithm. Users can
develop their own models for devices using the codemodel interface.

It can be used for VLSI simulations as well.

%package data
Group: Engineering
Summary: Data files for %name, a circuit simulator
Buildarch: noarch

%description data
Data files for %name, a circuit simulator.

%package -n lib%name
Summary: Main library for %name
Group: System/Libraries

%description -n lib%name
This package contains the library needed to run programs dynamically
linked with %name.

%package devel
Group: Engineering
Summary: Header files for %name, a circuit simulator
Requires: lib%name = %EVR

%description devel
Header files for %name, a circuit simulator.

%patch -p2 -b .link

# make sure the examples are UTF-8...

for nonUTF8 in \
   examples/tclspice/tcl-testbench4/selectfromlist.tcl \
   examples/tclspice/tcl-testbench1/testCapa.cir \
   examples/tclspice/tcl-testbench1/capa.cir \
   ChangeLog \
   %_bindir/iconv -f ISO-8859-1 -t utf-8 $nonUTF8 > $nonUTF8.conv
   mv -f $nonUTF8.conv $nonUTF8

%ifarch x86_64 sparc64 ppc64 amd64
%__subst "s| at XSPICEINIT at  codemodel  at prefix at / at libname at | at XSPICEINIT at  codemodel %_libdir|" \

# Fixed minor CVS build

sed -i \
   "s|AM_CPPFLAGS =|AM_CPPFLAGS = -I\$(top_srcdir)/src/maths/ni |" \

./autogen.sh --adms

chmod +x configure

for opt in without-ngshared with-ngshared
%configure \
   --disable-silent-rules \
   --$opt \
   --disable-xgraph \
   --enable-adms \
   --enable-xspice \
   --enable-maintainer-mode \
   --enable-dependency-tracking \
   --enable-capzerobypass \
   --enable-cider \
   --enable-newpred \
   --enable-expdevices \
   --enable-intnoise \
   --enable-openmp \
   --enable-predictor \
   --enable-numparam \
   --enable-dot-global \
   --enable-ndev \
   --enable-shared \
   --with-readline=yes \

make clean

# Once install to the temp dir

rm -rf $(pwd)/INST-NGSPICE-${opt}
make INSTALL="install -p" install DESTDIR=$(pwd)/INST-NGSPICE-${opt}


mkdir -p %buildroot%prefix
for opt in without-ngshared with-ngshared

pushd INST-NGSPICE-${opt}
cp -a * %buildroot


# Ensuring that all docs are under %%_pkgdocdir

mkdir -p %buildroot%_pkgdocdir
cp -pr examples/ %buildroot%_pkgdocdir

cp -p %SOURCE1 %buildroot%_pkgdocdir/%name-%version.pdf

cp -a \
   Stuarts_Poly_Notes \
   FAQ \
   README* \
   BUGS \
   ChangeLog \
   NEWS \


%files -n lib%name

%files data
%doc %_pkgdocdir

%files devel


Полный changelog можно просмотреть здесь

дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin