[git-annex/f17] import package based on ghc7.0 branch from github for ghc-7.0

Jens Petersen petersen at fedoraproject.org
Mon Jul 2 08:25:35 UTC 2012


commit 25d6299bbaafb2ef8fe996000f5f448c5a3f9196
Author: Jens Petersen <petersen at redhat.com>
Date:   Mon Jul 2 17:25:27 2012 +0900

    import package based on ghc7.0 branch from github for ghc-7.0

 .gitignore                |    1 +
 git-annex-no-ifelse.patch |   73 +++++++++++++++++++++++
 git-annex.spec            |  144 +++++++++++++++++++++++++++++++++++++++++++++
 sources                   |    1 +
 4 files changed, 219 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..884b3b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/joeyh-git-annex-3.20120522-134-g6895a6e.tar.gz
diff --git a/git-annex-no-ifelse.patch b/git-annex-no-ifelse.patch
new file mode 100644
index 0000000..6db3a33
--- /dev/null
+++ b/git-annex-no-ifelse.patch
@@ -0,0 +1,73 @@
+diff -u -r -U5 -N git-annex-3.20120522/Common.hs git-annex-3.20120522.no-ifelse/Common.hs
+--- git-annex-3.20120522/Common.hs	2012-05-22 11:28:25.000000000 -0400
++++ git-annex-3.20120522.no-ifelse/Common.hs	2012-06-02 09:44:55.941168737 -0400
+@@ -1,9 +1,8 @@
+ module Common (module X) where
+ 
+ import Control.Monad as X hiding (join)
+-import Control.Monad.IfElse as X
+ import Control.Applicative as X
+ import Control.Monad.State.Strict as X (liftIO)
+ import Control.Exception.Extensible as X (IOException)
+ 
+ import Data.Maybe as X
+@@ -25,7 +24,8 @@
+ import Utility.SafeCommand as X
+ import Utility.Path as X
+ import Utility.Directory as X
+ import Utility.Monad as X
+ import Utility.FileSystemEncoding as X
++import Utility.Conditional as X
+ 
+ import Utility.PartialPrelude as X
+diff -u joeyh-git-annex-6895a6e/git-annex.cabal.no-ifelse joeyh-git-annex-6895a6e/git-annex.cabal
+--- joeyh-git-annex-6895a6e/git-annex.cabal.no-ifelse	2012-06-01 12:33:41.000000000 +0900
++++ joeyh-git-annex-6895a6e/git-annex.cabal	2012-06-26 13:26:56.398051874 +0900
+@@ -35,7 +35,7 @@
+    unix, containers, utf8-string, network, mtl, bytestring, old-locale, time,
+    pcre-light, extensible-exceptions, dataenc, SHA, process, json, HTTP,
+    base < 5, monad-control, transformers-base, lifted-base,
+-   IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance
++   text, QuickCheck >= 2.1, bloomfilter, edit-distance
+   Other-Modules: Utility.Touch
+   C-Sources: Utility/libdiskfree.c
+   Extensions: CPP
+diff -u -r -U5 -N git-annex-3.20120522/Utility/Conditional.hs git-annex-3.20120522.no-ifelse/Utility/Conditional.hs
+--- git-annex-3.20120522/Utility/Conditional.hs	1969-12-31 19:00:00.000000000 -0500
++++ git-annex-3.20120522.no-ifelse/Utility/Conditional.hs	2012-06-02 09:44:55.942168737 -0400
+@@ -0,0 +1,16 @@
++{- monadic conditional operators
++ -
++ - Copyright 2011 Joey Hess <joey at kitenet.net>
++ -
++ - Licensed under the GNU GPL version 3 or higher.
++ -}
++
++module Utility.Conditional where
++
++import Control.Monad (when, unless)
++
++whenM :: Monad m => m Bool -> m () -> m ()
++whenM c a = c >>= flip when a
++
++unlessM :: Monad m => m Bool -> m () -> m ()
++unlessM c a = c >>= flip unless a
+diff -up joeyh-git-annex-6895a6e/Utility/Directory.hs~ joeyh-git-annex-6895a6e/Utility/Directory.hs
+--- joeyh-git-annex-6895a6e/Utility/Directory.hs~	2012-06-01 12:33:41.000000000 +0900
++++ joeyh-git-annex-6895a6e/Utility/Directory.hs	2012-06-26 13:17:05.177416437 +0900
+@@ -12,7 +12,6 @@ import System.Posix.Files
+ import System.Directory
+ import Control.Exception (throw)
+ import Control.Monad
+-import Control.Monad.IfElse
+ import System.FilePath
+ import Control.Applicative
+ import Control.Exception (bracket_)
+@@ -24,6 +23,7 @@ import Utility.TempFile
+ import Utility.Exception
+ import Utility.Monad
+ import Utility.Path
++import Utility.Conditional
+ 
+ dirCruft :: FilePath -> Bool
+ dirCruft "." = True
diff --git a/git-annex.spec b/git-annex.spec
new file mode 100644
index 0000000..df7bd25
--- /dev/null
+++ b/git-annex.spec
@@ -0,0 +1,144 @@
+# cabal2spec-0.25.4
+# https://fedoraproject.org/wiki/Packaging:Haskell
+# https://fedoraproject.org/wiki/PackagingDrafts/Haskell
+
+%bcond_without docs
+
+%global git_index 6895a6e
+
+Name:           git-annex
+Version:        3.20120522
+Release:        2%{?dist}
+Summary:        Manage files with git, without checking their contents into git
+
+Group:          Applications/Archiving
+License:        GPLv3+
+# BEGIN cabal2spec
+URL:            http://hackage.haskell.org/package/%{name}
+# wget https://nodeload.github.com/joeyh/git-annex/tarball/ghc-7.0
+Source0:        joeyh-%{name}-%{version}-134-g%{git_index}.tar.gz
+Patch0:         git-annex-no-ifelse.patch
+ExclusiveArch:  %{ghc_arches}
+BuildRequires:  ghc-Cabal-devel
+BuildRequires:  ghc-rpm-macros
+# END cabal2spec
+BuildRequires:  ghc-bloomfilter-devel
+BuildRequires:  ghc-bytestring-devel
+BuildRequires:  ghc-containers-devel
+BuildRequires:  ghc-dataenc-devel
+BuildRequires:  ghc-directory-devel
+BuildRequires:  ghc-edit-distance-devel
+BuildRequires:  ghc-extensible-exceptions-devel
+BuildRequires:  ghc-filepath-devel
+#BuildRequires:  ghc-hS3-devel
+BuildRequires:  ghc-hslogger-devel
+BuildRequires:  ghc-HTTP-devel
+#BuildRequires:  ghc-IfElse-devel
+BuildRequires:  ghc-json-devel
+BuildRequires:  ghc-lifted-base-devel
+BuildRequires:  ghc-MissingH-devel
+BuildRequires:  ghc-monad-control-devel
+BuildRequires:  ghc-mtl-devel
+BuildRequires:  ghc-network-devel
+BuildRequires:  ghc-old-locale-devel
+BuildRequires:  ghc-pcre-light-devel
+BuildRequires:  ghc-process-devel
+BuildRequires:  ghc-QuickCheck-devel
+BuildRequires:  ghc-SHA-devel
+BuildRequires:  ghc-text-devel
+BuildRequires:  ghc-time-devel
+BuildRequires:  ghc-transformers-base-devel
+BuildRequires:  ghc-unix-devel
+BuildRequires:  ghc-utf8-string-devel
+BuildRequires:  git
+%if %{with docs}
+BuildRequires:  ikiwiki
+BuildRequires:  perl(Image::Magick)
+%endif
+
+Requires:       git
+
+%description
+git-annex allows managing files with git, without checking the file contents
+into git. While that may seem paradoxical, it is useful when dealing with files
+larger than git can currently easily handle, whether due to limitations in
+memory, checksumming time, or disk space.
+
+Even without file content tracking, being able to manage files with git, move
+files around and delete files with versioned directory trees, and use branches
+and distributed clones, are all very handy reasons to use git. And annexed
+files can co-exist in the same git repository with regularly versioned files,
+which is convenient for maintaining documents, Makefiles, etc that are
+associated with annexed files but that benefit from full revision control.
+
+When a file is annexed, its content is moved into a key-value store, and a
+symlink is made that points to the content. These symlinks are checked into git
+and versioned like regular files. You can move them around, delete them, and so
+on. Pushing to another git repository will make git-annex there aware of the
+annexed file, and it can be used to retrieve its content from the key-value
+store.
+
+%if %{with docs}
+%package docs
+Summary:        %{summary}
+Group:          Documentation
+BuildArch:      noarch
+
+%description docs
+This package contains the documentation for %{name} in HTML format.
+%endif
+
+%prep
+%setup -q %{?git_index:-n joeyh-git-annex-%{git_index}}
+%patch0 -p1 -b .no-ifelse
+
+
+%build
+%ghc_bin_build
+
+%if %{with docs}
+make docs
+%endif
+
+
+%install
+%ghc_bin_install
+ln -s %{name} %{buildroot}%{_bindir}/%{name}-shell
+
+mkdir -p %{buildroot}%{_mandir}/man1
+install -m 0644 git-annex.1 %{buildroot}%{_mandir}/man1
+install -m 0644 git-annex-shell.1 %{buildroot}%{_mandir}/man1
+
+
+%files
+%doc doc/GPL README debian/changelog
+%attr(755,root,root) %{_bindir}/%{name}
+%{_bindir}/%{name}-shell
+%{_mandir}/man1/git-annex.1*
+%{_mandir}/man1/git-annex-shell.1*
+
+%if %{with docs}
+%files docs
+%doc html/
+%endif
+
+
+%changelog
+* Tue Jun 26 2012 Jens Petersen <petersen at redhat.com> - 3.20120522-2
+- build ghc7.0 branch from github for ghc-7.0
+- fix doc file symlinks
+- BR ImageMagick-perl
+- make docs subpackage noarch
+
+* Tue May 22 2012 Jens Petersen <petersen at redhat.com> - 3.20120522-1
+- create git-annex-shell symlink
+- build and include manpages and docs in a subpackage
+
+* Sat Apr 21 2012 Ben Boeckel <mathstuf at gmail.com> - 3.20120418-1
+- Update to 3.20120418
+
+* Fri Mar 02 2012 Ben Boeckel <mathstuf at gmail.com> - 3.20120229-1
+- Update to 3.20120229
+
+* Fri Mar  2 2012 Fedora Haskell SIG <haskell-devel at lists.fedoraproject.org>
+- spec file template generated by cabal2spec-0.25.4
diff --git a/sources b/sources
index e69de29..5363343 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+9bf5895bcd50360afa29ee874f5e7b8a  joeyh-git-annex-3.20120522-134-g6895a6e.tar.gz


More information about the scm-commits mailing list