Improve Setup.hs file so that cabal copy --destdir works. Thanks, Magnus_Therning.
This commit is contained in:
parent
b0bc141a97
commit
8167f6fb40
3 changed files with 20 additions and 6 deletions
14
Setup.hs
14
Setup.hs
|
@ -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"
|
||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -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
|
||||
|
||||
|
|
|
@ -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]]
|
||||
|
|
Loading…
Add table
Reference in a new issue