Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

emvendor(1) [debian man page]

EMVENDOR(1)						User Contributed Perl Documentation					       EMVENDOR(1)

Name
       emvendor - retrieve vendor-specific package configuration strings

Synopsis
	emvendor -V|--vendor VENDOR -p|--package PACKAGE -k|--key KEY
	emvendor -?|-h|--help|--version

Commands
	-v|--vendor VENDOR:    the vendor name from dpkg-vendor
	-p|--package PACKAGE:  the package name (usually source)
	-k|--key KEY:	       arbitrary string for the key of the data

       All commands must be specified every time.

       On success, the string is printed and emvendor exits with zero.

       In the case of error, emvendor dies with an empty string on STDERR and exits with a non-zero return value.

Description
       emvendor provides a way for debian/rules to call in a string for a particular package that fits into the rules for that package and
       conforms to the requirements of the vendor.

       http://wiki.debian.org/EmdebianAuditDetail#Vendor

       It is fairly obvious that specifying each vendor in the debian/rules file of each package is not going to be particularly flexible.

	DEB_VENDOR=$(shell dpkg-vendor --query vendor)
	ifeq (Debian,$(DEB_VENDOR))
	 # Debian build
	 EXCONFARGS=--disable-mono --disable-monodoc
	else
	 # any-vendor build
	 EXCONFARGS=$(shell emvendor --vendor $(DEB_VENDOR) --package avahi --key EXCONFARGS)
	endif

       or use the short options:

	EXCONFARGS=$(shell foo-bar -V $(DEB_VENDOR) -p avahi -k EXCONFARGS)

       The values themselves are in a vendor-specific conf file in /etc/emvendor.d/

	$ cat /etc/foo-bar.d/emdebian-crush
	[avahi]
	EXCONFARGS=--disable-mono --disable-monodoc --disable-python
	--disable-doxygen-doc --disable-pygtk --disable-python-dbus
	--disable-core-docs --disable-qt3 --disable-qt4 --disable-gobject
	--with-distro debian

	[busybox]
	foo=

       (Note that the value has to be all on one line which is a little awkward - also note that values are not able to include the equals sign
       which could be more of an issue.)

       Packages that need two strings can do so - the key string is entirely arbitrary as long as it fits in the style of a typical ini file.

       Therefore, the key can be matched to the needs of the relevant package.

       "emdebian-buildsupport" provides /etc/emvendor.d/emdebian-crush with all the content for all packages that need such details.

emvendor and dpkg-vendor
       dpkg-vendor supports vendor functionality but emvendor adds an extra hierarchy, organised by Debian source package name. It would be
       possible to include the relevant strings in /etc/dpkg/origins/vendor but each identifier string would need to be unique across all packages
       for each vendor, which is an unrealistic limitation.

perl v5.14.2							    2012-09-26							       EMVENDOR(1)

Check Out this Related Man Page

dpkg-buildflags(1)						    dpkg suite							dpkg-buildflags(1)

NAME
dpkg-buildflags - returns build flags to use during package build SYNOPSIS
dpkg-buildflags [option...] command DESCRIPTION
dpkg-buildflags is a tool to retrieve compilation flags to use during build of Debian packages. The default flags are defined by the ven- dor but they can be extended/overriden in several ways: 1. system-wide with /etc/dpkg/buildflags.conf; 2. for the current user with $XDG_CONFIG_HOME/dpkg/buildflags.conf where $XDG_CONFIG_HOME defaults to $HOME/.config; 3. temporarily with environment variables (see section ENVIRONMENT). The configuration files can contain two types of directives: SET flag value Override the flag named flag to have the value value. APPEND flag value Extend the flag named flag with the options given in value. A space is prepended to the appended value if the flag's current value is non-empty. The configuration files can contain comments on lines starting with a hash (#). Empty lines are also ignored. COMMANDS
--list Print the list of flags supported by the current vendor (one per line). See the SUPPORTED FLAGS section for more information about them. --export=format Print to standard output shell (if format is sh) or make (if format is make) commands that can be used to export all the compilation flags in the environment. If the format value is not given, sh is assumed. Only compilation flags starting with an upper case char- acter are included, others are assumed to not be suitable for the environment. --get flag Print the value of the flag on standard output. Exits with 0 if the flag is known otherwise exits with 1. --origin flag Print the origin of the value that is returned by --get. Exits with 0 if the flag is known otherwise exits with 1. The origin can be one of the following values: vendor the original flag set by the vendor is returned; system the flag is set/modified by a system-wide configuration; user the flag is set/modified by a user-specific configuration; env the flag is set/modified by an environment-specific configuration. --help Show the usage message and exit. --version Show the version and exit. SUPPORTED FLAGS
CFLAGS Options for the C compiler. The default value set by the vendor includes -g and the default optimization level (-O2 usually, or -O0 if the DEB_BUILD_OPTIONS environment variable defines noopt). CPPFLAGS Options for the C preprocessor. Default value: empty. CXXFLAGS Options for the C++ compiler. Same as CFLAGS. FFLAGS Options for the Fortran compiler. Same as CFLAGS. LDFLAGS Options passed to the compiler when linking executables or shared objects (if the linker is called directly, then -Wl and , have to be stripped from these options). Default value: empty. FILES
/etc/dpkg/buildflags.conf System wide configuration file. $XDG_CONFIG_HOME/dpkg/buildflags.conf or $HOME/.config/dpkg/buildflags.conf User configuration file. ENVIRONMENT
DEB_flag_SET This variable can be used to force the value returned for the given flag. DEB_flag_APPEND This variable can be used to append supplementary options to the value returned for the given flag. DEB_BUILD_OPTIONS When used with the hardening-wrapper package, the values hardening and nohardening will be converted into their respective DEB_BUILD_HARDENING values. The hardening option can also include (optionally prefixed with no ) the following sub-options: stack- protector format fortify pie relro For example, DEB_BUILD_OPTIONS=hardening=nopie would cause DEB_BUILD_HARDENING_PIE=0 to be set, or DEB_BUILD_OPTIONS=nohardening would cause DEB_BUILD_HARDENING=0 to be set. See http://wiki.debian.org/Hardening for further details. AUTHOR
Copyright (C) 2010 Raphael Hertzog This is free software; see the GNU General Public Licence version 2 or later for copying conditions. There is NO WARRANTY. Debian Project 2010-07-29 dpkg-buildflags(1)
Man Page