2013-05-14 19:59:14 -05:00
|
|
|
{- Bundled programs
|
|
|
|
-
|
2015-01-21 12:50:09 -04:00
|
|
|
- Copyright 2013 Joey Hess <id@joeyh.name>
|
2013-05-14 19:59:14 -05:00
|
|
|
-
|
2019-03-13 15:48:14 -04:00
|
|
|
- Licensed under the GNU AGPL version 3 or higher.
|
2013-05-14 19:59:14 -05:00
|
|
|
-}
|
|
|
|
|
|
|
|
{-# LANGUAGE CPP #-}
|
|
|
|
|
|
|
|
module Build.BundledPrograms where
|
|
|
|
|
|
|
|
import Data.Maybe
|
|
|
|
|
2017-12-14 12:46:57 -04:00
|
|
|
import BuildInfo
|
2013-05-14 19:59:14 -05:00
|
|
|
|
|
|
|
{- Programs that git-annex uses, to include in the bundle.
|
|
|
|
-
|
|
|
|
- These may be just the command name, or the full path to it. -}
|
|
|
|
bundledPrograms :: [FilePath]
|
2016-02-19 16:19:19 -04:00
|
|
|
bundledPrograms = preferredBundledPrograms ++ extraBundledPrograms
|
|
|
|
|
|
|
|
{- Programs that are only included in the bundle in case the system
|
|
|
|
- doesn't have them. These come after the system PATH.
|
|
|
|
-}
|
|
|
|
extraBundledPrograms :: [FilePath]
|
|
|
|
extraBundledPrograms = catMaybes
|
2019-03-18 16:38:22 -04:00
|
|
|
[ Nothing
|
2017-03-02 17:40:40 -04:00
|
|
|
#ifndef darwin_HOST_OS
|
|
|
|
#ifndef mingw32_HOST_OS
|
|
|
|
-- OS X has ssh installed by default.
|
|
|
|
-- On Windows, git provides ssh.
|
|
|
|
-- Linux probably has ssh installed system wide,
|
|
|
|
-- and if so the user probably wants to use that one.
|
|
|
|
, Just "ssh"
|
|
|
|
, Just "ssh-keygen"
|
|
|
|
#endif
|
2016-02-23 12:30:11 -04:00
|
|
|
#endif
|
2016-02-23 12:48:18 -04:00
|
|
|
]
|
2016-02-19 16:19:19 -04:00
|
|
|
|
|
|
|
{- Programs that should be preferred for use from the bundle, over
|
|
|
|
- any that might be installed on the system otherwise. These come before
|
|
|
|
- the system PATH.
|
|
|
|
-
|
|
|
|
- For example, git-annex is built for a specific version of git.
|
|
|
|
-}
|
|
|
|
preferredBundledPrograms :: [FilePath]
|
|
|
|
preferredBundledPrograms = catMaybes
|
2013-05-14 19:59:14 -05:00
|
|
|
[ Nothing
|
|
|
|
#ifndef mingw32_HOST_OS
|
2015-09-10 18:43:31 -04:00
|
|
|
-- git is not included in the windows bundle; git for windows is used
|
2013-05-14 19:59:14 -05:00
|
|
|
, Just "git"
|
2013-12-24 16:28:10 -04:00
|
|
|
-- Not strictly needed in PATH by git-annex, but called
|
|
|
|
-- by git when it sshes to a remote.
|
|
|
|
, Just "git-upload-pack"
|
|
|
|
, Just "git-receive-pack"
|
2013-12-27 16:35:24 -04:00
|
|
|
, Just "git-shell"
|
2013-10-17 15:56:56 -04:00
|
|
|
-- using xargs on windows led to problems, so it's not used there
|
2013-05-14 19:59:14 -05:00
|
|
|
, Just "xargs"
|
2019-07-22 09:37:42 -04:00
|
|
|
-- rsync is not a core dependency, but good to have.
|
|
|
|
-- On windows, bundling rsync required the build be used with a
|
|
|
|
-- particular version of git for windows, so not included there.
|
2013-05-14 19:59:14 -05:00
|
|
|
, Just "rsync"
|
|
|
|
, Just "sh"
|
2018-06-16 10:02:05 -04:00
|
|
|
-- used by git-annex when available
|
|
|
|
, Just "uname"
|
2023-08-15 14:21:53 -04:00
|
|
|
-- Included in git for Windows
|
|
|
|
, Just "cp"
|
2014-04-10 12:54:58 -04:00
|
|
|
#endif
|
2017-12-14 12:46:57 -04:00
|
|
|
, BuildInfo.lsof
|
|
|
|
, BuildInfo.gcrypt
|
2013-11-24 00:26:20 -04:00
|
|
|
#ifdef linux_HOST_OS
|
|
|
|
-- used to unpack the tarball when upgrading
|
|
|
|
, Just "gunzip"
|
|
|
|
, Just "tar"
|
2016-10-04 16:37:43 -04:00
|
|
|
-- used by runshell to generate locales
|
|
|
|
, Just "localedef"
|
2013-11-24 00:26:20 -04:00
|
|
|
#endif
|
2013-12-01 14:53:15 -04:00
|
|
|
-- nice, ionice, and nocache are not included in the bundle;
|
|
|
|
-- we rely on the system's own version, which may better match
|
|
|
|
-- its kernel, and avoid using them if not available.
|
2013-05-14 19:59:14 -05:00
|
|
|
]
|
2020-10-26 13:24:37 -04:00
|
|
|
|
|
|
|
magicDLLs :: [FilePath]
|
|
|
|
#ifdef mingw32_HOST_OS
|
|
|
|
magicDLLs = ["libmagic-1.dll", "libgnurx-0.dll"]
|
|
|
|
#else
|
|
|
|
magicDLLs = []
|
|
|
|
#endif
|
|
|
|
|
|
|
|
magicShare :: [FilePath]
|
|
|
|
#ifdef mingw32_HOST_OS
|
|
|
|
magicShare = ["magic.mgc"]
|
|
|
|
#else
|
|
|
|
magicShare = []
|
|
|
|
#endif
|