Blob Blame History Raw
# https://fedoraproject.org/wiki/Packaging:Haskell

%global pkg_name bustle

Name:           bustle
Version:        0.4.7
Release:        2%{?dist}
Summary:        Draw pretty sequence diagrams of D-Bus traffic

License:        LGPLv2+
URL:            http://hackage.haskell.org/package/%{name}
Source0:        http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz

Requires:       gnome-icon-theme
BuildRequires:  intltool
BuildRequires:  help2man
BuildRequires:  ghc-Cabal-devel
BuildRequires:  ghc-rpm-macros
BuildRequires:  desktop-file-utils
# Begin cabal-rpm deps:
BuildRequires:  ghc-bytestring-devel
BuildRequires:  ghc-cairo-devel
BuildRequires:  ghc-containers-devel
BuildRequires:  ghc-dbus-devel
BuildRequires:  ghc-directory-devel
BuildRequires:  ghc-filepath-devel
BuildRequires:  ghc-glib-devel
BuildRequires:  ghc-gtk-devel
BuildRequires:  ghc-hgettext-devel
BuildRequires:  ghc-mtl-devel
BuildRequires:  ghc-pango-devel
BuildRequires:  ghc-parsec-devel
BuildRequires:  ghc-pcap-devel
BuildRequires:  ghc-process-devel
BuildRequires:  ghc-setlocale-devel
BuildRequires:  ghc-text-devel
BuildRequires:  ghc-time-devel
BuildRequires:  pkgconfig(glib-2.0)
%if %{with tests}
BuildRequires:  ghc-HUnit-devel
BuildRequires:  ghc-QuickCheck-devel
BuildRequires:  ghc-test-framework-devel
BuildRequires:  ghc-test-framework-hunit-devel
%endif
# End cabal-rpm deps

%description
Bustle is a better dbus-monitor!

It records and draws sequence diagrams of D-Bus activity, showing
signal emissions, method calls and their corresponding returns, with
timestamps for each individual event and the duration of each method
call. This can help you check for unwanted D-Bus traffic, and pinpoint
why your D-Bus-based application isn't performing as well as you like.
It also provides statistics like signal frequencies and average method
call times.


%prep
%setup -q


%build
%ghc_bin_build


%install
%ghc_bin_install
make DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} INSTALL="install -p" install
#%%find_lang %%{name}

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

%postun
update-desktop-database &> /dev/null || :
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 || :


%check
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%if %{with tests}
%cabal test
%endif


#%%files -f %%{name}.lang
%files
%doc LICENSE
%{_bindir}/%{name}
%{_bindir}/%{name}-pcap
%{_datadir}/%{name}-%{version}/
%exclude %{_datadir}/%{name}-%{version}/LICENSE
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_mandir}/man1/%{name}-pcap.1*


%changelog
* Fri Sep 26 2014 Philip Withnall <philip@tecnocode.co.uk> - 0.4.7-2
- Rebuilt for ghc-setlocale 1.0.0.1

* Tue Aug 12 2014 Philip Withnall <philip@tecnocode.co.uk> - 0.4.7-1
- spec file generated by cabal-rpm-0.8.11