PackageConfig

Struct PackageConfig 

Source
#[non_exhaustive]
pub struct PackageConfig {
Show 35 fields pub cargo_crate_name: String, pub deb_name: String, pub deb_version: String, pub license_identifier: Option<String>, pub license_file_rel_path: Option<PathBuf>, pub license_file_skip_lines: usize, pub copyright: Option<String>, pub changelog: Option<String>, pub homepage: Option<String>, pub documentation: Option<String>, pub repository: Option<String>, pub description: String, pub extended_description: ExtendedDescription, pub maintainer: Option<String>, pub wildcard_depends: String, pub resolved_depends: Option<String>, pub pre_depends: Option<String>, pub recommends: Option<String>, pub suggests: Option<String>, pub enhances: Option<String>, pub section: Option<String>, pub priority: String, pub conflicts: Option<String>, pub breaks: Option<String>, pub replaces: Option<String>, pub provides: Option<String>, pub architecture: String, pub multiarch: Multiarch, pub conf_files: Vec<String>, pub readme_rel_path: Option<PathBuf>, pub triggers_file_rel_path: Option<PathBuf>, pub maintainer_scripts_rel_path: Option<PathBuf>, pub preserve_symlinks: bool, pub default_timestamp: u64, pub is_split_dbgsym_package: bool, /* private fields */
}

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§cargo_crate_name: String

The name of the project to build

§deb_name: String

The name to give the Debian package; usually the same as the Cargo project name

§deb_version: String

The version to give the Debian package; usually the same as the Cargo version

§license_identifier: Option<String>

The software license of the project (SPDX format).

§license_file_rel_path: Option<PathBuf>

The location of the license file

§license_file_skip_lines: usize

number of lines to skip when reading license_file

§copyright: Option<String>

Names of copyright owners (credit in Copyright metadata) Used in Debian’s copyright file, which is required by Debian.

§changelog: Option<String>§homepage: Option<String>

The homepage URL of the project.

§documentation: Option<String>

Documentation URL from Cargo.toml. Fallback if homepage is missing.

§repository: Option<String>

The URL of the software repository. Fallback if both homepage and documentation are missing.

§description: String

A short description of the project.

§extended_description: ExtendedDescription

An extended description of the project.

§maintainer: Option<String>

The maintainer of the Debian package. In Debian control file Maintainer field format.

§wildcard_depends: String

Deps including $auto

§resolved_depends: Option<String>

The Debian dependencies required to run the project.

§pre_depends: Option<String>

The Debian pre-dependencies.

§recommends: Option<String>

The Debian recommended dependencies.

§suggests: Option<String>

The Debian suggested dependencies.

§enhances: Option<String>

The list of packages this package can enhance.

§section: Option<String>

The Debian software category to which the package belongs.

§priority: String

The Debian priority of the project. Typically ‘optional’.

§conflicts: Option<String>

Conflicts Debian control field.

See PackageTransition.

§breaks: Option<String>

Breaks Debian control field.

See PackageTransition.

§replaces: Option<String>

Replaces Debian control field.

See PackageTransition.

§provides: Option<String>

Provides Debian control field.

See PackageTransition.

§architecture: String

The Debian architecture of the target system.

§multiarch: Multiarch

Support Debian’s multiarch, which puts libs in /usr/lib/$tuple/

§conf_files: Vec<String>

A list of configuration files installed by the package. Automatically includes all files in /etc

§readme_rel_path: Option<PathBuf>

Added to usr/share/doc as a fallback

§triggers_file_rel_path: Option<PathBuf>

The location of the triggers file

§maintainer_scripts_rel_path: Option<PathBuf>

The path where possible maintainer scripts live

§preserve_symlinks: bool

Should symlinks be preserved in the assets

§default_timestamp: u64

unix timestamp for generated files

§is_split_dbgsym_package: bool

Save it under a different path

Implementations§

Source§

impl PackageConfig

Source

pub fn set_multiarch(&mut self, enable: Multiarch)

Use /usr/lib/arch-linux-gnu dir for libraries

Source

pub fn resolve_assets(&mut self, listener: &dyn Listener) -> CDResult<()>

Source

pub fn resolved_binary_dependencies( &self, listener: &dyn Listener, ) -> CDResult<String>

run dpkg/ldd to check deps of libs

Source

pub fn sort_assets_by_type(&mut self)

similar files next to each other improve tarball compression

Source

pub fn generate_control(&self, config: &BuildEnvironment) -> CDResult<String>

Generates the control file that obtains all the important information about the package.

Trait Implementations§

Source§

impl Debug for PackageConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.