File darcs.spec of Package darcs
#
# spec file for package darcs
#
# Copyright (c) 2017 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/
#
%global pkg_name darcs
%bcond_with tests
Name: %{pkg_name}
Version: 2.12.5
Release: 0
Summary: A distributed, interactive, smart revision control system
License: GPL-2.0+
Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{name}
Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
Source4: %{name}.changes
BuildRequires: chrpath
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-HTTP-devel
BuildRequires: ghc-array-devel
BuildRequires: ghc-async-devel
BuildRequires: ghc-attoparsec-devel
BuildRequires: ghc-base16-bytestring-devel
BuildRequires: ghc-binary-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-cryptohash-devel
BuildRequires: ghc-data-ordlist-devel
BuildRequires: ghc-directory-devel
BuildRequires: ghc-fgl-devel
BuildRequires: ghc-filepath-devel
BuildRequires: ghc-graphviz-devel
BuildRequires: ghc-hashable-devel
BuildRequires: ghc-haskeline-devel
BuildRequires: ghc-html-devel
BuildRequires: ghc-mmap-devel
BuildRequires: ghc-mtl-devel
BuildRequires: ghc-network-devel
BuildRequires: ghc-network-uri-devel
BuildRequires: ghc-old-time-devel
BuildRequires: ghc-parsec-devel
BuildRequires: ghc-process-devel
BuildRequires: ghc-random-devel
BuildRequires: ghc-regex-applicative-devel
BuildRequires: ghc-regex-compat-tdfa-devel
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-sandi-devel
BuildRequires: ghc-tar-devel
BuildRequires: ghc-terminfo-devel
BuildRequires: ghc-text-devel
BuildRequires: ghc-time-devel
BuildRequires: ghc-transformers-compat-devel
BuildRequires: ghc-transformers-devel
BuildRequires: ghc-unix-compat-devel
BuildRequires: ghc-unix-devel
BuildRequires: ghc-utf8-string-devel
BuildRequires: ghc-vector-devel
BuildRequires: ghc-zip-archive-devel
BuildRequires: ghc-zlib-devel
BuildRequires: libcurl-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with tests}
BuildRequires: ghc-FindBin-devel
BuildRequires: ghc-HUnit-devel
BuildRequires: ghc-QuickCheck-devel
BuildRequires: ghc-cmdargs-devel
BuildRequires: ghc-shelly-devel
BuildRequires: ghc-split-devel
BuildRequires: ghc-test-framework-devel
BuildRequires: ghc-test-framework-hunit-devel
BuildRequires: ghc-test-framework-quickcheck2-devel
%endif
%description
Darcs is a free, open source revision control system. It is:
* Distributed: Every user has access to the full command set, removing
boundaries between server and client or committer and non-committers.
* Interactive: Darcs is easy to learn and efficient to use because it asks you
questions in response to simple commands, giving you choices in your work flow.
You can choose to record one change in a file, while ignoring another.
As you update from upstream, you can review each patch name, even the full
"diff" for interesting patches.
* Smart: Originally developed by physicist David Roundy, darcs is based on a
unique algebra of patches.
This smartness lets you respond to changing demands in ways that would
otherwise not be possible. Learn more about spontaneous branches with darcs.
%package -n ghc-%{name}
Summary: Haskell %{name} library
Group: System/Libraries
%description -n ghc-%{name}
This package provides the Haskell %{name} shared library.
%package -n ghc-%{name}-devel
Summary: Haskell %{name} library development files
Group: Development/Libraries/Other
Requires: ghc-%{name} = %{version}-%{release}
Requires: ghc-compiler = %{ghc_version}
Requires: libcurl-devel
Requires(post): ghc-compiler = %{ghc_version}
Requires(postun): ghc-compiler = %{ghc_version}
%description -n ghc-%{name}-devel
This package provides the Haskell %{name} library development files.
%prep
%setup -q
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{SOURCE4}")"
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
TIME="\"$(date -d "${modified}" "+%%R")\""
find . -name '*.[ch]' | xargs sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g"
%build
%ghc_lib_build
%install
%ghc_lib_install
%ghc_fix_rpath %{pkg_name}-%{version}
%check
%cabal_test
%post -n ghc-%{name}-devel
%ghc_pkg_recache
%postun -n ghc-%{name}-devel
%ghc_pkg_recache
%files
%defattr(-,root,root,-)
%doc COPYING
%doc CHANGELOG README.md
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1%{ext_man}
%files -n ghc-%{name} -f ghc-%{name}.files
%defattr(-,root,root,-)
%doc COPYING
%files -n ghc-%{name}-devel -f ghc-%{name}-devel.files
%defattr(-,root,root,-)
%doc CHANGELOG README.md
%changelog