Merge branch 'master' into watch
Conflicts: debian/changelog git-annex.cabal
This commit is contained in:
		
				commit
				
					
						2e5ea30981
					
				
			
		
					 9 changed files with 75 additions and 23 deletions
				
			
		
							
								
								
									
										4
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							|  | @ -13,3 +13,7 @@ html | ||||||
| Utility/Touch.hs | Utility/Touch.hs | ||||||
| Utility/libdiskfree.o | Utility/libdiskfree.o | ||||||
| dist | dist | ||||||
|  | # Sandboxed builds | ||||||
|  | cabal-dev | ||||||
|  | # Project-local emacs configuration | ||||||
|  | .dir-locals.el | ||||||
|  |  | ||||||
							
								
								
									
										1
									
								
								CONTRIBUTING
									
										
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								CONTRIBUTING
									
										
									
									
									
										Symbolic link
									
								
							|  | @ -0,0 +1 @@ | ||||||
|  | doc/contributing.mdwn | ||||||
							
								
								
									
										1
									
								
								COPYRIGHT
									
										
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								COPYRIGHT
									
										
									
									
									
										Symbolic link
									
								
							|  | @ -0,0 +1 @@ | ||||||
|  | debian/copyright | ||||||
							
								
								
									
										25
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										25
									
								
								Makefile
									
										
									
									
									
								
							|  | @ -47,18 +47,22 @@ git-annex-shell.1: doc/git-annex-shell.mdwn | ||||||
| git-union-merge.1: doc/git-union-merge.mdwn | git-union-merge.1: doc/git-union-merge.mdwn | ||||||
| 	./mdwn2man git-union-merge 1 doc/git-union-merge.mdwn > git-union-merge.1 | 	./mdwn2man git-union-merge 1 doc/git-union-merge.mdwn > git-union-merge.1 | ||||||
| 
 | 
 | ||||||
| install: all | install-mans: $(mans) | ||||||
| 	install -d $(DESTDIR)$(PREFIX)/bin |  | ||||||
| 	install $(bins) $(DESTDIR)$(PREFIX)/bin |  | ||||||
| 	ln -sf git-annex $(DESTDIR)$(PREFIX)/bin/git-annex-shell |  | ||||||
| 	install -d $(DESTDIR)$(PREFIX)/share/man/man1 | 	install -d $(DESTDIR)$(PREFIX)/share/man/man1 | ||||||
| 	install -m 0644 $(mans) $(DESTDIR)$(PREFIX)/share/man/man1 | 	install -m 0644 $(mans) $(DESTDIR)$(PREFIX)/share/man/man1 | ||||||
|  | 
 | ||||||
|  | install-docs: docs install-mans | ||||||
| 	install -d $(DESTDIR)$(PREFIX)/share/doc/git-annex | 	install -d $(DESTDIR)$(PREFIX)/share/doc/git-annex | ||||||
| 	if [ -d html ]; then \
 | 	if [ -d html ]; then \
 | ||||||
| 		rsync -a --delete html/ $(DESTDIR)$(PREFIX)/share/doc/git-annex/html/; \
 | 		rsync -a --delete html/ $(DESTDIR)$(PREFIX)/share/doc/git-annex/html/; \
 | ||||||
| 	fi | 	fi | ||||||
| 
 | 
 | ||||||
| test: | install: all install-docs | ||||||
|  | 	install -d $(DESTDIR)$(PREFIX)/bin | ||||||
|  | 	install $(bins) $(DESTDIR)$(PREFIX)/bin | ||||||
|  | 	ln -sf git-annex $(DESTDIR)$(PREFIX)/bin/git-annex-shell | ||||||
|  | 
 | ||||||
|  | test: $(sources) $(clibs) | ||||||
| 	@if ! $(GHCMAKE) -O0 test $(clibs); then \
 | 	@if ! $(GHCMAKE) -O0 test $(clibs); then \
 | ||||||
| 		echo "** failed to build the test suite" >&2; \
 | 		echo "** failed to build the test suite" >&2; \
 | ||||||
| 		exit 1; \
 | 		exit 1; \
 | ||||||
|  | @ -96,13 +100,10 @@ clean: | ||||||
| 	rm -rf tmp $(bins) $(mans) test configure  *.tix .hpc $(sources) \
 | 	rm -rf tmp $(bins) $(mans) test configure  *.tix .hpc $(sources) \
 | ||||||
| 		doc/.ikiwiki html dist $(clibs) | 		doc/.ikiwiki html dist $(clibs) | ||||||
| 
 | 
 | ||||||
| # Workaround for cabal sdist not running Setup hooks, so I cannot
 | # Workaround for `cabal sdist` requiring all included files to be listed
 | ||||||
| # generate a file list there.
 | # in .cabal.
 | ||||||
| sdist: clean | sdist: clean $(mans) | ||||||
| 	@if [ ! -e git-annex.cabal.orig ]; then cp git-annex.cabal git-annex.cabal.orig; fi | 	./make-sdist.sh | ||||||
| 	@sed -e "s!\(Extra-Source-Files: \).*!\1$(shell find . -name .git -prune -or -not -name \\*.orig -not -type d -print | perl -ne 'print unless length >= 100')!i" < git-annex.cabal.orig > git-annex.cabal |  | ||||||
| 	@cabal sdist |  | ||||||
| 	@mv git-annex.cabal.orig git-annex.cabal |  | ||||||
| 
 | 
 | ||||||
| # Upload to hackage.
 | # Upload to hackage.
 | ||||||
| hackage: sdist | hackage: sdist | ||||||
|  |  | ||||||
							
								
								
									
										40
									
								
								Setup.hs
									
										
									
									
									
								
							
							
						
						
									
										40
									
								
								Setup.hs
									
										
									
									
									
								
							|  | @ -1,27 +1,49 @@ | ||||||
|  | {-# LANGUAGE NamedFieldPuns #-} | ||||||
|  | 
 | ||||||
| {- cabal setup file -} | {- cabal setup file -} | ||||||
| 
 | 
 | ||||||
| import Distribution.Simple | import Distribution.Simple | ||||||
| import Distribution.Simple.LocalBuildInfo | import Distribution.Simple.LocalBuildInfo | ||||||
| import Distribution.Simple.Setup | import Distribution.Simple.Setup | ||||||
| import System.Cmd | import Distribution.Simple.Utils (installOrdinaryFiles, rawSystemExit) | ||||||
|  | import Distribution.PackageDescription (PackageDescription(..)) | ||||||
|  | import Distribution.Verbosity (Verbosity) | ||||||
| import System.FilePath | import System.FilePath | ||||||
| 
 | 
 | ||||||
| import qualified Build.Configure as Configure | import qualified Build.Configure as Configure | ||||||
| 
 | 
 | ||||||
| main = defaultMainWithHooks simpleUserHooks | main = defaultMainWithHooks simpleUserHooks | ||||||
| 	{ preConf = configure | 	{ preConf = configure | ||||||
| 	, instHook = install | 	, postInst = myPostInst | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| configure _ _ = do | configure _ _ = do | ||||||
| 	Configure.run Configure.tests | 	Configure.run Configure.tests | ||||||
| 	return (Nothing, []) | 	return (Nothing, []) | ||||||
| 
 | 
 | ||||||
| install pkg_descr lbi userhooks flags = do | myPostInst :: Args -> InstallFlags -> PackageDescription -> LocalBuildInfo -> IO () | ||||||
| 	r <- (instHook simpleUserHooks) pkg_descr lbi userhooks flags | myPostInst _ (InstallFlags { installVerbosity }) pkg lbi = do | ||||||
| 	_ <- rawSystem "ln" ["-sf", "git-annex",  | 	installGitAnnexShell dest verbosity pkg lbi | ||||||
| 		bindir installDirs </> "git-annex-shell"] | 	installManpages      dest verbosity pkg lbi | ||||||
| 	return r |  | ||||||
| 	where | 	where | ||||||
| 		installDirs = absoluteInstallDirs pkg_descr lbi $ | 		dest      = NoCopyDest | ||||||
| 			fromFlag (copyDest defaultCopyFlags) | 		verbosity = fromFlag installVerbosity | ||||||
|  | 
 | ||||||
|  | installGitAnnexShell :: CopyDest -> Verbosity -> PackageDescription -> LocalBuildInfo -> IO () | ||||||
|  | installGitAnnexShell copyDest verbosity pkg lbi = | ||||||
|  | 	rawSystemExit verbosity "ln" | ||||||
|  | 		["-sf", "git-annex", dstBinDir </> "git-annex-shell"] | ||||||
|  | 	where | ||||||
|  | 		dstBinDir = bindir $ absoluteInstallDirs pkg lbi copyDest | ||||||
|  | 
 | ||||||
|  | -- See http://www.haskell.org/haskellwiki/Cabal/Developer-FAQ#Installing_manpages. | ||||||
|  | -- | ||||||
|  | -- Based on pandoc's Setup.hs. | ||||||
|  | installManpages :: CopyDest -> Verbosity -> PackageDescription -> LocalBuildInfo -> IO () | ||||||
|  | installManpages copyDest verbosity pkg lbi = | ||||||
|  | 	installOrdinaryFiles verbosity dstManDir srcManpages | ||||||
|  | 	where | ||||||
|  | 		dstManDir   = mandir (absoluteInstallDirs pkg lbi copyDest) </> "man1" | ||||||
|  | 		srcManpages = zip (repeat srcManDir) manpages | ||||||
|  | 		srcManDir   = "" | ||||||
|  | 		manpages    = ["git-annex.1", "git-annex-shell.1"] | ||||||
|  |  | ||||||
							
								
								
									
										4
									
								
								debian/changelog
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								debian/changelog
									
										
									
									
										vendored
									
									
								
							|  | @ -3,8 +3,10 @@ git-annex (3.20120612) UNRELEASED; urgency=low | ||||||
|   * watch: New subcommand, which uses inotify to watch for changes to |   * watch: New subcommand, which uses inotify to watch for changes to | ||||||
|     files and automatically annexes new files, etc, so you don't need |     files and automatically annexes new files, etc, so you don't need | ||||||
|     to manually run git commands when manipulating files. |     to manually run git commands when manipulating files. | ||||||
|  |   * Install man page when run by cabal, in a location where man will | ||||||
|  |     find it, even when installing under $HOME. Thanks, Nathan Collins | ||||||
| 
 | 
 | ||||||
|  -- Joey Hess <joeyh@debian.org>  Tue, 05 Jun 2012 20:25:51 -0400 |  -- Joey Hess <joeyh@debian.org>  Tue, 12 Jun 2012 11:35:59 -0400 | ||||||
| 
 | 
 | ||||||
| git-annex (3.20120611) unstable; urgency=medium | git-annex (3.20120611) unstable; urgency=medium | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
							
								
								
									
										7
									
								
								doc/contributing.mdwn
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								doc/contributing.mdwn
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | ||||||
|  | ## Style | ||||||
|  | 
 | ||||||
|  | This project uses tabs for indentation and the code looks fine with | ||||||
|  | any tab width. If you are using Emacs, and have it configured to use | ||||||
|  | spaces for indentation, then you can add a `./.dir-locals.el` to use | ||||||
|  | tabs for files in this project. See | ||||||
|  | <http://www.emacswiki.org/emacs/DirectoryVariables>. | ||||||
|  | @ -7,7 +7,6 @@ Author: Joey Hess | ||||||
| Stability: Stable | Stability: Stable | ||||||
| Copyright: 2010-2012 Joey Hess | Copyright: 2010-2012 Joey Hess | ||||||
| License-File: GPL | License-File: GPL | ||||||
| Extra-Source-Files: use-make-sdist-instead |  | ||||||
| Homepage: http://git-annex.branchable.com/ | Homepage: http://git-annex.branchable.com/ | ||||||
| Build-type: Custom | Build-type: Custom | ||||||
| Category: Utility | Category: Utility | ||||||
|  | @ -37,6 +36,7 @@ Executable git-annex | ||||||
|    base == 4.5.*, monad-control, transformers-base, lifted-base, |    base == 4.5.*, monad-control, transformers-base, lifted-base, | ||||||
|    IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, |    IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, | ||||||
|    hinotify, STM |    hinotify, STM | ||||||
|  |   -- Need to list this because it's generated from a .hsc file. | ||||||
|   Other-Modules: Utility.Touch |   Other-Modules: Utility.Touch | ||||||
|   C-Sources: Utility/libdiskfree.c |   C-Sources: Utility/libdiskfree.c | ||||||
|   Extensions: CPP |   Extensions: CPP | ||||||
|  | @ -54,6 +54,7 @@ Test-Suite test | ||||||
|    base == 4.5.*, monad-control, transformers-base, lifted-base, |    base == 4.5.*, monad-control, transformers-base, lifted-base, | ||||||
|    IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, |    IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, | ||||||
|    hinotify, STM |    hinotify, STM | ||||||
|  |   Other-Modules: Utility.Touch | ||||||
|   C-Sources: Utility/libdiskfree.c |   C-Sources: Utility/libdiskfree.c | ||||||
|   Extensions: CPP |   Extensions: CPP | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
							
								
								
									
										13
									
								
								make-sdist.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										13
									
								
								make-sdist.sh
									
										
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,13 @@ | ||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | # Create target directory | ||||||
|  | sdist_dir=git-annex-$(grep '^Version:' git-annex.cabal | sed -re 's/Version: *//') | ||||||
|  | mkdir --parents dist/$sdist_dir | ||||||
|  | 
 | ||||||
|  | find . \( -name .git -or -name dist -or -name cabal-dev \) -prune \ | ||||||
|  | 	-or -not -name \\*.orig -not -type d -print \ | ||||||
|  | | perl -ne 'print unless length >= 100' \ | ||||||
|  | | xargs cp --parents --target-directory dist/$sdist_dir | ||||||
|  | 
 | ||||||
|  | cd dist | ||||||
|  | tar -caf $sdist_dir.tar.gz $sdist_dir | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Joey Hess
				Joey Hess