diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-08-09 10:30:35 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-08-09 10:30:35 -0400 |
commit | 0d7216141da3ecbac842e0673025a4a1d0236ad2 (patch) | |
tree | d2ba82a2bdcb467b9a575b8fef93ea2dc1920df9 | |
parent | 7f5c0ad73ccfe0922c3bee977c4ab885eee3f070 (diff) |
Improve Setup.hs file so that cabal copy --destdir works. Thanks, Magnus_Therning.
-rw-r--r-- | Setup.hs | 14 | ||||
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | doc/bugs/__39__copy_destdir__61____60__path__62____39___fails.mdwn | 10 |
3 files changed, 20 insertions, 6 deletions
@@ -27,13 +27,13 @@ main = defaultMainWithHooks simpleUserHooks } myPostCopy :: Args -> CopyFlags -> PackageDescription -> LocalBuildInfo -> IO () -myPostCopy _ (CopyFlags { copyVerbosity }) pkg lbi = do +myPostCopy _ flags pkg lbi = do installGitAnnexShell dest verbosity pkg lbi installManpages dest verbosity pkg lbi installDesktopFile dest verbosity pkg lbi where - dest = NoCopyDest - verbosity = fromFlag copyVerbosity + dest = fromFlag $ copyDest flags + verbosity = fromFlag $ copyVerbosity flags installGitAnnexShell :: CopyDest -> Verbosity -> PackageDescription -> LocalBuildInfo -> IO () installGitAnnexShell copyDest verbosity pkg lbi = @@ -62,7 +62,9 @@ installManpages copyDest verbosity pkg lbi = srcManDir = "man" installDesktopFile :: CopyDest -> Verbosity -> PackageDescription -> LocalBuildInfo -> IO () -installDesktopFile copyDest _verbosity pkg lbi = - DesktopFile.install $ dstBinDir </> "git-annex" +installDesktopFile copyDest _verbosity pkg lbi + | progfile copyDest == progfile NoCopyDest = + DesktopFile.install (progfile copyDest) + | otherwise = return () where - dstBinDir = bindir $ absoluteInstallDirs pkg lbi copyDest + progfile cd = bindir (absoluteInstallDirs pkg lbi cd) </> "git-annex" diff --git a/debian/changelog b/debian/changelog index b9c3d8cfa..2eec2ccdb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -32,6 +32,8 @@ git-annex (5.20150732) UNRELEASED; urgency=medium readonly mode. * Added support for SHA3 hashed keys (in 8 varieties), when git-annex is built using the cryptonite library. + * Improve Setup.hs file so that cabal copy --destdir works. + Thanks, Magnus_Therning. -- Joey Hess <id@joeyh.name> Fri, 31 Jul 2015 12:31:39 -0400 diff --git a/doc/bugs/__39__copy_destdir__61____60__path__62____39___fails.mdwn b/doc/bugs/__39__copy_destdir__61____60__path__62____39___fails.mdwn index e84e59ad8..93f101772 100644 --- a/doc/bugs/__39__copy_destdir__61____60__path__62____39___fails.mdwn +++ b/doc/bugs/__39__copy_destdir__61____60__path__62____39___fails.mdwn @@ -44,3 +44,13 @@ Index: habs/git-annex/src/git-annex-5.20150731/Setup.hs ~~~ As you see I commented out installation of desktop files completely for the moment. I don't really need them, and they require larger changes to be correct. + +> So, by "fails", you mean it installs to ~/.cabal instead of the speficied +> location. +> +> And, the issue with the desktop file installation is that it's not inside +> ~/.cabal at all. +> +> I've applied your patch, thanks. And dealt with the desktop file by +> making it not install it anywhere, unless it's installing to the regular +> ~/.cabal location. [[done]] --[[Joey]] |