ngspice/ngspice.spec

376 lines
12 KiB
RPMSpec
Raw Normal View History

2011-12-03 17:26:14 +00:00
# Features in Fedora/Free Electronic Lab
# What else does this build do aside compiling ngspice ?
# - Ensures interoperability with xcircuit via Tcl
# - Ensures interoperability with mot-adms
# - Provides tclspice capabilities
# Chitlesh Goorah
2010-07-01 19:24:30 +00:00
#
## To download development trunk
#
# cvs -d:pserver:anonymous@ngspice.cvs.sourceforge.net:/cvsroot/ngspice login
2010-11-15 06:06:03 +00:00
# cvs -z3 -d:pserver:anonymous@ngspice.cvs.sourceforge.net:/cvsroot/ngspice export -DNOW ngspice
2011-12-03 17:26:14 +00:00
# tar cjf ~/rpmbuild/SOURCES/ngspice-rework-23.`date '+%Y%m%d'`cvs.tar.bz2 ngspice
# Toggle the following declaration when using version controlled snapshots
%define devel 0
2010-07-01 19:24:30 +00:00
Name: ngspice
2011-12-03 17:26:14 +00:00
Version: 23
%if %{?devel}
%define snap .20111129cvs
%endif
Release: 1%{?snap}%{?dist}
Summary: A mixed level/signal circuit simulator
License: BSD
Group: Applications/Engineering
2010-07-01 19:24:30 +00:00
URL: http://ngspice.sourceforge.net
2011-12-03 17:26:14 +00:00
%if %{?devel}
Source0: ngspice-rework-%{version}%{snap}.tar.bz2
%else
Source0: https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/%{version}/ngspice-%{version}.tar.gz
Source1: https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/%{version}/ngspice%{version}-manual.pdf
%endif
2010-07-01 19:24:30 +00:00
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
2009-08-09 15:54:16 +00:00
BuildRequires: readline-devel, libXext-devel, libpng-devel, libICE-devel
BuildRequires: libXaw-devel, mesa-libGL-devel, libXt-devel, automake, libtool
2011-12-03 17:26:14 +00:00
%if %{?devel}
2010-07-01 19:24:30 +00:00
BuildRequires: lyx
2011-12-03 17:26:14 +00:00
%endif
2010-07-12 17:22:44 +00:00
BuildRequires: bison
BuildRequires: byacc
BuildRequires: flex ImageMagick
2010-11-15 06:06:03 +00:00
BuildRequires: mot-adms
2010-07-01 19:24:30 +00:00
Obsoletes: ngspice-doc < 20-4.cvs20100619
Provides: ngspice-doc = %{version}-%{release}
%description
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.
2011-12-03 17:26:14 +00:00
It can be used for VLSI simulations as well.
2007-08-24 10:25:18 +00:00
2009-08-09 15:54:16 +00:00
%package -n tclspice
Summary: Tcl/Tk interface for ngspice
Group: Applications/Engineering
BuildRequires: tk-devel
BuildRequires: blt-devel
%description -n tclspice
TclSpice is an improved version of Berkeley Spice designed to be used with
the Tcl/Tk scripting language. The project is based upon the NG-Spice source
code base with many improvements.
%prep
2011-12-03 17:26:14 +00:00
%if %{?devel}
2010-07-01 19:24:30 +00:00
%setup -q -n ngspice
cd ng-spice-rework
2011-12-03 17:26:14 +00:00
%else
%setup -q
%endif
2009-12-08 23:17:38 +00:00
2009-08-09 15:54:16 +00:00
# make sure the examples are UTF-8...
for nonUTF8 in examples/tclspice/tcl-testbench4/selectfromlist.tcl \
examples/tclspice/tcl-testbench1/testCapa.cir \
2011-12-03 17:26:14 +00:00
examples/tclspice/tcl-testbench1/capa.cir ChangeLog; do
2009-08-09 15:54:16 +00:00
%{_bindir}/iconv -f ISO-8859-1 -t utf-8 $nonUTF8 > $nonUTF8.conv
%{__mv} -f $nonUTF8.conv $nonUTF8
done
2009-08-09 15:54:16 +00:00
# rpmlint warnings
find examples/ -type f -name ".cvsignore" -exec rm -rf {} ';'
find src/ -type f -name "*.c" -exec chmod -x {} ';'
find src/ -type f -name "*.h" -exec chmod -x {} ';'
2011-12-03 17:26:14 +00:00
find src/ -type f -name "*.l" -exec chmod -x {} ';'
find src/ -type f -name "*.y" -exec chmod -x {} ';'
2009-02-21 23:54:49 +00:00
%ifarch x86_64 sparc64 ppc64 amd64
2010-11-15 06:06:03 +00:00
sed -i "s|@XSPICEINIT@ codemodel @prefix@/@libname@|@XSPICEINIT@ codemodel %{_libdir}|" \
2009-08-09 15:54:16 +00:00
src/spinit.in
%endif
2009-08-09 15:54:16 +00:00
# Fix Tclspice's examples
sed -i \
"s|load \"../../../src/.libs/libspice.so\"|lappend auto_path \"%{_libdir}/tclspice\"\npackage require spice|" \
examples/tclspice/*/*.tcl
sed -i \
"s|load ../../../src/.libs/libspice.so|lappend auto_path \"%{_libdir}/tclspice\"\npackage require spice|" \
examples/tclspice/*/*.tcl
sed -i \
"s|spice::codemodel ../../src/xspice/icm/spice2poly|spice::codemodel %{_libdir}/tclspice/spice|" \
examples/tclspice/tcl-testbench4/tcl-testbench4.tcl
2010-11-15 06:06:03 +00:00
# Fixed minor CVS build
sed -i "s|AM_CPPFLAGS =|AM_CPPFLAGS = -I\$(top_srcdir)/src/maths/ni |" src/spicelib/analysis/Makefile.am
./autogen.sh --adms
chmod +x configure
2009-08-09 15:54:16 +00:00
%build
2011-12-03 17:26:14 +00:00
%if %{?devel}
# ---- Manual ----------------------------------------------------------------
2010-11-15 06:06:03 +00:00
cd ng-spice-manuals
autoreconf -Wno-portability --install
./configure ; make
cd ..
2010-07-01 19:24:30 +00:00
cd ng-spice-rework
2011-12-03 17:26:14 +00:00
%endif
2009-08-09 15:54:16 +00:00
# ---- Tclspice ----------------------------------------------------------------
# Adding BLT support
export CFLAGS="%{optflags} -I%{_includedir}/blt"
2009-08-09 15:54:16 +00:00
# Make builddir for tclspice
%{__mkdir} -p tclspice
%{__cp} -Rl `ls . | grep -v tclspice` tclspice
# Configure tclspice
cd tclspice
sed -i "s|\#define NGSPICEDATADIR \"\`echo \$dprefix/share/ngspice\`\"|\#define NGSPICEDATADIR \"\`echo %{_libdir}/tclspice\`\"|" configure*
2010-07-01 19:24:30 +00:00
# fix ng-spice-manuals directory location
2011-12-03 17:26:14 +00:00
%if %{?devel}
sed -i 's|../ng-spice-manuals|../../ng-spice-manuals|g' manual/Makefile.am
%endif
2010-07-01 19:24:30 +00:00
2009-08-09 15:54:16 +00:00
%configure \
--disable-xgraph \
2010-11-15 06:06:03 +00:00
--enable-adms \
2009-08-09 15:54:16 +00:00
--enable-xspice \
--enable-maintainer-mode \
--enable-dependency-tracking \
2009-08-09 15:54:16 +00:00
--enable-capzerobypass \
--enable-cider \
--enable-newpred \
--enable-expdevices \
--enable-intnoise \
2010-11-15 06:06:03 +00:00
--enable-openmp \
2009-08-09 15:54:16 +00:00
--enable-predictor \
--enable-numparam \
--enable-dot-global \
--enable-shared \
--enable-ndev \
2010-11-15 06:06:03 +00:00
--with-readline=yes \
2009-12-08 23:17:38 +00:00
%if 0%{?fedora}
2009-08-09 15:54:16 +00:00
--with-tcl=%{_libdir}/tcl8.5/ \
%else
2009-12-08 23:17:38 +00:00
--with-tcl=%{_libdir}/ \
%endif
2009-08-09 15:54:16 +00:00
--libdir=%{_libdir}/tclspice
%{__make}
cd ..
# ------------------------------------------------------------------------------
%configure \
--disable-xgraph \
2010-11-15 06:06:03 +00:00
--enable-adms \
2009-08-09 15:54:16 +00:00
--enable-xspice \
--enable-maintainer-mode \
--enable-dependency-tracking \
2009-08-09 15:54:16 +00:00
--enable-capzerobypass \
--enable-cider \
--enable-newpred \
--enable-expdevices \
--enable-intnoise \
2010-11-15 06:06:03 +00:00
--enable-openmp \
2009-08-09 15:54:16 +00:00
--enable-predictor \
--enable-numparam \
--enable-dot-global \
--enable-shared \
--enable-ndev \
2010-11-15 06:06:03 +00:00
--with-readline=yes \
2009-08-09 15:54:16 +00:00
--libdir=%{_libdir}
2010-07-01 19:24:30 +00:00
%{__make}
# %{?_smp_mflags}
%install
%{__rm} -rf %{buildroot}
2011-12-03 17:26:14 +00:00
%if %{?devel}
2010-07-01 19:24:30 +00:00
cd ng-spice-rework
2011-12-03 17:26:14 +00:00
%endif
2007-08-06 01:29:03 +00:00
%{__make} INSTALL="install -p" install DESTDIR=%{buildroot}
2009-08-09 15:54:16 +00:00
# ---- Tclspice ----------------------------------------------------------------
# Tclspice : Make install
cd tclspice
%{__make} INSTALL="install -p" install DESTDIR=%{buildroot}
cd ..
%{__rm} -rf %{buildroot}%{_libdir}/tclspice/libspice.la
# ------------------------------------------------------------------------------
2010-11-15 06:06:03 +00:00
# ADMS support
cp -pr ./src/spicelib/devices/adms/ %{buildroot}%{_datadir}/%{name}
2009-08-09 15:54:16 +00:00
# Ensuring that all docs are under %%{_docdir}/%%{name}-%%{version}/
rm -rf %{buildroot}%{_docdir}/%{name}-%{version}/
mkdir -p %{buildroot}%{_docdir}/%{name}-%{version}/
cp -pr examples/ %{buildroot}%{_docdir}/%{name}-%{version}/
2011-12-03 17:26:14 +00:00
%if %{?devel}
2010-11-15 06:06:03 +00:00
cp -p ../ng-spice-manuals/manual.pdf %{buildroot}%{_docdir}/%{name}-%{version}/%{name}-%{version}.pdf
2011-12-03 17:26:14 +00:00
%else
cp -p %{SOURCE1} %{buildroot}%{_docdir}/%{name}-%{version}/%{name}-%{version}.pdf
%endif
2010-07-01 19:24:30 +00:00
rm -rf %{buildroot}%{_docdir}/%{name}
2009-08-09 15:54:16 +00:00
cp -pr Stuarts_Poly_Notes FAQ DEVICES ANALYSES %{buildroot}%{_docdir}/%{name}-%{version}/
2010-11-15 06:06:03 +00:00
cp -pr AUTHORS COPYING README* BUGS ChangeLog NEWS %{buildroot}%{_docdir}/%{name}-%{version}/
2009-08-09 15:54:16 +00:00
# pull as debuginfo
chmod +x %{buildroot}%{_libdir}/spice/*.cm
chmod +x %{buildroot}%{_libdir}/tclspice/spice/*.cm
2009-08-09 15:54:16 +00:00
%{__rm} -rf %{buildroot}%{_datadir}/info/dir
%check
2011-12-03 17:26:14 +00:00
%if %{?devel}
2010-07-01 19:24:30 +00:00
cd ng-spice-rework/tests
2011-12-03 17:26:14 +00:00
%else
cd tests
%endif
2009-08-09 15:54:16 +00:00
#make check
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root,-)
2009-08-09 15:54:16 +00:00
%{_bindir}/*
%{_datadir}/%{name}/
%{_libdir}/spice/
2009-08-09 15:54:16 +00:00
%{_mandir}/man1/*
2010-07-01 19:24:30 +00:00
%exclude %doc %{_docdir}/%{name}-%{version}/examples/tclspice
%doc %{_docdir}/%{name}-%{version}/
2009-08-09 15:54:16 +00:00
%files -n tclspice
%defattr(-,root,root,-)
%doc %{_docdir}/%{name}-%{version}/examples/tclspice
%{_libdir}/tclspice/
2010-07-01 19:24:30 +00:00
%changelog
2011-12-03 17:26:14 +00:00
* Tue Nov 29 2011 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 23-1
- New upstream sources with various bug fixes
- Upstream added #include <ftedev.h> to src/include/tclspice.h
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 22-6.cvs20101113
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
2010-11-15 06:06:03 +00:00
* Sat Nov 13 2010 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 21-5.cvs20101113
- new upstream sources with various bug fixes
* Sat Aug 21 2010 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 21-4.cvs20100821
- enabling adms support
* Sun Aug 01 2010 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 21-3.cvs20100719
- new fixes from development trunk
2010-07-12 17:22:44 +00:00
* Sun Jul 11 2010 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 21-2.cvs20100620
- added bison and byacc as BR
* Thu Jul 01 2010 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 21-1.cvs20100620
- release -21 with BSIMSOI support for < 130nm designs
2010-07-01 19:24:30 +00:00
* Sat Jun 19 2010 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 20-4.cvs20100619
- prerelease -21 with BSIMSOI support for < 130nm designs
2009-08-09 15:54:16 +00:00
2009-12-08 23:17:38 +00:00
* Tue Dec 8 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 20-3
- Fixed build on CentOS-5
2009-12-08 00:27:29 +00:00
* Tue Dec 8 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 20-2
- Improved interoperobability with xcircuit
* Mon Nov 16 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 20-1
- new upstream release
2009-08-09 15:54:16 +00:00
* Sun Aug 02 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 19-1
- new upstream release
- RHBZ #514484 A Long Warning Message (patched)
- RHBZ #511695 FTBFS ngspice-18-2.fc11
2009-02-21 23:54:49 +00:00
* Sat Feb 21 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 18-2
- x11 windows (help and plot) fixes #RHBZ 481525
2009-01-11 22:45:15 +00:00
* Sat Jan 10 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 18-1
- new upstream release
* Sun Jun 15 2008 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 17-16
- Bugfix: #449409: FTBFS ngspice-17-14.fc9
2008-04-17 22:53:38 +00:00
* Fri Apr 18 2008 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 17-15
2008-04-17 22:50:04 +00:00
- rebuild
2007-08-24 10:25:18 +00:00
* Fri Aug 24 2007 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 17-13
- mass rebuild for fedora 8 - BuildID
2007-08-06 01:29:03 +00:00
* Sat Jul 08 2007 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 17-12
- fixed ScriptletSnippets for Texinfo #246780
- moved documentations to -doc package
* Sat Mar 17 2007 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 17-11
- droped patch: ngspice-bjt.patch, upstream will provide a better patch soon
* Sat Mar 17 2007 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 17-10
- fixed bug #227519 in spec file - Ville Skyttä
- patch: ngspice-bjt.patch fixes the problem with bjt devices that have less than five nodes
* Tue Jan 09 2007 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 17-9
- dropped --enable-cider since it requires non-opensource software
- dropped --enable-predictor from %%configure
* Tue Dec 19 2006 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 17-8
- patch0 for xcircuit pipemode
- XCircuit can work as an ng-spice front-end
- fixed infodir to mean FE guidelines
* Sun Oct 15 2006 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 17-7
- Fixed src/spinit.in for 64 bit
* Thu Oct 12 2006 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 17-6
- Testing on 64 bit arch
* Mon Sep 04 2006 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 17-5
- Added libXt-devel to include X headers
* Wed Aug 30 2006 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> 17-4
- Fix to pass compiler flags in xgraph.
* Tue Aug 29 2006 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 17-3
- Fixed BR and script-without-shellbang for debug file
* Mon Aug 28 2006 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 17-2
- Fixed BRs and excluded libbsim4.a
- Removed duplicates and useless ldconfig from %%post
* Sun Aug 27 2006 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 17-1
- Initial Package for Fedora Extras