From d660cef2458c680490b52ba5b187cf700f29dbbb Mon Sep 17 00:00:00 2001 From: Eugene San Date: Tue, 28 Jun 2016 22:39:23 -0400 Subject: [PATCH] Update packaging to conform with package unification and few fixes (#372) * Rename package (dupeguru-se -> dupeguru) * Update package name in .desktop files and scripts * Add Ubuntu package building instructions * Fix build_pe_modules.py * Add description to package * Add conflicts dependencies to replace previous versions * Update python version * Unify .json configs * Few cosmetics changes (mainly missing end-lines and images permissions) --- README.md | 7 ++++++- images/dgpe_logo_32.png | Bin images/dgse_logo_32.png | Bin images/folder32.png | Bin package.py | 4 ++-- pkg/arch/dupeguru.json | 7 +++++++ pkg/arch/me.json | 7 ------- pkg/arch/pe.json | 7 ------- pkg/arch/se.json | 7 ------- pkg/debian/Makefile | 4 ++-- pkg/debian/build_pe_modules.py | 4 ++-- pkg/debian/control | 12 ++++++++++-- pkg/debian/dupeguru.json | 7 +++++++ pkg/debian/me.json | 7 ------- pkg/debian/pe.json | 7 ------- pkg/debian/se.json | 7 ------- 16 files changed, 36 insertions(+), 51 deletions(-) mode change 100755 => 100644 images/dgpe_logo_32.png mode change 100755 => 100644 images/dgse_logo_32.png mode change 100755 => 100644 images/folder32.png create mode 100644 pkg/arch/dupeguru.json delete mode 100644 pkg/arch/me.json delete mode 100644 pkg/arch/pe.json delete mode 100644 pkg/arch/se.json create mode 100644 pkg/debian/dupeguru.json delete mode 100644 pkg/debian/me.json delete mode 100644 pkg/debian/pe.json delete mode 100644 pkg/debian/se.json diff --git a/README.md b/README.md index 10d23241..abbca244 100644 --- a/README.md +++ b/README.md @@ -122,9 +122,14 @@ With your virtualenv activated, you can build and run dupeGuru with these comman $ python run.py You can also package dupeGuru into an installable package with: - + $ python package.py + +### Generate Ubuntu packages + + $ bash -c "pyvenv --system-site-packages env && source env/bin/activate && pip install -r requirements.txt && python3 build.py --clean && python3 package.py" + ### Running tests The complete test suite is ran with [Tox 1.7+][tox]. If you have it installed system-wide, you diff --git a/images/dgpe_logo_32.png b/images/dgpe_logo_32.png old mode 100755 new mode 100644 diff --git a/images/dgse_logo_32.png b/images/dgse_logo_32.png old mode 100755 new mode 100644 diff --git a/images/folder32.png b/images/folder32.png old mode 100755 new mode 100644 diff --git a/package.py b/package.py index a7e01e73..94712ce9 100644 --- a/package.py +++ b/package.py @@ -59,7 +59,7 @@ def package_debian_distribution(distribution): debdest = op.join(destpath, 'debian') debskel = op.join('pkg', 'debian') os.makedirs(debdest) - debopts = json.load(open(op.join(debskel, 'se.json'))) + debopts = json.load(open(op.join(debskel, 'dupeguru.json'))) for fn in ['compat', 'copyright', 'dirs', 'rules']: copy(op.join(debskel, fn), op.join(debdest, fn)) filereplace(op.join(debskel, 'control'), op.join(debdest, 'control'), **debopts) @@ -95,7 +95,7 @@ def package_arch(): ] copy_files_to_package(srcpath, packages, with_so=True) shutil.copy(op.join('images', 'dgse_logo_128.png'), srcpath) - debopts = json.load(open(op.join('pkg', 'arch', 'se.json'))) + debopts = json.load(open(op.join('pkg', 'arch', 'dupeguru.json'))) filereplace(op.join('pkg', 'arch', 'dupeguru.desktop'), op.join(srcpath, 'dupeguru.desktop'), **debopts) def package_source_tgz(): diff --git a/pkg/arch/dupeguru.json b/pkg/arch/dupeguru.json new file mode 100644 index 00000000..0f83f7bd --- /dev/null +++ b/pkg/arch/dupeguru.json @@ -0,0 +1,7 @@ +{ + "pkgname": "dupeguru", + "longname": "dupeGuru", + "execname": "dupeguru", + "arch": "any", + "iconpath": "/usr/share/dupeguru/dgse_logo_128.png" +} diff --git a/pkg/arch/me.json b/pkg/arch/me.json deleted file mode 100644 index c0c79a65..00000000 --- a/pkg/arch/me.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "pkgname": "dupeguru-me", - "longname": "dupeGuru Music Edition", - "execname": "dupeguru-me", - "arch": "all", - "iconpath": "/usr/share/dupeguru-me/dgme_logo_128.png" -} \ No newline at end of file diff --git a/pkg/arch/pe.json b/pkg/arch/pe.json deleted file mode 100644 index dfef16a1..00000000 --- a/pkg/arch/pe.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "pkgname": "dupeguru-pe", - "longname": "dupeGuru Picture Edition", - "execname": "dupeguru-pe", - "arch": "any", - "iconpath": "/usr/share/dupeguru-pe/dgpe_logo_128.png" -} \ No newline at end of file diff --git a/pkg/arch/se.json b/pkg/arch/se.json deleted file mode 100644 index 13691917..00000000 --- a/pkg/arch/se.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "pkgname": "dupeguru-se", - "longname": "dupeGuru", - "execname": "dupeguru-se", - "arch": "all", - "iconpath": "/usr/share/dupeguru-se/dgse_logo_128.png" -} \ No newline at end of file diff --git a/pkg/debian/Makefile b/pkg/debian/Makefile index 5c7cbede..fae804aa 100644 --- a/pkg/debian/Makefile +++ b/pkg/debian/Makefile @@ -1,11 +1,11 @@ #!/usr/bin/make -f all: - dh_prep + dh_prep dh_installdirs touch build_pe_modules.py python3 build_pe_modules.py chmod +x src/run.py cp -R src/ $(CURDIR)/debian/{pkgname}/usr/share/{execname} cp $(CURDIR)/debian/{execname}.desktop $(CURDIR)/debian/{pkgname}/usr/share/applications - ln -s /usr/share/{execname}/run.py $(CURDIR)/debian/{pkgname}/usr/bin/{execname} \ No newline at end of file + ln -s /usr/share/{execname}/run.py $(CURDIR)/debian/{pkgname}/usr/bin/{execname} diff --git a/pkg/debian/build_pe_modules.py b/pkg/debian/build_pe_modules.py index a5140f47..3afd5a9b 100644 --- a/pkg/debian/build_pe_modules.py +++ b/pkg/debian/build_pe_modules.py @@ -20,5 +20,5 @@ setup( ext_modules = exts, ) move_all('_block_qt*', op.join('src', 'qt', 'pe')) -move_all('_cache*', op.join('src', 'core_pe')) -move_all('_block*', op.join('src', 'core_pe')) \ No newline at end of file +move_all('_cache*', op.join('src', 'core/pe')) +move_all('_block*', op.join('src', 'core/pe')) diff --git a/pkg/debian/control b/pkg/debian/control index d7cb76d4..5240b450 100644 --- a/pkg/debian/control +++ b/pkg/debian/control @@ -3,10 +3,18 @@ Section: devel Priority: extra Maintainer: Virgil Dupras Build-Depends: debhelper (>= 7), python3-dev, python3-setuptools -Standards-Version: 3.8.1 +Standards-Version: 3.9.2 Homepage: http://www.hardcoded.net Package: {pkgname} Architecture: {arch} -Depends: python3 (>=3.3), python3-pyqt5 +Depends: ${shlibs:Depends}, python3 (>=3.4), python3-pyqt5 +Provides: dupeguru-se, dupeguru-me, dupeguru-pe +Replaces: dupeguru-se, dupeguru-me, dupeguru-pe +Conflicts: dupeguru-se, dupeguru-me, dupeguru-pe Description: {longname} + dupeGuru is a cross-platform (Linux and OS X) GUI tool to find duplicate files in a system. + It's written mostly in Python 3 and has the peculiarity of using multiple GUI toolkits, + all using the same core Python code. + On OS X, the UI layer is written in Objective-C and uses Cocoa. + On Linux, it's written in Python and uses Qt5. diff --git a/pkg/debian/dupeguru.json b/pkg/debian/dupeguru.json new file mode 100644 index 00000000..0f83f7bd --- /dev/null +++ b/pkg/debian/dupeguru.json @@ -0,0 +1,7 @@ +{ + "pkgname": "dupeguru", + "longname": "dupeGuru", + "execname": "dupeguru", + "arch": "any", + "iconpath": "/usr/share/dupeguru/dgse_logo_128.png" +} diff --git a/pkg/debian/me.json b/pkg/debian/me.json deleted file mode 100644 index f42c20b5..00000000 --- a/pkg/debian/me.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "pkgname": "dupeguru-me", - "longname": "dupeGuru Music Edition", - "execname": "dupeguru_me", - "arch": "all", - "iconpath": "/usr/share/dupeguru_me/dgme_logo_128.png" -} \ No newline at end of file diff --git a/pkg/debian/pe.json b/pkg/debian/pe.json deleted file mode 100644 index 8fc701a6..00000000 --- a/pkg/debian/pe.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "pkgname": "dupeguru-pe", - "longname": "dupeGuru Picture Edition", - "execname": "dupeguru_pe", - "arch": "any", - "iconpath": "/usr/share/dupeguru_pe/dgpe_logo_128.png" -} \ No newline at end of file diff --git a/pkg/debian/se.json b/pkg/debian/se.json deleted file mode 100644 index 28692ffa..00000000 --- a/pkg/debian/se.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "pkgname": "dupeguru-se", - "longname": "dupeGuru", - "execname": "dupeguru_se", - "arch": "all", - "iconpath": "/usr/share/dupeguru_se/dgse_logo_128.png" -} \ No newline at end of file