38ea6a7
# generated by cabal-rpm-2.1.0
eb55384
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/
d937368
d937368
%global pkg_name pcap
d937368
%global pkgver %{pkg_name}-%{version}
d937368
d937368
Name:           ghc-%{pkg_name}
d937368
Version:        0.4.5.2
56f7a66
Release:        %autorelease
d937368
Summary:        A system-independent interface for user-level packet capture
d937368
38ea6a7
License:        BSD-3-Clause
d937368
Url:            https://hackage.haskell.org/package/%{pkg_name}
9635a8e
# Begin cabal-rpm sources:
d937368
Source0:        https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
9635a8e
# End cabal-rpm sources
d937368
9635a8e
# Begin cabal-rpm deps:
d937368
BuildRequires:  ghc-Cabal-devel
d937368
BuildRequires:  ghc-rpm-macros
38ea6a7
BuildRequires:  ghc-base-devel
38ea6a7
BuildRequires:  ghc-bytestring-devel
38ea6a7
BuildRequires:  ghc-network-devel
38ea6a7
BuildRequires:  ghc-time-devel
38ea6a7
%if %{with ghc_prof}
194d6ff
BuildRequires:  ghc-base-prof
194d6ff
BuildRequires:  ghc-bytestring-prof
194d6ff
BuildRequires:  ghc-network-prof
194d6ff
BuildRequires:  ghc-time-prof
38ea6a7
%endif
d937368
# End cabal-rpm deps
d937368
BuildRequires:  libpcap-devel
d937368
d937368
%description
d937368
Haskell bindings for libpcap.
d937368
d937368
Libpcap provides a portable framework for low-level network
d937368
monitoring.  Libpcap can provide network statistics collection,
d937368
security monitoring and network debugging.  Since almost every system
d937368
vendor provides a different interface for packet capture, the libpcap
d937368
authors created this system-independent API to ease in porting and to
d937368
alleviate the need for several system-dependent packet capture modules
d937368
in each application.
d937368
d937368
Install libpcap if you need to do low-level network traffic monitoring
d937368
on your network.
d937368
d937368
d937368
%package devel
d937368
Summary:        Haskell %{pkg_name} library development files
d937368
Provides:       %{name}-static = %{version}-%{release}
194d6ff
Provides:       %{name}-static%{?_isa} = %{version}-%{release}
d937368
%if %{defined ghc_version}
d937368
Requires:       ghc-compiler = %{ghc_version}
d937368
%endif
d937368
Requires:       %{name}%{?_isa} = %{version}-%{release}
d937368
Requires:       libpcap-devel%{?_isa}
d937368
d937368
%description devel
d937368
This package provides the Haskell %{pkg_name} library development files.
d937368
d937368
4348f73
%if %{with haddock}
4348f73
%package doc
4348f73
Summary:        Haskell %{pkg_name} library documentation
a8d3db5
BuildArch:      noarch
f8512f3
Requires:       ghc-filesystem
4348f73
4348f73
%description doc
4348f73
This package provides the Haskell %{pkg_name} library documentation.
4348f73
%endif
4348f73
4348f73
4348f73
%if %{with ghc_prof}
4348f73
%package prof
4348f73
Summary:        Haskell %{pkg_name} profiling library
4348f73
Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
a8d3db5
Supplements:    (%{name}-devel and ghc-prof)
4348f73
4348f73
%description prof
4348f73
This package provides the Haskell %{pkg_name} profiling library.
4348f73
%endif
4348f73
4348f73
d937368
%prep
9635a8e
# Begin cabal-rpm setup:
d937368
%setup -q -n %{pkgver}
9635a8e
# End cabal-rpm setup
d937368
d937368
d937368
%build
9635a8e
# Begin cabal-rpm build:
d937368
%ghc_lib_build
9635a8e
# End cabal-rpm build
d937368
d937368
d937368
%install
9635a8e
# Begin cabal-rpm install
d937368
%ghc_lib_install
9635a8e
# End cabal-rpm install
d937368
d937368
d937368
%files -f %{name}.files
9635a8e
# Begin cabal-rpm files:
d937368
%license LICENSE
9635a8e
# End cabal-rpm files
d937368
d937368
d937368
%files devel -f %{name}-devel.files
d937368
%doc README.markdown
d937368
d937368
4348f73
%if %{with haddock}
4348f73
%files doc -f %{name}-doc.files
a8d3db5
%license LICENSE
4348f73
%endif
4348f73
4348f73
4348f73
%if %{with ghc_prof}
4348f73
%files prof -f %{name}-prof.files
4348f73
%endif
4348f73
4348f73
d937368
%changelog
56f7a66
%autochangelog