Blob Blame History Raw
# If the emacs-el package has installed a pkgconfig file, use that to determine
# install locations and Emacs version at build time, otherwise set defaults.
%if %($(pkg-config emacs) ; echo $?)
%define emacs_version 22.1
%define emacs_lispdir  %{_datadir}/emacs/site-lisp
%define emacs_startdir %{_datadir}/emacs/site-lisp/site-start.d
%define emacs_version  %{expand:%(pkg-config emacs --modversion)}
%define emacs_lispdir  %{expand:%(pkg-config emacs --variable sitepkglispdir)}
%define emacs_startdir %{expand:%(pkg-config emacs --variable sitestartdir)}

Name:           perl-SystemC-Vregs
Version:        1.463
Release:        1%{?dist}
Summary:        Utility routines used by vregs

License:        LGPLv3+ or Artistic 2.0
Group:          Development/Libraries

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

BuildRequires:  perl(Bit::Vector)
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(HTML::Parser)
BuildRequires:  perl(HTML::TableExtract)
BuildRequires:  perl(Verilog::Language) >= 2.1
BuildRequires:  readline-devel

Requires:       perl(Bit::Vector)
Requires:       perl(HTML::Parser)
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

A Vregs object contains a documentation "package" containing enumerations,
definitions, classes, and registers.

%package -n     emacs-vregs-mode
Summary:        Elisp source files for systemc-vregs under GNU Emacs
Group:          Development/Libraries
BuildRequires:  emacs-el
BuildRequires:  emacs
Requires:       emacs(bin) >= %{emacs_version}

%description -n emacs-vregs-mode
This package provides emacs support for systemc-vregs

%setup -q -n SystemC-Vregs-%{version}

# fixing error: ‘strchr’ was not declared in this scope
%{__sed} -i "s|#include <stdlib.h>|#include <stdlib.h>\n#include <string.h>|" \

%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}



find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;

emacs -batch -f batch-byte-compile vregs-mode.el
%{__install} -d %{buildroot}%{emacs_lispdir}
%{__install} -pm 0644 vregs-mode.el vregs-mode.elc %{buildroot}%{emacs_lispdir}/

%{_fixperms} $RPM_BUILD_ROOT/*

make test


%doc Changes COPYING README vregs_spec.doc vregs_spec.htm

%dir %{perl_vendorlib}/SystemC

%dir %{perl_vendorlib}/SystemC/Vregs

%files -n emacs-vregs-mode

* Thu May 21 2009 Chitlesh GOORAH <chitlesh [AT] fedoraproject DOT org> 1.463-1
- new upstream release

* Wed Mar 04 2009 Chitlesh GOORAH <chitlesh [AT] fedoraproject DOT org> 1.462-1
- new upstream release

* Fri Jan 09 2009 Chitlesh GOORAH <chitlesh [AT] fedoraproject DOT org> 1.461-1
- new upstream release

* Sun Dec 28 2008 Chitlesh GOORAH <chitlesh [AT] fedoraproject DOT org> 1.460-2
- spec file revisited upon request : #476449c1

* Sun Dec 14 2008 Chitlesh GOORAH <chitlesh [AT] fedoraproject DOT org> 1.460-1
- Specfile autogenerated by cpanspec 1.77.