Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 1fe3f96670c80fb45e7f4e07aac4ca02 > files > 2

dinotrace-9.4b-1.fc14.src.rpm

# 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  21.0
%define emacs_lispdir  %{_datadir}/emacs/site-lisp
%define emacs_startdir %{_datadir}/emacs/site-lisp/site-start.d
%else
%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)}
%endif

Name:           dinotrace
Version:        9.4b
Release:        1%{?dist}
Summary:        Waveform viewer for electronics

URL:            http://www.veripool.org/wiki/dinotrace
Source0:        http://www.veripool.com/ftp/%{name}-%{version}.tgz

License:        GPLv3+
Group:          Applications/Engineering
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%if 0%{?fedora}
BuildRequires:  lesstif-devel
%else
BuildRequires:  openmotif-devel
BuildRequires:  pkgconfig
%endif

BuildRequires:  desktop-file-utils

# menu entry compliance with Fedora Electronic Lab menu structure
Requires:       electronics-menu

# desktop entry icon
Requires:       gnome-icon-theme


%description
Dinotrace is a waveform viewer which understands Verilog Value
Change Dumps, ASCII, and other trace formats. It allows placing
cursors, highlighting signals, searching, printing, and other
capabilities superior to many commercial waveform viewers.

Dinotrace is optimized for rapid debugging. With VTRACE, a simulation
failure will automatically place cursors where errors occur, add
comments visible in the wave form viewer. Four mouse clicks and the
errors will be highlighted in the log files, and the values of signals
at the error will be seen in the source.


%package -n        emacs-%{name}
Summary:           Elisp source files for %{name} under GNU Emacs
Group:             Development/Libraries
BuildRequires:     emacs-el
BuildRequires:     emacs
Requires:          emacs >= %{emacs_version}
Requires:          %{name} = %{version}-%{release}
%if 0%{?rhel}
BuildRequires:     emacs-verilog-mode
Requires:          emacs-verilog-mode
%endif


%description -n emacs-%{name}
This package provides emacs support for %{name}


%prep
%setup -q

# spurious-executable-perm
chmod 0644 src/dt_util.c traces/tempest.bt.gz

## Causes data corruption : dinotrace -tempest traces/tempest.bt.gz
# file-not-utf8
#iconv -f iso8859-1 -t utf-8 traces/tempest.bt.gz > traces/tempest.conv
#mv -f traces/tempest.conv traces/tempest.bt.gz

# desktop file
cat > %{name}.desktop << EOF
[Desktop Entry]
Encoding=UTF-8
Name=Waveform viewer
GenericName=Dinotrace
Comment=Dinotrace which can be used with emacs for advance design
Type=Application
Exec=dinotrace
Icon=utilities-system-monitor
Categories=Engineering;Electronics;
EOF


cat > %{name}.el.site-start << EOF
;; Dinotrace mode
(autoload 'dinotrace-update "dinotrace" "Update dinotrace annotations in this buffer" t)
(autoload 'dinotrace-mode   "dinotrace" "Toggle dinotrace annotations in this buffer" t)
;;(global-set-key "\C-x\C-aa" 'dinotrace-update)
;;(global-set-key "\C-x\C-ad" 'dinotrace-mode)
EOF


%build
%configure
%{__make} %{?_smp_mflags}


%install
%{__rm} -rf %{buildroot}
%{__make} DESTDIR=%{buildroot} INSTALL="%{_bindir}/install -p" install


# Install emacs mode
%{__install} -d %{buildroot}%{emacs_lispdir}
%{__install} -d %{buildroot}%{emacs_startdir}
pushd lisp/
    for file in dinotrace.el sim-log.el; do
        emacs -batch -f batch-byte-compile $file
        %{__install} -pm 0644 $file ${file}c %{buildroot}%{emacs_lispdir}/
    done
popd
%{__install} -pm 0644 %{name}.el.site-start %{buildroot}%{emacs_startdir}/%{name}-init.el


desktop-file-install --vendor "" \
    --dir %{buildroot}%{_datadir}/applications \
    %{name}.desktop

# FEL Package Validation check
# dinotrace traces/ascii.tra
# dinotrace traces/vcd.vcd


%post
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :

%preun
if [ $1 = 0 ] ; then
  /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
fi

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc Changes COPYING FAQ TODO dinotrace.txt
%doc traces/
%{_bindir}/%{name}
%{_infodir}/*
%{_datadir}/applications/%{name}.desktop

%files -n emacs-%{name}
%defattr(-,root,root,-)
%{emacs_lispdir}/%{name}.el*
%{emacs_lispdir}/sim-log.el*
%{emacs_startdir}/%{name}-init.el

%Changelog
* Sun Jul 18 2010 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 9.4b-1
- new upstream release

* Sat Aug 15 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 9.4a-5
- Added pkgconfig as BR for EL-5

* Sun Aug 03 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 9.4a-4
- Fixing buildrequires for EL-5 branch

* Wed Jun 10 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 9.4a-3
- fixed sub package requires

* Mon May 11 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 9.4a-2
- dropped emacs support on EPEL - missing verilog-mode on emacs -21.4

* Mon Apr 06 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 9.4a-1
- new upstream release
- upstream applied patch dinotrace-emacs-el.patch and dinotrace-simlog.patch

* Fri Mar 06 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 9.3f-5
- package review comments : #478749c15

* Fri Mar 06 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 9.3f-4
- package review comments : #478749c4

* Wed Jan 07 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 9.3f-3
- improved emacs support and added emacs as BR

* Sun Jan 04 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 9.3f-2
- fixed emacs support

* Thu Jun 26 2008 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 9.3f-1
- Initial Package