github.com/metux/go-metabuild@v0.0.0-20240118143255-d9ed5ab697f9/spec/target/keys.go (about)

     1  package target
     2  
     3  import (
     4  	"github.com/metux/go-magicdict/api"
     5  )
     6  
     7  type Key = api.Key
     8  
     9  const (
    10  	// internal keys -- automatically created after loading
    11  	KeyInternId       = Key("@id")
    12  	KeyInternIdSuffix = Key("@id/suffix")
    13  	KeyInternType     = Key("@type")
    14  	KeyInternBasename = Key("@basename")
    15  	KeyInternDirname  = Key("@dirname")
    16  
    17  	KeyType = Key("type")
    18  
    19  	// build host vs target host
    20  	KeyBuild = Key("build")
    21  
    22  	KeyOptional = Key("optional")
    23  	KeySkip     = Key("skip")
    24  
    25  	KeyCompilerLang = Key("compiler/lang")
    26  
    27  	// all targets: installation
    28  	KeyInstall        = Key("install")
    29  	KeyInstallDir     = Key("install/dir")
    30  	KeyInstallSubdir  = Key("install/subdir")
    31  	KeyInstallPackage = Key("install/package")
    32  	KeyInstallPerm    = Key("install/perm")
    33  
    34  	KeySource       = Key("source")
    35  	KeySourceDir    = Key("source/dir")
    36  	KeySourceSuffix = Key("source/suffix")
    37  
    38  	KeyName       = Key("name")
    39  	KeyFile       = Key("file")
    40  	KeyJobDepends = Key("job/depends")
    41  
    42  	KeyIncludeDir = Key("include/dir")
    43  	KeyLibDirs    = Key("lib-dirs")
    44  
    45  	KeyLinkStatic = Key("link/static")
    46  	KeyLinkShared = Key("link/shared")
    47  	KeyLinkBoth   = Key("link/both")
    48  )
    49  
    50  // libraries (main)
    51  const (
    52  	// pkgconf ID for internal libs
    53  	KeyLibraryPkgId   = Key("library/pkgid")
    54  	KeyLibraryMapFile = Key("library/mapfile")
    55  	KeyHeaders        = Key("headers")
    56  	KeyLibraryName    = Key("library/name")
    57  	KeyStaticLib      = Key("static::file")
    58  	KeyLibraryDir     = Key("library/dir")
    59  
    60  	// static / archives
    61  	KeyLibraryLinkWhole = Key("library/link-whole")
    62  
    63  	// library devlink
    64  	KeyLinkTarget = Key("target")
    65  )
    66  
    67  // internal builder configuration
    68  const (
    69  	KeyBuilderCommand = Key("builder/command")
    70  	KeyBuilderDriver  = Key("builder/driver")
    71  )
    72  
    73  // locales
    74  const (
    75  	KeyI18nLinguas  = Key("i18n/linguas")
    76  	KeyI18nCategory = Key("i18n/category")
    77  	KeyI18nDomain   = Key("i18n/domain")
    78  	KeyI18nPoDir    = Key("i18n/po/dir")
    79  	KeyI18nType     = Key("i18n/type")
    80  )
    81  
    82  // generators
    83  const (
    84  	KeyResourceDir  = Key("resource/dir")
    85  	KeyResourceName = Key("resource/name")
    86  
    87  	KeyOutputCHeader   = Key("output/c/header")
    88  	KeyOutputCSource   = Key("output/c/source")
    89  	KeyOutputGResource = Key("output/gresource")
    90  	KeyOutputSuffix    = Key("output/suffix")
    91  	KeyOutputFormat    = Key("output/format")
    92  )
    93  
    94  // C specific settings
    95  const (
    96  	KeyCDefines = Key("c/defines")
    97  	KeyCCflags  = Key("c/cflags")
    98  	KeyCLdflags = Key("c/ldflags")
    99  )
   100  
   101  // desktop file settings
   102  const (
   103  	KeyDesktopType        = Key("desktop/type")
   104  	KeyDesktopName        = Key("desktop/name")
   105  	KeyDesktopGenericName = Key("desktop/genericname")
   106  	KeyDesktopComment     = Key("desktop/comment")
   107  	KeyDesktopIconFile    = Key("desktop/icon-file")
   108  	KeyDesktopExec        = Key("desktop/exec")
   109  	KeyDesktopTryExec     = Key("desktop/tryexec")
   110  	KeyDesktopTerminal    = Key("desktop/terminal")
   111  	KeyDesktopCategories  = Key("desktop/categories")
   112  )
   113  
   114  // manpages
   115  const (
   116  	KeyManpageSection  = Key("man/section")
   117  	KeyManpageAlias    = Key("man/alias")
   118  	KeyManpageCompress = Key("man/compress")
   119  )
   120  
   121  // command execution
   122  const (
   123  	KeyExecCommand = Key("exec/command")
   124  	KeyExecWorkDir = Key("exec/workdir")
   125  	KeyExecLog     = Key("exec/log")
   126  )