Jump to: navigation, search


4,019 bytes removed, 07:16, 27 May 2021
add language box
{{languages|Debian}}= For version 4.0 x and newer =
'''Testing .debs can be found in'''
* debian stuff
sudo apt-get install devscripts dpkg-dev fakeroot debhelper libgconf2dh-devlinktree
* [ stdeb], which produces Debian source packages from Python packages via a new distutils command, sdist_dsc. Automatic defaults are provided for the Debian package, but many aspects of the resulting package can be customized. An additional command, bdist_deb, creates a Debian binary package, a .deb file. The debianize command builds a debian/ directory directly alongside your
sudo apt-get install python-stdeb python-all # or python3-all
If there is a problem with ''gramps/gen/utils/resource-path'' file, then you need to use an environment variable: '''GRAMPS_RESOURCES'''.
$ GRAMPS_RESOURCES=/usr/share gramps
or you need to customize ''[]'' before building your package!
resource_file = os.path.join(os.path.dirname(__file__), 'gramps', 'gen',
'utils', 'resource-path')
with, 'w', encoding='utf-8',
errors='strict') as fp:
- path = os.path.abspath(os.path.join(self.install_data, 'share'))
+ path = '/usr/share'
** The launcher under ''/usr/bin/gramps'' is using the '''same path''' for current stable release and this testing version. '''Backup your launcher''' if you want to install both versions. Translations might be also overwritten, you have been warned...
** You need at least version '''3.3.2''' of python-gobject for Gramps '''4.0.x'''.
** You cannot use greater version than '''2.28''' of python-gobject for Gramps '''3.4.x'''.
===via Distutils===
source Samples : Sample for creating a debian harmattan (MeeGo 1.2) binary package:  <code>import os import stdeb.util as util from shutil import copy from stdeb.command.sdist_dsc import sdist_dsc
from distutils.core import Command  __all__ = ['bdist_hdeb']  class bdist_hdeb(Command): description = 'distutils command to create debian harmattan binary package'  # [ aegis], UAC, [* UOA], [ GOA], etc ... user_options = [ ("aegis-manifest=", None, 'aegis manifest to use') ] boolean_options = []  def initialize_options (self): self.aegis_manifest = None  def finalize_options (self): pass  def run(self): # generate .dsc source pkg self.run_command('sdist_dsc')  # execute system command and read output (execute and read output of find cmd) dsc_tree = 'deb_dist' target_dir = None for entry in os.listdir(dsc_tree): fulldir = os.path.join(dsc_tree,entry) if os.path.isdir(fulldir): if target_dir is not None: raise ValueError('more than one directory in deb_dist. ' 'Unsure which is source directory') else: target_dir = fulldir if target_dir is None: raise ValueError('could not find debian source directory') # inject custom logic to dh_builddeb (build digsigsums before and add aegis manifest after) DEBNAME = self.distribution.get_name()+'_'+self.distribution.get_version()+'*_all.deb' rules = open(target_dir+'/debian/rules', 'a') rules.write('override_dh_builddeb:\n\tpython ..astraw/..stdeb/ '+self.distribution.get_name()+\ '\n\tdh_builddeb') if self.aegis_manifest is not None: # MeeGo 1.2 rules.write('\n\tar q ..blob/'+DEBNAME+' _aegis') rules.write('\n\n') rules.close()  # make aegis manifest avaiable to debianmaster/rules # MeeGo 1.2 if self.aegis_manifest is not None: copy(self.aegis_manifest, target_dir+'stdeb/_aegis') # define system command to execute (gen .deb binary pkg) syscmd = ['dpkg-buildpackage','-rfakeroot','-uc','-b']  util.process_command(syscmd,cwd=target_dir)</code> source: *
*Depends on python-pyside, gramps
= For version 3.4 and before=Instructions on creating the Debian <tt>.deb</tt> package for Ubuntu:=
* Ensure you have a working build environment* For Ubuntu 7.04 or 7.10, install these tools: sudo apt-get install devscripts dpkg-dev fakeroot debhelper libgconf2-dev* For Ubuntu 8.04, install these tools: sudo apt-get install devscripts dpkg-dev fakeroot debhelper libgconf2-dev python-xml* For Ubuntu 12.04 install these tools: sudo apt-get install devscripts dpkg-dev fakeroot debhelper libgconf2-dev* Check out the necessary version; for example, to build the <tt>.deb</tt> file for GRAMPS {{version 3.4.3}}, you'll want to run:
git clone Gramps
git checkout grampsv{{version}} -3.4.3b {{version}}* Confirm that sudo apt-get install devscripts dpkg-dev fakeroot debhelper libgconf2-dev, everything builds: ./
* Create the Changelog files:
git log gramps-3.4.2.. --pretty --numstat --summary --no-merges | git2cl > ChangeLog
git log gramps-3.4.2.. --pretty --numstat --summary --no-merges -- po | git2cl > po/ChangeLog
* Create the <tt>.deb</tt> package:
cd debian
export DEBEMAIL='[email protected]'
export DEBFULLNAME='Stephane Charette'
cd ..
dch -v 3.4.3-3 "New upstream release, include two patches"
dpkg-buildpackage -rfakeroot
: Remember to modify '''<tt>DEBEMAIL</tt>''' and '''<tt>DEBFULLNAME</tt>''' to reflect your e-mail and name.
git log v{{version}}.. --pretty --numstat --summary --no-merges | git2cl > ChangeLog git log v{{version}}.. --pretty --numstat --summary --no-merges -- po/* Release .po | git2cl > po/ChangeLog Using the <tt>.debChangelog</tt> files: cd .. ls *.deb: Note the '''generated with <tt>gramps_3.4.3-3_all.debgit2cl</tt>''' file, which needs to be uploaded to  Modify <tt></tt>. + include ChangeLog + include po/ChangeLog
* The details on how things are going to be packaged into deb files, what are the dependencies, the pre- and post- install and removal scripts etc are under <tt>debian/</tt> directory. Please refer to the [ Debian New Maintainers' Guide] for further details.

Navigation menu