Don't get ngspice files overwritten by files from tclspice side
(bug 1311869) - rearrange files entries between ngspice / tclspice - move tclspinit into tclspice - rename tclspice side cmpp - also don't overwrite ngspice header files by tclspice side
This commit is contained in:
parent
08ae4bdec6
commit
dadccb1dfb
282
ngspice.spec
282
ngspice.spec
|
@ -1,8 +1,8 @@
|
||||||
# Features in Fedora/Free Electronic Lab
|
# Features in Fedora/Free Electronic Lab
|
||||||
# What else does this build do aside compiling ngspice ?
|
# What else does this build do aside compiling ngspice ?
|
||||||
# - Ensures interoperability with xcircuit via Tcl
|
# - Ensures interoperability with xcircuit via Tcl
|
||||||
# - Ensures interoperability with mot-adms
|
# - Ensures interoperability with mot-adms
|
||||||
# - Provides tclspice capabilities
|
# - Provides tclspice capabilities
|
||||||
# Chitlesh Goorah
|
# Chitlesh Goorah
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -15,39 +15,46 @@
|
||||||
# Toggle the following declaration when using version controlled snapshots
|
# Toggle the following declaration when using version controlled snapshots
|
||||||
%global devel 0
|
%global devel 0
|
||||||
|
|
||||||
Name: ngspice
|
Name: ngspice
|
||||||
Version: 26
|
Version: 26
|
||||||
%if %{?devel}
|
%if %{?devel}
|
||||||
%global snap .20111129cvs
|
%global snap .20111129cvs
|
||||||
%endif
|
%endif
|
||||||
Release: 3%{?snap}%{?dist}
|
Release: 3.900%{?snap}%{?dist}
|
||||||
Summary: A mixed level/signal circuit simulator
|
Summary: A mixed level/signal circuit simulator
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: Applications/Engineering
|
Group: Applications/Engineering
|
||||||
URL: http://ngspice.sourceforge.net
|
URL: http://ngspice.sourceforge.net
|
||||||
|
|
||||||
%if %{?devel}
|
%if %{?devel}
|
||||||
Source0: ngspice-rework-%{version}%{snap}.tar.bz2
|
Source0: ngspice-rework-%{version}%{snap}.tar.bz2
|
||||||
%else
|
%else
|
||||||
Source0: https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/%{version}/ngspice-%{version}.tar.gz
|
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
|
Source1: https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/%{version}/ngspice-%{version}-manual.pdf
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRequires: readline-devel
|
||||||
|
BuildRequires: libXext-devel
|
||||||
|
BuildRequires: libpng-devel
|
||||||
|
BuildRequires: libICE-devel
|
||||||
|
BuildRequires: libXaw-devel
|
||||||
|
BuildRequires: libGL-devel
|
||||||
|
BuildRequires: libXt-devel
|
||||||
|
|
||||||
BuildRequires: readline-devel, libXext-devel, libpng-devel, libICE-devel
|
BuildRequires: automake
|
||||||
BuildRequires: libXaw-devel, mesa-libGL-devel, libXt-devel, automake, libtool
|
BuildRequires: libtool
|
||||||
%if %{?devel}
|
%if %{?devel}
|
||||||
BuildRequires: lyx
|
BuildRequires: lyx
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: byacc
|
BuildRequires: byacc
|
||||||
BuildRequires: flex ImageMagick
|
BuildRequires: flex
|
||||||
BuildRequires: mot-adms
|
BuildRequires: ImageMagick
|
||||||
|
BuildRequires: mot-adms
|
||||||
|
|
||||||
Obsoletes: ngspice-doc < 20-4.cvs20100619
|
Obsoletes: ngspice-doc < 20-4.cvs20100619
|
||||||
Provides: ngspice-doc = %{version}-%{release}
|
Provides: ngspice-doc = %{version}-%{release}
|
||||||
|
|
||||||
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||||
|
|
||||||
|
@ -73,15 +80,15 @@ develop their own models for devices using the codemodel interface.
|
||||||
It can be used for VLSI simulations as well.
|
It can be used for VLSI simulations as well.
|
||||||
|
|
||||||
|
|
||||||
%package -n tclspice
|
%package -n tclspice
|
||||||
Summary: Tcl/Tk interface for ngspice
|
Summary: Tcl/Tk interface for ngspice
|
||||||
Group: Applications/Engineering
|
Group: Applications/Engineering
|
||||||
BuildRequires: tk-devel
|
BuildRequires: tk-devel
|
||||||
BuildRequires: blt-devel
|
BuildRequires: blt-devel
|
||||||
|
|
||||||
%description -n tclspice
|
%description -n tclspice
|
||||||
TclSpice is an improved version of Berkeley Spice designed to be used with
|
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
|
the Tcl/Tk scripting language. The project is based upon the NG-Spice source
|
||||||
code base with many improvements.
|
code base with many improvements.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
@ -93,40 +100,46 @@ cd ng-spice-rework
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# make sure the examples are UTF-8...
|
# make sure the examples are UTF-8...
|
||||||
for nonUTF8 in examples/tclspice/tcl-testbench4/selectfromlist.tcl \
|
for nonUTF8 in \
|
||||||
examples/tclspice/tcl-testbench1/testCapa.cir \
|
examples/tclspice/tcl-testbench4/selectfromlist.tcl \
|
||||||
examples/tclspice/tcl-testbench1/capa.cir ChangeLog; do
|
examples/tclspice/tcl-testbench1/testCapa.cir \
|
||||||
%{_bindir}/iconv -f ISO-8859-1 -t utf-8 $nonUTF8 > $nonUTF8.conv
|
examples/tclspice/tcl-testbench1/capa.cir \
|
||||||
%{__mv} -f $nonUTF8.conv $nonUTF8
|
ChangeLog \
|
||||||
|
%{nil}
|
||||||
|
do
|
||||||
|
%{_bindir}/iconv -f ISO-8859-1 -t utf-8 $nonUTF8 > $nonUTF8.conv
|
||||||
|
%{__mv} -f $nonUTF8.conv $nonUTF8
|
||||||
done
|
done
|
||||||
|
|
||||||
# rpmlint warnings
|
# rpmlint warnings
|
||||||
find examples/ -type f -name ".cvsignore" -exec rm -rf {} ';'
|
find examples/ -type f -name ".cvsignore" -exec rm -rf {} ';'
|
||||||
find src/ -type f -name "*.c" -exec chmod -x {} ';'
|
find src/ -type f -name "*.c" -exec chmod -x {} ';'
|
||||||
find src/ -type f -name "*.h" -exec chmod -x {} ';'
|
find src/ -type f -name "*.h" -exec chmod -x {} ';'
|
||||||
find src/ -type f -name "*.l" -exec chmod -x {} ';'
|
find src/ -type f -name "*.l" -exec chmod -x {} ';'
|
||||||
find src/ -type f -name "*.y" -exec chmod -x {} ';'
|
find src/ -type f -name "*.y" -exec chmod -x {} ';'
|
||||||
|
|
||||||
|
|
||||||
%ifarch x86_64 sparc64 ppc64 amd64
|
%ifarch x86_64 sparc64 ppc64 amd64
|
||||||
sed -i "s|@XSPICEINIT@ codemodel @prefix@/@libname@|@XSPICEINIT@ codemodel %{_libdir}|" \
|
sed -i "s|@XSPICEINIT@ codemodel @prefix@/@libname@|@XSPICEINIT@ codemodel %{_libdir}|" \
|
||||||
src/spinit.in
|
src/spinit.in
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Fix Tclspice's examples
|
# Fix Tclspice's examples
|
||||||
sed -i \
|
sed -i \
|
||||||
"s|load \"../../../src/.libs/libspice.so\"|lappend auto_path \"%{_libdir}/tclspice\"\npackage require spice|" \
|
's|load "../../../src/.libs/libspice.so"|lappend auto_path "%{_libdir}/tclspice"\npackage require spice|' \
|
||||||
examples/tclspice/*/*.tcl
|
examples/tclspice/*/*.tcl
|
||||||
sed -i \
|
sed -i \
|
||||||
"s|load ../../../src/.libs/libspice.so|lappend auto_path \"%{_libdir}/tclspice\"\npackage require spice|" \
|
's|load ../../../src/.libs/libspice.so|lappend auto_path "%{_libdir}/tclspice"\npackage require spice|' \
|
||||||
examples/tclspice/*/*.tcl
|
examples/tclspice/*/*.tcl
|
||||||
sed -i \
|
sed -i \
|
||||||
"s|spice::codemodel ../../src/xspice/icm/spice2poly|spice::codemodel %{_libdir}/tclspice/spice|" \
|
's|spice::codemodel ../../src/xspice/icm/spice2poly|spice::codemodel %{_libdir}/tclspice/spice|' \
|
||||||
examples/tclspice/tcl-testbench4/tcl-testbench4.tcl
|
examples/tclspice/tcl-testbench4/tcl-testbench4.tcl
|
||||||
|
|
||||||
# Fixed minor CVS build
|
# Fixed minor CVS build
|
||||||
sed -i "s|AM_CPPFLAGS =|AM_CPPFLAGS = -I\$(top_srcdir)/src/maths/ni |" src/spicelib/analysis/Makefile.am
|
sed -i \
|
||||||
|
"s|AM_CPPFLAGS =|AM_CPPFLAGS = -I\$(top_srcdir)/src/maths/ni |" \
|
||||||
|
src/spicelib/analysis/Makefile.am
|
||||||
|
|
||||||
|
export ACLOCAL_FLAGS=-Im4
|
||||||
./autogen.sh --adms
|
./autogen.sh --adms
|
||||||
|
|
||||||
chmod +x configure
|
chmod +x configure
|
||||||
|
@ -135,7 +148,7 @@ chmod +x configure
|
||||||
%if %{?devel}
|
%if %{?devel}
|
||||||
# ---- Manual ----------------------------------------------------------------
|
# ---- Manual ----------------------------------------------------------------
|
||||||
cd ng-spice-manuals
|
cd ng-spice-manuals
|
||||||
autoreconf -Wno-portability --install
|
autoreconf -Wno-portability --install
|
||||||
%configure ; make
|
%configure ; make
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
@ -152,10 +165,14 @@ export CFLAGS="%{optflags} -I%{_includedir}/blt"
|
||||||
|
|
||||||
# Configure tclspice
|
# Configure tclspice
|
||||||
cd tclspice
|
cd tclspice
|
||||||
sed -i "s|\#define NGSPICEDATADIR \"\`echo \$dprefix/share/ngspice\`\"|\#define NGSPICEDATADIR \"\`echo %{_libdir}/tclspice\`\"|" configure*
|
sed -i \
|
||||||
|
's|\#define NGSPICEDATADIR "\`echo \$dprefix/share/ngspice\`"|\#define NGSPICEDATADIR "\`echo %{_libdir}/tclspice\`"|' \
|
||||||
|
configure*
|
||||||
# fix ng-spice-manuals directory location
|
# fix ng-spice-manuals directory location
|
||||||
%if %{?devel}
|
%if %{?devel}
|
||||||
sed -i 's|../ng-spice-manuals|../../ng-spice-manuals|g' manual/Makefile.am
|
sed -i \
|
||||||
|
's|../ng-spice-manuals|../../ng-spice-manuals|g' \
|
||||||
|
manual/Makefile.am
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# direct access to Tcl_Interp->result deprecated in tcl8.6,
|
# direct access to Tcl_Interp->result deprecated in tcl8.6,
|
||||||
|
@ -163,73 +180,99 @@ sed -i 's|../ng-spice-manuals|../../ng-spice-manuals|g' manual/Makefile.am
|
||||||
export CPPFLAGS=-DUSE_INTERP_RESULT
|
export CPPFLAGS=-DUSE_INTERP_RESULT
|
||||||
|
|
||||||
%configure \
|
%configure \
|
||||||
--disable-xgraph \
|
--disable-silent-rules \
|
||||||
--enable-adms \
|
--disable-xgraph \
|
||||||
--enable-xspice \
|
--enable-adms \
|
||||||
--enable-maintainer-mode \
|
--enable-xspice \
|
||||||
--enable-dependency-tracking \
|
--enable-maintainer-mode \
|
||||||
--enable-capzerobypass \
|
--enable-dependency-tracking \
|
||||||
--enable-cider \
|
--enable-capzerobypass \
|
||||||
--enable-newpred \
|
--enable-cider \
|
||||||
--enable-expdevices \
|
--enable-newpred \
|
||||||
--enable-intnoise \
|
--enable-expdevices \
|
||||||
--enable-openmp \
|
--enable-intnoise \
|
||||||
--enable-predictor \
|
--enable-openmp \
|
||||||
--enable-numparam \
|
--enable-predictor \
|
||||||
--enable-dot-global \
|
--enable-numparam \
|
||||||
--enable-shared \
|
--enable-dot-global \
|
||||||
--enable-ndev \
|
--enable-shared \
|
||||||
--with-readline=yes \
|
--enable-ndev \
|
||||||
--with-tcl=%{_libdir}/ \
|
--with-readline=yes \
|
||||||
--libdir=%{_libdir}/tclspice
|
--with-tcl=%{_libdir}/ \
|
||||||
|
--libdir=%{_libdir}/tclspice \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
%{__make}
|
%{__make}
|
||||||
cd ..
|
cd ..
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
%configure \
|
%configure \
|
||||||
--disable-xgraph \
|
--disable-silent-rules \
|
||||||
--enable-adms \
|
--disable-xgraph \
|
||||||
--enable-xspice \
|
--enable-adms \
|
||||||
--enable-maintainer-mode \
|
--enable-xspice \
|
||||||
--enable-dependency-tracking \
|
--enable-maintainer-mode \
|
||||||
--enable-capzerobypass \
|
--enable-dependency-tracking \
|
||||||
--enable-cider \
|
--enable-capzerobypass \
|
||||||
--enable-newpred \
|
--enable-cider \
|
||||||
--enable-expdevices \
|
--enable-newpred \
|
||||||
--enable-intnoise \
|
--enable-expdevices \
|
||||||
--enable-openmp \
|
--enable-intnoise \
|
||||||
--enable-predictor \
|
--enable-openmp \
|
||||||
--enable-numparam \
|
--enable-predictor \
|
||||||
--enable-dot-global \
|
--enable-numparam \
|
||||||
--enable-shared \
|
--enable-dot-global \
|
||||||
--enable-ndev \
|
--enable-shared \
|
||||||
--with-readline=yes \
|
--enable-ndev \
|
||||||
--libdir=%{_libdir}
|
--with-readline=yes \
|
||||||
|
--libdir=%{_libdir} \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
%{__make}
|
%{__make}
|
||||||
# %{?_smp_mflags}
|
# %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__rm} -rf %{buildroot}
|
|
||||||
%if %{?devel}
|
%if %{?devel}
|
||||||
cd ng-spice-rework
|
cd ng-spice-rework
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%{__make} INSTALL="install -p" install DESTDIR=%{buildroot}
|
# Once install to the temp dir
|
||||||
|
rm -rf $(pwd)/INST-NGSPICE
|
||||||
|
%{__make} INSTALL="install -p" install DESTDIR=$(pwd)/INST-NGSPICE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ---- Tclspice ----------------------------------------------------------------
|
# ---- Tclspice ----------------------------------------------------------------
|
||||||
# Tclspice : Make install
|
# Tclspice : Make install
|
||||||
cd tclspice
|
cd tclspice
|
||||||
%{__make} INSTALL="install -p" install DESTDIR=%{buildroot}
|
# Once install to the temp dir
|
||||||
|
rm -rf $(pwd)/INST-TCLSPICE
|
||||||
|
%{__make} INSTALL="install -p" install DESTDIR=$(pwd)/../INST-TCLSPICE
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
%{__rm} -rf %{buildroot}%{_libdir}/tclspice/libspice.la
|
# Clean up unneeded / duplicate files also installed from ngspice
|
||||||
|
pushd INST-TCLSPICE
|
||||||
|
rm -rf ./%{_datadir}/ngspice/include/
|
||||||
|
# see bug 1311869
|
||||||
|
rm -f ./%{_datadir}/ngspice/scripts/spinit
|
||||||
|
# binary differ
|
||||||
|
mv .%{_bindir}/cmpp{,-tclspice}
|
||||||
|
popd
|
||||||
|
|
||||||
|
# Install
|
||||||
|
cp -a INST-NGSPICE/* %{buildroot}
|
||||||
|
cp -a INST-TCLSPICE/* %{buildroot}
|
||||||
|
|
||||||
|
%{__rm} -rf \
|
||||||
|
%{buildroot}%{_libdir}/tclspice/libspice.la
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
# ADMS support
|
# ADMS support
|
||||||
|
# It seems that the below is not needed, compiled into binary already
|
||||||
|
# (mtasaka, 20160628)
|
||||||
|
%if 0
|
||||||
cp -pr ./src/spicelib/devices/adms/ %{buildroot}%{_datadir}/%{name}
|
cp -pr ./src/spicelib/devices/adms/ %{buildroot}%{_datadir}/%{name}
|
||||||
|
%endif
|
||||||
|
|
||||||
# Ensuring that all docs are under %%{_pkgdocdir}
|
# Ensuring that all docs are under %%{_pkgdocdir}
|
||||||
mkdir -p %{buildroot}%{_pkgdocdir}
|
mkdir -p %{buildroot}%{_pkgdocdir}
|
||||||
|
@ -240,16 +283,24 @@ cp -p ../ng-spice-manuals/manual.pdf %{buildroot}%{_pkgdocdir}/%{name}-%{version
|
||||||
cp -p %{SOURCE1} %{buildroot}%{_pkgdocdir}/%{name}-%{version}.pdf
|
cp -p %{SOURCE1} %{buildroot}%{_pkgdocdir}/%{name}-%{version}.pdf
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
cp -pr Stuarts_Poly_Notes FAQ DEVICES ANALYSES %{buildroot}%{_pkgdocdir}
|
cp -a \
|
||||||
cp -pr AUTHORS README* BUGS ChangeLog NEWS %{buildroot}%{_pkgdocdir}
|
Stuarts_Poly_Notes \
|
||||||
|
FAQ \
|
||||||
|
DEVICES \
|
||||||
|
ANALYSES \
|
||||||
|
%{buildroot}%{_pkgdocdir}
|
||||||
|
cp -a \
|
||||||
|
AUTHORS \
|
||||||
|
README* \
|
||||||
|
BUGS \
|
||||||
|
ChangeLog \
|
||||||
|
NEWS \
|
||||||
|
%{buildroot}%{_pkgdocdir}
|
||||||
|
|
||||||
# pull as debuginfo
|
# pull as debuginfo
|
||||||
chmod +x %{buildroot}%{_libdir}/ngspice/*.cm
|
chmod +x %{buildroot}%{_libdir}/ngspice/*.cm
|
||||||
chmod +x %{buildroot}%{_libdir}/tclspice/ngspice/*.cm
|
chmod +x %{buildroot}%{_libdir}/tclspice/ngspice/*.cm
|
||||||
|
|
||||||
%{__rm} -rf %{buildroot}%{_datadir}/info/dir
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{?devel}
|
%if %{?devel}
|
||||||
cd ng-spice-rework/tests
|
cd ng-spice-rework/tests
|
||||||
|
@ -258,27 +309,40 @@ cd tests
|
||||||
%endif
|
%endif
|
||||||
#make check
|
#make check
|
||||||
|
|
||||||
|
|
||||||
%clean
|
|
||||||
%{__rm} -rf %{buildroot}
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
|
%exclude %{_bindir}/cmpp-tclspice
|
||||||
%{_datadir}/%{name}/
|
%{_datadir}/%{name}/
|
||||||
|
%exclude %{_datadir}/%{name}/scripts/tclspinit
|
||||||
%{_libdir}/ngspice/
|
%{_libdir}/ngspice/
|
||||||
|
|
||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
%exclude %{_pkgdocdir}/examples/tclspice
|
%exclude %{_pkgdocdir}/examples/tclspice
|
||||||
%doc %{_pkgdocdir}
|
%doc %{_pkgdocdir}
|
||||||
%license COPYING
|
%license COPYING
|
||||||
|
|
||||||
%files -n tclspice
|
%files -n tclspice
|
||||||
%defattr(-,root,root,-)
|
%{_bindir}/cmpp-tclspice
|
||||||
%doc %{_pkgdocdir}/examples/tclspice
|
%doc %{_pkgdocdir}/examples/tclspice
|
||||||
%{_libdir}/tclspice/
|
%{_libdir}/tclspice/
|
||||||
|
%dir %{_datadir}/ngspice
|
||||||
|
%dir %{_datadir}/%{name}/scripts/
|
||||||
|
%{_datadir}/%{name}/scripts/tclspinit
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 28 2016 Mamoru TASAKA <mtasaka@fedoraproject.org> - 26-4
|
||||||
|
- Don't get ngspice files overwritten by files from tclspice side
|
||||||
|
(bug 1311869)
|
||||||
|
- rearrange files entries between ngspice / tclspice
|
||||||
|
- move tclspinit into tclspice
|
||||||
|
- rename tclspice side cmpp
|
||||||
|
- also don't overwrite ngspice header files by tclspice side
|
||||||
|
|
||||||
|
* Mon Jun 27 2016 Mamoru TASAKA <mtasaka@fedoraproject.org>
|
||||||
|
- spec file clean up
|
||||||
|
- Don't install adms source and compiled .o objects, they are
|
||||||
|
already linked into ngspice and tclspice shared library
|
||||||
|
|
||||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 26-3
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 26-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue