File perl-SystemPerl.spec of Package perl-SystemPerl
#
# spec file for package perl-SystemPerl
#
# Copyright (c) 2014 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: perl-SystemPerl
Version: 1.342
Release: 0
%define cpan_name SystemPerl
Summary: SystemPerl Language Extension to SystemC
License: Artistic-2.0 or LGPL-3.0
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/SystemPerl/
Source: SystemPerl-1.342.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: bison
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Pod::Usage) >= 1.34
BuildRequires: perl(Verilog::Getopt) >= 2.211
BuildRequires: perl(Verilog::Netlist) >= 2.315
Requires: perl(Pod::Usage) >= 1.34
Requires: perl(Verilog::Getopt) >= 2.211
Requires: perl(Verilog::Netlist) >= 2.315
%{perl_requires}
%description
SystemPerl is a version of the SystemC language. It is designed to expand
text so that needless repetition in the language is minimized. By using the
sp_preproc manpage, SystemPerl files can be expanded into C++ files at
compile time, or expanded in place to make them valid stand-alone SystemC
files.
The concept of SystemPerl is based upon the AUTOS in the the verilog-mode
manpage package for Emacs, by the same author.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/Perl
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q -n %{cpan_name}-%{version}
find . -type f -print0 | xargs -0 chmod 644
%build
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
make %{?_smp_mflags}
%install
%perl_make_install
%perl_process_packlist
# -devel package and support for SystemC
mkdir -p %{buildroot}%{_includedir}/%{name}
install -pm 0644 src/*.h %{buildroot}%{_includedir}/%{name}
install -pm 0644 src/*.cpp %{buildroot}%{_includedir}/%{name}
%check
make test
%files
%defattr(-,root,root,-)
%doc Changes COPYING README
%doc example/
%{_bindir}/*
%dir %{perl_vendorarch}/auto/SystemC
%dir %{perl_vendorarch}/auto/SystemC/Parser
%{perl_vendorarch}/auto/SystemC/Parser/Parser.*
%dir %{perl_vendorarch}/SystemC
%{perl_vendorarch}/SystemC/*
%{_mandir}/man?/*
%files devel
%defattr(-,root,root,-)
%{_includedir}/%{name}/
%changelog