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
136
ngspice.spec
136
ngspice.spec
|
@ -20,7 +20,7 @@ Version: 26
|
|||
%if %{?devel}
|
||||
%global snap .20111129cvs
|
||||
%endif
|
||||
Release: 3%{?snap}%{?dist}
|
||||
Release: 3.900%{?snap}%{?dist}
|
||||
Summary: A mixed level/signal circuit simulator
|
||||
|
||||
License: BSD
|
||||
|
@ -34,16 +34,23 @@ Source0: https://downloads.sourceforge.net/project/ngspice/ng-spice-re
|
|||
Source1: https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/%{version}/ngspice-%{version}-manual.pdf
|
||||
%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: libXaw-devel, mesa-libGL-devel, libXt-devel, automake, libtool
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
%if %{?devel}
|
||||
BuildRequires: lyx
|
||||
%endif
|
||||
BuildRequires: bison
|
||||
BuildRequires: byacc
|
||||
BuildRequires: flex ImageMagick
|
||||
BuildRequires: flex
|
||||
BuildRequires: ImageMagick
|
||||
BuildRequires: mot-adms
|
||||
|
||||
Obsoletes: ngspice-doc < 20-4.cvs20100619
|
||||
|
@ -93,9 +100,13 @@ cd ng-spice-rework
|
|||
%endif
|
||||
|
||||
# make sure the examples are UTF-8...
|
||||
for nonUTF8 in examples/tclspice/tcl-testbench4/selectfromlist.tcl \
|
||||
for nonUTF8 in \
|
||||
examples/tclspice/tcl-testbench4/selectfromlist.tcl \
|
||||
examples/tclspice/tcl-testbench1/testCapa.cir \
|
||||
examples/tclspice/tcl-testbench1/capa.cir ChangeLog; do
|
||||
examples/tclspice/tcl-testbench1/capa.cir \
|
||||
ChangeLog \
|
||||
%{nil}
|
||||
do
|
||||
%{_bindir}/iconv -f ISO-8859-1 -t utf-8 $nonUTF8 > $nonUTF8.conv
|
||||
%{__mv} -f $nonUTF8.conv $nonUTF8
|
||||
done
|
||||
|
@ -107,26 +118,28 @@ find src/ -type f -name "*.h" -exec chmod -x {} ';'
|
|||
find src/ -type f -name "*.l" -exec chmod -x {} ';'
|
||||
find src/ -type f -name "*.y" -exec chmod -x {} ';'
|
||||
|
||||
|
||||
%ifarch x86_64 sparc64 ppc64 amd64
|
||||
sed -i "s|@XSPICEINIT@ codemodel @prefix@/@libname@|@XSPICEINIT@ codemodel %{_libdir}|" \
|
||||
src/spinit.in
|
||||
src/spinit.in
|
||||
%endif
|
||||
|
||||
# Fix Tclspice's examples
|
||||
sed -i \
|
||||
"s|load \"../../../src/.libs/libspice.so\"|lappend auto_path \"%{_libdir}/tclspice\"\npackage require spice|" \
|
||||
examples/tclspice/*/*.tcl
|
||||
'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
|
||||
'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
|
||||
's|spice::codemodel ../../src/xspice/icm/spice2poly|spice::codemodel %{_libdir}/tclspice/spice|' \
|
||||
examples/tclspice/tcl-testbench4/tcl-testbench4.tcl
|
||||
|
||||
# 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
|
||||
|
||||
chmod +x configure
|
||||
|
@ -152,10 +165,14 @@ export CFLAGS="%{optflags} -I%{_includedir}/blt"
|
|||
|
||||
# Configure 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
|
||||
%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
|
||||
|
||||
# direct access to Tcl_Interp->result deprecated in tcl8.6,
|
||||
|
@ -163,6 +180,7 @@ sed -i 's|../ng-spice-manuals|../../ng-spice-manuals|g' manual/Makefile.am
|
|||
export CPPFLAGS=-DUSE_INTERP_RESULT
|
||||
|
||||
%configure \
|
||||
--disable-silent-rules \
|
||||
--disable-xgraph \
|
||||
--enable-adms \
|
||||
--enable-xspice \
|
||||
|
@ -181,13 +199,15 @@ export CPPFLAGS=-DUSE_INTERP_RESULT
|
|||
--enable-ndev \
|
||||
--with-readline=yes \
|
||||
--with-tcl=%{_libdir}/ \
|
||||
--libdir=%{_libdir}/tclspice
|
||||
--libdir=%{_libdir}/tclspice \
|
||||
%{nil}
|
||||
|
||||
%{__make}
|
||||
cd ..
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
%configure \
|
||||
--disable-silent-rules \
|
||||
--disable-xgraph \
|
||||
--enable-adms \
|
||||
--enable-xspice \
|
||||
|
@ -205,31 +225,54 @@ cd ..
|
|||
--enable-shared \
|
||||
--enable-ndev \
|
||||
--with-readline=yes \
|
||||
--libdir=%{_libdir}
|
||||
--libdir=%{_libdir} \
|
||||
%{nil}
|
||||
|
||||
%{__make}
|
||||
# %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%{__rm} -rf %{buildroot}
|
||||
%if %{?devel}
|
||||
cd ng-spice-rework
|
||||
%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 : Make install
|
||||
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 ..
|
||||
|
||||
%{__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
|
||||
# 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}
|
||||
%endif
|
||||
|
||||
# Ensuring that all docs are under %%{_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
|
||||
%endif
|
||||
|
||||
cp -pr Stuarts_Poly_Notes FAQ DEVICES ANALYSES %{buildroot}%{_pkgdocdir}
|
||||
cp -pr AUTHORS README* BUGS ChangeLog NEWS %{buildroot}%{_pkgdocdir}
|
||||
|
||||
cp -a \
|
||||
Stuarts_Poly_Notes \
|
||||
FAQ \
|
||||
DEVICES \
|
||||
ANALYSES \
|
||||
%{buildroot}%{_pkgdocdir}
|
||||
cp -a \
|
||||
AUTHORS \
|
||||
README* \
|
||||
BUGS \
|
||||
ChangeLog \
|
||||
NEWS \
|
||||
%{buildroot}%{_pkgdocdir}
|
||||
|
||||
# pull as debuginfo
|
||||
chmod +x %{buildroot}%{_libdir}/ngspice/*.cm
|
||||
chmod +x %{buildroot}%{_libdir}/tclspice/ngspice/*.cm
|
||||
|
||||
%{__rm} -rf %{buildroot}%{_datadir}/info/dir
|
||||
|
||||
%check
|
||||
%if %{?devel}
|
||||
cd ng-spice-rework/tests
|
||||
|
@ -258,27 +309,40 @@ cd tests
|
|||
%endif
|
||||
#make check
|
||||
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/*
|
||||
%exclude %{_bindir}/cmpp-tclspice
|
||||
%{_datadir}/%{name}/
|
||||
%exclude %{_datadir}/%{name}/scripts/tclspinit
|
||||
%{_libdir}/ngspice/
|
||||
|
||||
%{_mandir}/man1/*
|
||||
%exclude %{_pkgdocdir}/examples/tclspice
|
||||
%doc %{_pkgdocdir}
|
||||
%license COPYING
|
||||
|
||||
%files -n tclspice
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/cmpp-tclspice
|
||||
%doc %{_pkgdocdir}/examples/tclspice
|
||||
%{_libdir}/tclspice/
|
||||
|
||||
%dir %{_datadir}/ngspice
|
||||
%dir %{_datadir}/%{name}/scripts/
|
||||
%{_datadir}/%{name}/scripts/tclspinit
|
||||
|
||||
%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
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
|
|
Loading…
Reference in New Issue