Blob Blame History Raw
Name:           covered
Version:        0.7.10
Release:        8%{?dist}
Summary:        Verilog code coverage analyzer

Group:          Applications/Engineering
License:        GPLv2+
URL:            http://covered.sourceforge.net/
Source0:        http://downloads.sourceforge.net/covered/%{name}-%{version}.tar.gz

BuildRequires:  tk-devel
BuildRequires:  bison 
BuildRequires:  flex 
BuildRequires:  gperf 
BuildRequires:  iverilog-devel
BuildRequires:  gplcver
BuildRequires:  desktop-file-utils

# Enable LXT2 formatted dumpfiles | GTKWaves likes it
BuildRequires:  zlib-devel 

# Verilog Simulators
Requires:       gplcver
Requires:       iverilog

Requires:       electronics-menu

# rpmlints warnings ignored:
#covered.i686: E: explicit-lib-dependency tklib
#covered.i686: W: hidden-file-or-dir /usr/share/covered/.coveredrc

# GUI Needs Tk TableLists
Requires:       tklib

# Fix for building with tcl/tk8.6
Patch0:         covered-0.7.10-tcl86.patch

%description
Covered is a Verilog code-coverage utility using VCD/LXT style dumpfiles
and the design to generate line, toggle, memory, combinational logic, 
FSM state/arc and assertion coverage reports. Covered also contains a 
built-in race condition checker and GUI report viewer.


%prep
%setup -q

%patch0 -p1 -b .tcl86

# tarball isn't packaged properly
# contains autotools' temporary files
rm -r autom4te.cache
# Fix timestamps to prevent the autoheader to be re-run
touch -r aclocal.m4 configure.in configure

sed -i "s|/local||g" doc/covered.1    

# Desktop File
cat > %{name}.desktop << EOF
[Desktop Entry]
Encoding=UTF-8
Name=Coverage Analyzer
GenericName=Covered
Comment=Verilog code coverage analyzer
Type=Application
Exec=covered report -view
Icon=covered
Categories=Engineering;Electronics;
EOF

%build
# FIXME: Package suffers from c11/inline issues
# Workaround by appending -std=gnu89 to CFLAGS
# Proper fix would be to fix the source-code

# Enabling debug, so that users can use the -D argument
%configure \
    --with-iv=%{_prefix} \
    --with-cver=%{_includedir}/cver \
    --enable-debug \
    CFLAGS="${CFLAGS} -std=gnu89"

make %{?_smp_mflags}


%install
make INSTALL="%{_bindir}/install -p" install DESTDIR=%{buildroot}


# desktop file and its icon
desktop-file-install --vendor "" \
    --dir %{buildroot}%{_datadir}/applications \
    %{name}.desktop
install -d %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/
install -pm 0644 scripts/cov_icon.gif \
    %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
                 

%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%files
%doc AUTHORS ChangeLog COPYING README TODO NEWS
# GUI needs this location
%doc %{_datadir}/%{name}/doc
%{_bindir}/%{name}
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/.coveredrc
%{_datadir}/%{name}/scripts
%{_mandir}/man1/%{name}.1.gz
%{_libexecdir}/%{name}.cver.so
%{_libexecdir}/%{name}.vpi
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png


%changelog
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.10-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Mon Jul 13 2015 Ralf Corsépius <corsepiu@fedoraproject.org> - 0.7.10-7
- Append -std=gnu89 to CFLAGS (Fix F23FTBFS, RHBZ#1239415).
- Modernize spec.
- Minor spec cleanups.

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.10-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.10-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.10-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed May 21 2014 Jaroslav ҆karvada <jskarvad@redhat.com> - 0.7.10-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/f21tcl86

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Fri Mar 15 2013 Shakthi Kannan <shakthimaan [AT] fedoraproject dot org> - 0.7.10-1
- Updated package to 0.7.10 upstream release

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue Nov 17 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 0.7.7-1
- Initial package for fedora.