File bustle.spec of Package bustle
#
# spec file for package bustle
#
# Copyright (c) 2016 SUSE LINUX 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/
#
%bcond_with tests
Name: bustle
Version: 0.5.4
Release: 0
Summary: Draw sequence diagrams of D-Bus traffic
License: LGPL-2.1+ and GPL-2.0+ and GPL-3.0
Group: System/Libraries
Url: https://hackage.haskell.org/package/%{name}
Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
BuildRequires: ghc-Cabal-devel
# 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-gio-devel
BuildRequires: ghc-glib-devel
BuildRequires: ghc-gtk3-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-rpm-macros
BuildRequires: ghc-setlocale-devel
BuildRequires: ghc-text-devel
BuildRequires: ghc-time-devel
BuildRequires: help2man
BuildRequires: intltool
BuildRequires: libpcap-devel
# End cabal-rpm deps
BuildRequires: pkgconfig
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: pkgconfig(glib-2.0)
Requires(post): update-desktop-files
Requires(postun): update-desktop-files
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with tests}
BuildRequires: ghc-HUnit-devel
BuildRequires: ghc-QuickCheck-devel
BuildRequires: ghc-test-framework-devel
BuildRequires: ghc-test-framework-hunit-devel
%endif
%description
Draw sequence diagrams of D-Bus traffic.
%prep
%setup -q
sed -i -e 's/\/usr\/local/\%{_prefix}/g' Makefile
%build
%ghc_bin_build
make %{?_smp_mflags}
%install
%ghc_bin_install
%make_install
rm %{buildroot}%{_datadir}/%{name}-%{version}/LICENSE
%post
%desktop_database_post
%icon_theme_cache_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%check
%if %{with tests}
%{cabal} test
%endif
%files
%defattr(-,root,root,-)
%doc LICENSE
%doc README.md LICENSE.bundled-libraries
%{_bindir}/%{name}
%{_bindir}/%{name}-pcap
%{_mandir}/man1/%{name}-pcap.1*
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/appdata
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/%{name}-%{version}
%changelog