diff options
author | Joey Hess <joey@kitenet.net> | 2012-08-01 21:04:25 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-08-01 21:05:27 -0400 |
commit | e78b13c42807f598d9dd7e449a5980c26f731f72 (patch) | |
tree | b832bea706a7ffaa1f98214797c17dcce1f0825e /Setup.hs | |
parent | ed07546288733a13129a866ce70ea2f94d6259cb (diff) |
hook desktop menu file installation into makefile and cabal
Diffstat (limited to 'Setup.hs')
-rw-r--r-- | Setup.hs | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -10,6 +10,7 @@ import Distribution.PackageDescription (PackageDescription(..)) import Distribution.Verbosity (Verbosity) import System.FilePath +import qualified Build.InstallDesktopFile as InstallDesktopFile import qualified Build.Configure as Configure main = defaultMainWithHooks simpleUserHooks @@ -25,6 +26,7 @@ myPostInst :: Args -> InstallFlags -> PackageDescription -> LocalBuildInfo -> IO myPostInst _ (InstallFlags { installVerbosity }) pkg lbi = do installGitAnnexShell dest verbosity pkg lbi installManpages dest verbosity pkg lbi + installDesktopFile dest verbosity pkg lbi where dest = NoCopyDest verbosity = fromFlag installVerbosity @@ -47,3 +49,9 @@ installManpages copyDest verbosity pkg lbi = srcManpages = zip (repeat srcManDir) manpages srcManDir = "" manpages = ["git-annex.1", "git-annex-shell.1"] + +installDesktopFile :: CopyDest -> Verbosity -> PackageDescription -> LocalBuildInfo -> IO () +installDesktopFile copyDest verbosity pkg lbi = + InstallDesktopFile.writeDesktop $ InstallDesktopFile.desktop $ dstBinDir </> "git-annex" + where + dstBinDir = bindir $ absoluteInstallDirs pkg lbi copyDest |