Personal tools
     DOCUMENTATION

Conary:Directory Path Macros

From rPath Wiki

Jump to: navigation, search
Conary --> Packaging --> Recipe --> Macros --> Directory Path Macros

The directory path macros are listed here along with the values they expand to, and any notes related to the purpose and usage of the macro. Information on Conary's special component prefix macros is available as well.

Macro Expands To Notes
%(builddir)sSee NotesSpecify the directory defined for Conary's source build and compiling operations. This directory can be defined using the buildPath directive in the Conary configuration file. The source code for a package is unpacked within this directory, and so the software is built in a subdirectory of this directory (referred to as maindir). Use %(builddir)s as a parameter to r.Environment setting the environment variable MUMBLE to a subdirectory under the %(builddir)s:
r.Environment('MUMBLE', '%(builddir)s/mumble'
%(destdir)sSee NotesSpecifies the target installation directory for the package (do not set this macro; Conary sets it to the correct value for you). Use %(destdir)s in combination with %(prefix)s as a parameter to r.MakeInstall specifying %(destdir)s/usr as the make PREFIX:
r.MakeInstall('PREFIX=%(destdir)s/%(prefix)s')
%(prefix)s/usrSpecify the system resources directory location; this directory contains subdirectories of executables, libraries, documentation, and other files which do not change during normal operation.. Use %(prefix)s as a parameter to r.Make specifying /usr as the make PREFIX: r.Make("PREFIX=%(prefix)s")
%(sysconfdir)s/etcSpecify the system configuration directory location; this directory contains subdirectories and system-wide configuration files. Use %(sysconfdir)s as a parameter to r.Create to create the file /etc/foo: r.Create('%(sysconfdir)s/foo')
%(initdir)s%(sysconfdir)s/init.dSpecify initscripts directory location; this directory contains initscripts used by SysVinit. Use %(initdir)s as a parameter to r.TagSpec to manually apply the initscript tag handler to files:
r.TagSpec('initscript', '%(initdir)s/')
%(exec_prefix)s%(prefix)sSpecify the installation prefix for architecture-dependent files; this directory contains subdirectories which, in turn, contain architecture-dependent executables, libraries, and such. Use %(exec_prefix)s as a parameter to r.ManualConfigure specifying the prefix to configure: r.ManualConfigure('--prefix=%(prefix)s'
' --exec-prefix=%(exec_prefix)s')
%(bindir)s%(exec_prefix)s/binSpecify the user binaries directory location; this directory contains binaries specifically for users. Use %(bindir)s as a parameter to r.Install specifying location to install a user binary into:
r.Install('foo','%(bindir)s/')
%(essentialbindir)s/binSpecify the essential system binaries directory location; this directory contains binaries used by the system for critical functions, such as booting and mounting partitions. Use %(essentialbindir)s as a parameter to r.Symlink specifying a binary file to create a symbolic link to:
r.Symlink('bash', '%(essentialbindir)s/sh')
%(sbindir)s%(exec_prefix)s/sbinSpecify system administration binaries directory location; this directory contains binaries which are executed by the root user for system administration purposes. Use %(sbindir)s as a parameter to r.Install specifying the location to install a binary into:
r.Install('inputattach', '%(sbindir)s/')
%(essentialsbindir)s/sbinSpecify essential system administration binaries directory location; this directory contains binaries which are executed by the root user for system administration purposes. Use %(essentialsbindir)s as a parameter to r.Move specifying the target to move a file to:
r.Move('/dev/MAKEDEV', '%(essentialsbindir)s/')
%(libdir)s%(exec_prefix)s/%(lib)sSpecify data files directory location; this directory contains subdirectories, data files, and shared libraries. Use %(libdir)s as a parameter to r.Remove specifying target files for removal:
r.Remove('%(libdir)s/libss.a')
%(essentiallibdir)s/%(lib)sSpecify essential data files directory location; this directory contains subdirectories, data files, and shared libraries. Use %(essentiallibdir)s as a parameter to r.MakeDirs specifying a subdirectory to make:
r.MakeDirs('%(essentiallibdir)s/firmware')
%(libexecdir)s%(exec_prefix)s/libexecSpecify helper binaries directory location; this directory contains small helper binaries called by other applications. Use %(libexecdir)s as a parameter to r.Se Modes specifying files which should have modes set:
r.SetModes('%(libexecdir)s/pt_chown', 0755)
%(localstatedir)s/varSpecify dynamic files directory location; this directory contains subdirectories of dynamic files, temporary files, and logs. Use %(localstatedir)s as a parameter to r.Make specifying a subdirectory to make:
r.Make Dirs('%(localstatedir)s/run/radvd/')
%(servicedir)s/srvSpecify the service data directory location; this directory contains subdirectories which, in turn, contain data related to services offered by the system. Use %(servicedir)s as a parameter to r.SetModes, specifying target of file mode changes:
r.SetModes('%(servicedir)s/named', 0750)
%(cachedir)s%(localstatedir)s/cacheSpecify the application cache data directory location; this directory contains cached data from applications. Use %(cachedir)s as a parameter to r.Mak Dirs specifying a subdirectory to make:
r.MakeDirs('%(cachedir)s/{local,X11R6}')
%(sharedstatedir)s%(prefix)s/comSpecify the architecture-independent data files directory location; this directory contains architecture-independent data files which programs modify while they run. Use %(sharedstatedir)s as a parameter to r.Make specifying the directory location:
r.Make('--sharedstatedir=%(sharedstatedir)s')
%(includedir)s%(prefix)s/includeSpecify the header file directory location; this directory contains subdirectories and header files. Use %(includedir)s as a parameter to r.Symlink specifying the symbolic link target:
r.Symlink('%(x11includedir)s/X11',
'%(includedir)s/X11')
%(datadir)s%(prefix)s/shareSpecify architecture-independent data directory location; this directory contains subdirectories and data shareable among all architectures. Use %(datadir)s as a parameter to r.ComponentSpec specifying which component a subdirectory is in:
r.ComponentSpec('apidox', '%(datadir)s/%(qt)s/doc/')
%(mandir)s%(datadir)s/manSpecify the online manuals directory location; this directory contains subdirectories which, in turn, contain system manual pages. Use %(mandir)s as a parameter to r.Install specifying the target directory for a manual page installation:
r.Install('anacron.8', '%(mandir)s/man8/')
%(infodir)s%(datadir)s/infoSpecify the GNU info system's primary directory location; this directory contains subdirectories and compressed GNU info pages. Use %(infodir)s as a parameter to r.InitialContents specifying an initial content subdirectory:
r.InitialContents('%(infodir)s/dir')
%(docdir)s%(datadir)s/docSpecify the miscellaneous documentation directory location; this directory contains subdirectories and documentation in various formats. Use %(docdir)s as a parameter to r.ComponentSpec specifying which component a subdirectory is in: r.ComponentSpec('doc', '%(docdir)s/.*')
%(thisdocdir)s%(docdir)s/%(name)s-%(version)sSpecify package-specific documentation directory; this directory contains subdirectories and documentation related to the package. Use %(thisdocdir)s as a parameter to r.Move specifying target for moving documentation files to:
r.Move('%(docdir)s/html/*', '%(thisdocdir)s/html/')
%(tagdescriptiondir)s%(sysconfdir)s/conary/tagsSpecify the Conary tags description file directory; this directory contains Conary tag description files. This macro should not be modified in recipes. Use %(tagdescriptiondir)s as a parameter to r.addSource specifying a file to be copied:
r.addSource('info-file.tagdescription',
macros=True,
dest='%(tagdescriptiondir)s/info-file'))
%(taghandlerdir)s%(libexecdir)s/conary/tagsSpecify the tag handler executable directory location; this directory contains tag handler scripts and executables. This macro should not be modified in recipes. Use %(taghandlerdir)s as a parameter to r.Requires specifying file requirements:
r.Requires('grep:runtime', '%(taghandlerdir)s/')
%(tagdatadir)s%(datadir)s/conary/tagsSpecify Conary tag handler data directory location; this directory contains subdirectories which, in turn, contain data files required by tag handlers. This macro should not be modified in recipes. Use %(tagdatadir)s as a parameter to r.addSource specifying file to copy:
r.addSource(catalog,
dest='%(tagdatadir)s/xml-catalog/desc.d/')
%(testdir)s%(localstatedir)s/conary/testsThis macro is not specified directly; rather, it is specified internally by the r.TestSuide command.
%(thistestdir)s%(testdir)s/%(name)s-%(version)sSpecify package-specific test suite directory location; Use %(thistestdir)s as a parameter to r.Replace to specify replacement argument:
r.Replace(('^#!foo', '#!%(thistestdir)s/foo')
%(debuglibdir)s/usr/lib/debugUsed for assembling :debuginfo packages; paths should not normally be changed. This macro specifies distribution-centirc settings rather than package centric settings, thus, settings should not be changed for individual packages. This macro is generally not specified explicitly.
%(debugsrcdir)s/usr/src/debugUsed for assembling :debuginfo packages; paths should not normally be changed. This macro specifies distribution-centirc settings rather than package centric settings, thus, settings should not be changed for individual packages. This macro is generally not specified explicitly.
%(userinfodir)s'%(sysconfdir)s/conary/userinfoSpecify Conary user info file directory; this directory contains files which provide user information to user info recipes. Use %(userinfodir)s as a parameter to r.Install specifying location to install a userinfo file into:
r.Install('jrandom', '%(userinfodir)s/')
%(groupinfodir)s%(sysconfdir)s/conary/groupinfoSpecify Conary group info file directory; this directory contains files which provide group information to group info recipes. Use %(groupinfodir)s as a parameter to r.Install specifying location to install a groupinfo file into:
r.Install('stgroup', '%(groupinfodir)s/')
%(buildlogpath)s%(debugsrcdir)s/buildlogs/
%(name)s-%(version)s-log.bz2
This macro is not specified directly; the trove build log directory location this macro represents is specified internally by Conary

Special Component Prefix Macros

The following macros are special component prefixes shared by the whole system:

Macro Expands To Notes
%(krbprefix)s%(exec_prefix)s/kerberosSpecify the kerberos installation directory; Use %(krbprefix)s as a parameter to r.Remove specifying files to remove:
r.Remove('%(krbprefix)s/man/cat*', recursive=True)
%(x11prefix)s%(exec_prefix)s/X11R6Specify the X11 installation directory; Use %(x11prefix)s as a parameter to r.MakeDirs specifying a subdirectory to make:
r.MakeDirs('%(x11prefix)s/lib/X11/app-defaults')