File gpsim.spec of Package gpsim

#
# spec file for package gpsim
#
# Copyright (c) 2013 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/
#

# norootforbuild

%define         libversion 0

Name:           gpsim
Version:        0.30.0
Release:        1.1
Summary:        Simulator for Microchip's PIC Microcontrollers
License:        GPL-2.0+
Group:          Development/Tools/Other
Url:            http://gpsim.sourceforge.net/
Source:         http://downloads.sourceforge.net/project/gpsim/gpsim/%{version}/%{name}-%{version}.tar.gz
BuildRequires:  gcc-c++
BuildRequires:  gtk2-devel
%if 0%{?suse_version} >= 1200
BuildRequires:  gtkextra3-devel
%else
BuildRequires:  gtkextra2-devel
%endif
BuildRequires:  readline-devel
BuildRequires:  zlib-devel
BuildRequires:  popt-devel
BuildRequires:  gputils
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
gpsim is an open sourced simulator for Microchip's PIC microcontrollers. It
supports all three families of PICs: 12-bit, 14-bit, and 16-bit cores.


%package -n libgpsim%{libversion}
Summary:        Shared libraries from gpsim
Group:          Development/Libraries/C and C++
Obsoletes:      %name < %{version}
Provides:       %name = %{version}-%{release}

%description -n libgpsim%{libversion}
Shared libraries from gpsim for GTK wigets.

 
%package devel
Summary:        Development files for gpsim based applications
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}

%description devel
This package contains files to develop applications using gpsim.

gpsim is an open sourced simulator for Microchip's PIC microcontrollers. It
supports all three families of PICs: 12-bit, 14-bit, and 16-bit cores.


%package examples
Summary:        Development files for gpsim based applications
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
%if 0%{?suse_version} >= 1210
BuildArch:      noarch
%endif

%description examples
gpsim is an open sourced simulator for Microchip's PIC microcontrollers. It
supports all three families of PICs: 12-bit, 14-bit, and 16-bit cores.


%prep
%setup -q


%build
%configure --disable-static --with-pic
make %{?_smp_mflags}


%install
make DESTDIR=%{buildroot} install
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -r examples %{buildroot}%{_datadir}/%{name}/


%post   -n libgpsim%{libversion} -p /sbin/ldconfig

%postun -n libgpsim%{libversion} -p /sbin/ldconfig


%files
%defattr(-,root,root)
%doc ANNOUNCE AUTHORS ChangeLog COPYING HISTORY NEWS PROCESSORS
%doc README* TODO
%doc doc/gpsim.pdf
%{_bindir}/gpsim

%files -n libgpsim%{libversion}
%defattr(-,root,root)
%{_libdir}/libgpsim*.so.*

%files devel
%defattr(-,root,root)
%{_includedir}/eXdbm
%{_includedir}/gpsim
%{_libdir}/libgpsim*.so
%{_libdir}/libgpsim*.la

%files examples
%defattr(-,root,root)
%{_datadir}/%{name}

%changelog
openSUSE Build Service is sponsored by