Improved debian packaging by reducing metadata duplication in the project.

--HG--
rename : debian_se/compat => debian/compat
rename : debian_se/control => debian/control
rename : debian_se/copyright => debian/copyright
rename : debian_se/dirs => debian/dirs
rename : debian_se/dupeguru_se.desktop => debian/dupeguru.desktop
rename : debian_se/rules => debian/rules
This commit is contained in:
Virgil Dupras 2012-06-16 07:35:23 -07:00
parent 16e1ee93d0
commit 89f8214bce
22 changed files with 39 additions and 258 deletions

View File

View File

@ -1,4 +1,4 @@
Source: dupeguru-se
Source: {pkgname}
Section: devel
Priority: extra
Maintainer: Virgil Dupras <hsoft@hardcoded.net>
@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 7)
Standards-Version: 3.8.1
Homepage: http://www.hardcoded.net
Package: dupeguru-se
Package: {pkgname}
Architecture: all
Depends: python3 (>=3.2), python3-pyqt4
Description: dupeGuru
Description: {longname}

View File

View File

@ -1,8 +1,8 @@
[Desktop Entry]
Name=dupeGuru
Name={longname}
Comment=Find duplicate files.
Exec=dupeguru_se
Icon=/usr/share/dupeguru_se/dgse_logo_128.png
Exec={execname}
Icon={iconpath}
Terminal=false
Type=Application
Categories=Utility;

6
debian/me.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
"pkgname": "dupeguru-me",
"longname": "dupeGuru Music Edition",
"execname": "dupeguru_me",
"iconpath": "/usr/share/dupeguru_me/dgme_logo_128.png"
}

6
debian/pe.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
"pkgname": "dupeguru-pe",
"longname": "dupeGuru Picture Edition",
"execname": "dupeguru_pe",
"iconpath": "/usr/share/dupeguru_pe/dgpe_logo_128.png"
}

View File

@ -42,10 +42,10 @@ install: build
dh_installdirs
chmod +x src/run.py
cp -R src/ $(CURDIR)/debian/dupeguru-se/usr/share/dupeguru_se
cp $(CURDIR)/debian/dupeguru_se.desktop $(CURDIR)/debian/dupeguru-se/usr/share/applications
mkdir $(CURDIR)/debian/dupeguru-se/usr/bin
ln -s /usr/share/dupeguru_se/run.py $(CURDIR)/debian/dupeguru-se/usr/bin/dupeguru_se
cp -R src/ $(CURDIR)/debian/{pkgname}/usr/share/{execname}
cp $(CURDIR)/debian/{execname}.desktop $(CURDIR)/debian/{pkgname}/usr/share/applications
mkdir $(CURDIR)/debian/{pkgname}/usr/bin
ln -s /usr/share/{execname}/run.py $(CURDIR)/debian/{pkgname}/usr/bin/{execname}
# Build architecture-independent files here.

6
debian/se.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
"pkgname": "dupeguru-se",
"longname": "dupeGuru",
"execname": "dupeguru_se",
"iconpath": "/usr/share/dupeguru_se/dgse_logo_128.png"
}

View File

@ -1,12 +0,0 @@
Source: dupeguru-me
Section: devel
Priority: extra
Maintainer: Virgil Dupras <hsoft@hardcoded.net>
Build-Depends: debhelper (>= 7)
Standards-Version: 3.8.1
Homepage: http://www.hardcoded.net
Package: dupeguru-me
Architecture: all
Depends: python3 (>=3.2), python3-pyqt4
Description: dupeGuru Music Edition

View File

@ -1,8 +0,0 @@
[Desktop Entry]
Name=dupeGuru Music Edition
Comment=Find duplicate songs in your collection.
Exec=dupeguru_me
Icon=/usr/share/dupeguru_me/dgme_logo_128.png
Terminal=false
Type=Application
Categories=Utility;

View File

@ -1,87 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
# Add here commands to compile the package.
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
chmod +x src/run.py
cp -R src/ $(CURDIR)/debian/dupeguru-me/usr/share/dupeguru_me
cp $(CURDIR)/debian/dupeguru_me.desktop $(CURDIR)/debian/dupeguru-me/usr/share/applications
mkdir $(CURDIR)/debian/dupeguru-me/usr/bin
ln -s /usr/share/dupeguru_me/run.py $(CURDIR)/debian/dupeguru-me/usr/bin/dupeguru_me
# Build architecture-independent files here.
binary-indep: install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_install
dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_python
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure

View File

@ -1 +0,0 @@
7

View File

@ -1,12 +0,0 @@
Source: dupeguru-pe
Section: devel
Priority: extra
Maintainer: Virgil Dupras <hsoft@hardcoded.net>
Build-Depends: debhelper (>= 7)
Standards-Version: 3.8.1
Homepage: http://www.hardcoded.net
Package: dupeguru-pe
Architecture: any
Depends: python3 (>=3.2), python3-pyqt4
Description: dupeGuru Picture Edition

View File

@ -1,11 +0,0 @@
Copyright 2012 Hardcoded Software Inc. (http://www.hardcoded.net)
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of Hardcoded Software Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
* If the source code has been published less than two years ago, any redistribution, in whole or in part, must retain full licensing functionality, without any attempt to change, obscure or in other ways circumvent its intent.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,3 +0,0 @@
usr/local/bin
usr/local/share
usr/share/applications

View File

@ -1,8 +0,0 @@
[Desktop Entry]
Name=dupeGuru Picture Edition
Comment=Find duplicate pictures in your library.
Exec=dupeguru_pe
Icon=/usr/share/dupeguru_pe/dgpe_logo_128.png
Terminal=false
Type=Application
Categories=Utility;

View File

@ -1,87 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
# Add here commands to compile the package.
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
chmod +x src/run.py
cp -R src/ $(CURDIR)/debian/dupeguru-pe/usr/share/dupeguru_pe
cp $(CURDIR)/debian/dupeguru_pe.desktop $(CURDIR)/debian/dupeguru-pe/usr/share/applications
mkdir $(CURDIR)/debian/dupeguru-pe/usr/bin
ln -s /usr/share/dupeguru_pe/run.py $(CURDIR)/debian/dupeguru-pe/usr/bin/dupeguru_pe
# Build architecture-independent files here.
binary-indep: install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_install
dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_python
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure

View File

@ -1 +0,0 @@
7

View File

@ -1,11 +0,0 @@
Copyright 2012 Hardcoded Software Inc. (http://www.hardcoded.net)
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of Hardcoded Software Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
* If the source code has been published less than two years ago, any redistribution, in whole or in part, must retain full licensing functionality, without any attempt to change, obscure or in other ways circumvent its intent.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,3 +0,0 @@
usr/local/bin
usr/local/share
usr/share/applications

View File

@ -15,7 +15,7 @@ from argparse import ArgumentParser
from hscommon.plat import ISWINDOWS, ISLINUX
from hscommon.build import (build_dmg, add_to_pythonpath, print_and_do, copy_packages,
build_debian_changelog, copy_qt_plugins, get_module_version)
build_debian_changelog, copy_qt_plugins, get_module_version, filereplace, copy)
def parse_args():
parser = ArgumentParser()
@ -99,10 +99,17 @@ def package_debian(edition):
if edition == 'me':
packages.append('hsaudiotag')
copy_packages(packages, srcpath)
shutil.copytree(ed('debian_{0}'), op.join(destpath, 'debian'))
debdest = op.join(destpath, 'debian')
os.makedirs(debdest)
debopts = json.load(open(op.join('debian', ed('{}.json'))))
for fn in ['compat', 'copyright', 'dirs']:
copy(op.join('debian', fn), op.join(debdest, fn))
for fn in ['control', 'rules']:
filereplace(op.join('debian', fn), op.join(debdest, fn), **debopts)
filereplace(op.join('debian', 'dupeguru.desktop'), op.join(debdest, ed('dupeguru_{}.desktop')), **debopts)
changelogpath = op.join('help', ed('changelog_{}'))
changelog_dest = op.join(destpath, 'debian', 'changelog')
project_name = ed('dupeguru-{0}')
changelog_dest = op.join(debdest, 'changelog')
project_name = debopts['pkgname']
from_version = {'se': '2.9.2', 'me': '5.7.2', 'pe': '1.8.5'}[edition]
build_debian_changelog(changelogpath, changelog_dest, project_name, from_version=from_version)
shutil.copytree(op.join('build', 'help'), op.join(srcpath, 'help'))