File ksimus.spec of Package ksimus

#
# spec file for package ksimus
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           ksimus
BuildRequires:  kdelibs3-devel
BuildRequires:  libtool
Summary:        Simulation, Automation, and Visualization of Electrical Circuits
License:        GPL-2.0+
Group:          Productivity/Scientific/Electronics
Version:        0.3.6.2
Release:        0
%define rversion 0.3.6
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            http://ksimus.berlios.de
Source0:        %{name}-%{version}.tar.bz2
Source1:        %{name}-datarecorder-%{rversion}.tar.bz2
Source2:        %{name}-boolean-%{rversion}.tar.bz2
Source3:        %{name}-floatingpoint-%{rversion}.tar.bz2
Patch0:         boolean-automake.dif
Patch3:         ksimus-gcc4.diff
Patch5:         ksimus.diff
Patch6:         ksimus-datarecorder.diff
Patch7:         ksimus-boolean.diff
Patch8:         ksimus-floatingpoint.diff
Patch9:         ksimus-0.3.6-gcc43.diff
Patch10:        ksimus-boolean-0.3.6-gcc43.diff

%description
KSimus is a tool for the simulation, automation, and visualization of
technical processes (currently limited to idealized logic circuits). It
is also useful for education and experiments in the scope of logical
and automatic control circuits.


%package devel
Summary:        Simulation, Automation, and Visualization of Electrical Circuits
Group:          Productivity/Scientific/Electronics
Requires:       %name = %version

%description devel
KSimus is a tool for the simulation, automation, and visualization of
technical processes (currently limited to idealized logic circuits). It
is also useful for education and experiments in the scope of logical
and automatic control circuits.

%prep 
%setup -q -b 1 -b 2 -b 3 -n ksimus-%{rversion}
%patch5
%patch3
%patch9
. /etc/opt/kde3/common_options
update_admin --no-unsermake
cd ../ksimus-datarecorder-%{rversion}
%patch6
grep -v ^CHECK_KSIMUS configure.in.in > configure.in.in.new
mv configure.in.in.new configure.in.in
update_admin
cd ../ksimus-boolean-%{rversion}
%patch7
%patch10
grep -v ^CHECK_KSIMUS configure.in.in > configure.in.in.new
mv configure.in.in.new configure.in.in
update_admin
cd ../ksimus-floatingpoint-%{rversion}
%patch8
grep -v ^CHECK_KSIMUS configure.in.in > configure.in.in.new
mv configure.in.in.new configure.in.in
update_admin --no-unsermake

%build
rm -rf $RPM_BUILD_ROOT
. /etc/opt/kde3/common_options
for i in . ksimus-datarecorder-%{rversion} ksimus-boolean-%{rversion} ksimus-floatingpoint-%{rversion}; do
  cd $i
  ./configure $configkde \
              --with-extra-includes=${RPM_BUILD_ROOT}/opt/kde3/include/ \
              --with-extra-libs=${RPM_BUILD_ROOT}/opt/kde3/%_lib/ \
              --disable-final
  make %{?jobs:-j%jobs}
  make DESTDIR=$RPM_BUILD_ROOT install
  cd ..
#  export CXXFLAGS="$_CXXFLAGS -I${RPM_BUILD_ROOT}/opt/kde3/include/ -L${RPM_BUILD_ROOT}/opt/kde3/lib/ "
done

%install
perl -spi -e "s@$RPM_BUILD_ROOT@@g" ${RPM_BUILD_ROOT}/opt/kde3/%_lib/ksimus/*.la
%find_lang %name --all-name
%suse_update_desktop_file -G "Network Simulator" %name Engineering

%files -f %name.lang
%defattr(-,root,root)
%doc README AUTHORS ChangeLog COPYING 
/opt/kde3/bin/*
/opt/kde3/%_lib/ksimus
/opt/kde3/share/icons/??color
/opt/kde3/share/appl*/*/*.desktop
/opt/kde3/share/apps/ksimus
/opt/kde3/share/mimelnk/*/*.desktop

%files devel
%defattr(-,root,root)
/opt/kde3/include/ksimus

%changelog