Update packaging for 4.0.4

* Fix main version (Don't use spaces and capitals in versions!)
* Change debian changelog format in hscommon
* Fix build cleanup
* Switch to XZ compression
* Update build instructions
* Build single package for both Debian/Ubuntu
* Update packaging
This commit is contained in:
Eugene San (eugenesan) 2019-08-29 12:01:04 -07:00
parent ad2a07a289
commit 080bb8935c
8 changed files with 20 additions and 13 deletions

View File

@ -58,9 +58,9 @@ dupeGuru is built with "make":
$ make $ make
$ make run $ make run
### Generate Ubuntu packages ### Generate Debian/Ubuntu package
$ bash -c "pyvenv --system-site-packages env && source env/bin/activate && pip install -r requirements.txt && python3 build.py --clean && python3 package.py" $ bash -c "python3 -m venv --system-site-packages env && source env/bin/activate && pip install -r requirements.txt && python3 build.py --clean && python3 package.py"
### Running tests ### Running tests

View File

@ -131,6 +131,9 @@ def build_normal():
def main(): def main():
options = parse_args() options = parse_args()
if options.clean:
if op.exists('build'):
shutil.rmtree('build')
if not op.exists('build'): if not op.exists('build'):
os.mkdir('build') os.mkdir('build')
if options.doc: if options.doc:

View File

@ -1,3 +1,3 @@
__version__ = '4.0.4 RC' __version__ = '4.0.4'
__appname__ = 'dupeGuru' __appname__ = 'dupeGuru'

View File

@ -56,7 +56,7 @@ def package_debian_distribution(distribution):
debskel = op.join('pkg', 'debian') debskel = op.join('pkg', 'debian')
os.makedirs(debdest) os.makedirs(debdest)
debopts = json.load(open(op.join(debskel, 'dupeguru.json'))) debopts = json.load(open(op.join(debskel, 'dupeguru.json')))
for fn in ['compat', 'copyright', 'dirs', 'rules']: for fn in ['compat', 'copyright', 'dirs', 'rules', 'source']:
copy(op.join(debskel, fn), op.join(debdest, fn)) copy(op.join(debskel, fn), op.join(debdest, fn))
filereplace(op.join(debskel, 'control'), op.join(debdest, 'control'), **debopts) filereplace(op.join(debskel, 'control'), op.join(debdest, 'control'), **debopts)
filereplace(op.join(debskel, 'Makefile'), op.join(destpath, 'Makefile'), **debopts) filereplace(op.join(debskel, 'Makefile'), op.join(destpath, 'Makefile'), **debopts)
@ -71,13 +71,13 @@ def package_debian_distribution(distribution):
) )
shutil.copy(op.join('images', 'dgse_logo_128.png'), srcpath) shutil.copy(op.join('images', 'dgse_logo_128.png'), srcpath)
os.chdir(destpath) os.chdir(destpath)
cmd = "dpkg-buildpackage -S" cmd = "dpkg-buildpackage -S -us -uc"
os.system(cmd) os.system(cmd)
os.chdir('../..') os.chdir('../..')
def package_debian(): def package_debian():
print("Packaging for Ubuntu") print("Packaging for Debian/Ubuntu")
for distribution in ['trusty', 'xenial']: for distribution in ['unstable']:
package_debian_distribution(distribution) package_debian_distribution(distribution)
def package_arch(): def package_arch():
@ -94,7 +94,7 @@ def package_arch():
debopts = json.load(open(op.join('pkg', 'arch', 'dupeguru.json'))) debopts = json.load(open(op.join('pkg', 'arch', 'dupeguru.json')))
filereplace(op.join('pkg', 'arch', 'dupeguru.desktop'), op.join(srcpath, 'dupeguru.desktop'), **debopts) filereplace(op.join('pkg', 'arch', 'dupeguru.desktop'), op.join(srcpath, 'dupeguru.desktop'), **debopts)
def package_source_tgz(): def package_source_txz():
print("Creating git archive") print("Creating git archive")
app_version = get_module_version('core') app_version = get_module_version('core')
name = 'dupeguru-src-{}.tar'.format(app_version) name = 'dupeguru-src-{}.tar'.format(app_version)
@ -111,7 +111,7 @@ def package_source_tgz():
print_and_do('git archive -o {} --prefix {}/ HEAD'.format(archive_path, submodule)) print_and_do('git archive -o {} --prefix {}/ HEAD'.format(archive_path, submodule))
os.chdir(base_path) os.chdir(base_path)
print_and_do('tar -A {} -f {}'.format(archive_path, dest)) print_and_do('tar -A {} -f {}'.format(archive_path, dest))
print_and_do('gzip {}'.format(dest)) print_and_do('xz {}'.format(dest))
def package_windows(): def package_windows():
app_version = get_module_version('core') app_version = get_module_version('core')
@ -156,7 +156,7 @@ def main():
args = parse_args() args = parse_args()
if args.src_pkg: if args.src_pkg:
print("Creating source package for dupeGuru") print("Creating source package for dupeGuru")
package_source_tgz() package_source_txz()
return return
print("Packaging dupeGuru with UI qt") print("Packaging dupeGuru with UI qt")
if sys.platform == 'win32': if sys.platform == 'win32':

View File

@ -1 +1 @@
7 9

View File

@ -1,10 +1,12 @@
Source: {pkgname} Source: {pkgname}
Section: devel Section: devel
Priority: extra Priority: extra
Maintainer: Virgil Dupras <hsoft@hardcoded.net> Maintainer: Virgil Dupras <hsoft@hardcoded.net>, Eugene San (eugenesan) <eugenesan@gmail.com>
Build-Depends: debhelper (>= 7), python3-dev, python3-setuptools Build-Depends: debhelper (>= 7), python3-dev, python3-setuptools
Standards-Version: 3.9.2 Standards-Version: 3.9.2
Homepage: http://www.hardcoded.net Homepage: https://dupeguru.voltaicideas.net
Vcs-Browser: https://github.com/arsenetar/dupeguru
Vcs-Git: https://github.com/arsenetar/dupeguru.git
Package: {pkgname} Package: {pkgname}
Architecture: {arch} Architecture: {arch}

1
pkg/debian/source/format Normal file
View File

@ -0,0 +1 @@
3.0 (native)

View File

@ -0,0 +1 @@
compression = "xz"