name = 'tugger'
version = '0.1'
summary = 'Application packaging and distribution tool'
description = summary
maintainer = 'Gregory Szorc <gregory.szorc@gmail.com>'
homepage = 'https://github.com/indygreg/tugger'
vcs_url = 'https://github.com/indygreg/tugger.git'
build_path = CWD + '/build'
tugger_source_files = glob('**/*', exclude=['.git/**/*', 'build/**/*', 'target/**/*'])
tugger_source_manifest = file_manifest_from_files(tugger_source_files)
linux_system_install_layout = file_manifest_from_files(
glob('target/release/tugger'),
relative_to=CWD + '/target/release/',
prefix='usr/bin')
snap_yaml = snap(name, description, summary, version,
base='core18',
parts={name: snap_part(plugin='rust', source=".")},
apps={name: snap_app(command='bin/tugger')})
snap_build_path = '%s/snap' % build_path
snap_name = '%s_%s.amd64.snap' % (name, version)
pipeline(
'snap',
steps=[
snapcraft(
['snap', '-o', snap_name],
snap_yaml,
snap_build_path,
tugger_source_manifest,
),
snapcraft(
['push', '--release', 'edge', snap_name],
snap_yaml,
snap_build_path,
tugger_source_manifest,
purge_build=False,
),
snapcraft(
['sign-build', snap_name],
snap_yaml,
snap_build_path,
tugger_source_manifest,
purge_build=False,
),
],
)
pipeline(
'deb',
steps=[
debian_deb_archive(
debian_control_binary_package(
package=name,
version=version,
architecture='amd64',
maintainer=maintainer,
description=description,
homepage=homepage,
section='utils',
priority='optional',
depends=[
'libc6 (>= 2.18)',
'libgcc1 (>= 1:4.2)',
'libssl1.1 (>= 1.1)',
'zlib1g (>= 1.2)',
],
),
linux_system_install_layout),
]
)