1,969
edits
Changes
no edit summary
{{languages|Fedora RPM}}{{stub}}
The [[installation]] page details how to download and install a working version of '''Gramps''' to your operating system of choice. For most users...
yum install gramps
will be all that is needed for the [httphttps://fedoraproject.org/wiki/ fedoraFedora] distribution. This page details a different method and is for those users wanting an alternative version of grampsGramps, this may be to test a SVN version or to install the latest stable version.
= Development rpm RPM =It may be possible that next to the standard Fedora rpm RPM there's a newer version available for development testing.
Assuming you have an existing version of gramps Gramps installed, you can try to install from the following repositories:
yum --enablerepo=updates-testing update gramps
yum --enablerepo=development update gramps
For Fedora versions 6 and older, the development repository is called '''extras-development'''.
= To build the rpm RPM from source =An alternative approach to installing the binary RPM is to build the package from source, this will build gramps Gramps using the package versions that you have installed. For this, you need the gramps Gramps source kit and a so called '''SPEC''' file. It is usually easiest to download the most recent gramps Gramps source RPM (SRPM) from the Fedora repositories, extract the SPEC file, adjust it for the new version, and try to build a new RPM.
== To build the RPM ==
Run '''rpmdev-setuptree''' . This will silently create the 'rpmbuild/' tree in the users home directory (instead of using ''usr/src/redhat'')
Download the most recent source rpm RPM from the Fedora repository, and install it.
rpm -iv gramps-XXX.src.rpm
Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
More information on the SPEC file can be found in the next section, 'To build an rpm RPM from SVN'.
Save the SPEC file and try to build the kit:
Missing dependencies: These dependencies may be related to the build environment (have you built packages from source, on this machine, before?)
In addition to the normal build tools, these additional packages are needed to build the gramps rpmRPM: desktop-file-utils, gettext, perl-XML-Parser, gnome-python2-canvas, gnome-python2-gconf, gnome-vfs2-devel, pygtk2-libglade, python-devel, scrollkeeper, and gnome-doc-utils
Build errors: such as ''unpackaged files'' etc: The remedy for any of these errors will vary depending on circumstances, ie; there are no easy answers. '''Read the error message carefully''', copy a relevant part of the message string, and search the net. The chances are very good that the problem has been encountered before and a solution exists. If that fails and you're still keen, try the [http://sourceforge.net/mail/?group_id=25770|gramps mailing lists.]
= To build an rpm RPM from SVN =
'''Caveat emptor:'''
*Some assumptions have been made here, the prime one being that you have any needed devel packages installed, and therefore a system that can actually build from source. If you don't have one - yet - then continue on and hopefully your system will give enough clues so that you can get to the final stage, and build an rpmRPM. ({{man menu|Ah! and please update this page to suit, or notify the mailing list}}).*A secondary assumption is that your happy to install '''over''' your existing gramps Gramps installation? This is the SVN (bleeding edge) package and things may break. The flip side to that problem is that once they're reported they'll be fixed and goodness will prevail!*And with that in mind, '''backup''' your database first. '''Don't work on that which is irreplacableirreplaceable.'''
**Happy Bug Hunting!
If this is the first build on this machine then the following installation may be required, to install the build environment in the users directory, as described in the previous section.'''su -c 'yum install rpmdevtools''''
If this fails with '''svn co httpswhich://gramps.svn.sourceforgeno gnome-autogen.net/svnroot/gramps/branches/gramps22 'sh ''follow the advice and execute
If it again fails, but with...
which I have so far ignored, with no ill effects.
The resulting directory now needs to be packaged as gramps-28.2.525.tar.gz
<pre>
Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarchPackager: Johan Vromans <[email protected]>
BuildRequires: desktop-file-utils
BuildRequires: gettext
BuildRequires: perl(XML::Parser)BuildRequires: gnome-python2-canvasBuildRequires: gnome-python2-gconfBuildRequires: gnome-vfs2-devel
BuildRequires: pygtk2-libglade
BuildRequires: python-devel
BuildRequires: scrollkeeperlibrsvg2-develBuildRequires: gnome-doc-utils intltool
Requires: gnome-python2-canvaslibrsvg2 Requires: gnome-python2-gconfRequires: gnome-python2-gnomevfsRequires: gnome-python2Requires: gnome-python2-gnomeprintRequires: gnome-python2-gtkspellRequires: ImageMagickRequires: freefont
Requires: pygtk2
Requires: pygtk2-libglade
Requires: rcs
Requires: python-reportlab graphvizRequires: graphviz xdgutils
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
%description
gramps (Genealogical Research and Analysis Management Programming
System) is a GNOME GTK based genealogy program supporting a Python
based plugin system.
%clean
rm -rf ${RPM_BUILD_ROOT}
%post
update-desktop-database &> /dev/null ||:
update-mime-database %{_datadir}/mime &> /dev/null || :
fi
%postun
update-desktop-database &> /dev/null ||:
update-mime-database %{_datadir}/mime &> /dev/null || :
</pre>
To install the succesful successful build, note the name of the noarch RPM that was written, and pass it to '''su -c 'yum localinstall /home/<user>/rpmbuild/RPMS/noarch/gramps-2.2.5rpm -1.noarch.rpm'''' or perhaps use localupdate? (see '''man yumivh'''):
= See also =
[http://fedoranews.org/tchung/rpmbuild/ HOWTO: How to create rpmbuild directory], and [http://myy.helia.fi/~karte/linux/doc/rpm-build-as-user.html RPM Building as a User]
* [https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-rpm-using.html 10.2. Using RPM] - CentOS
==See also==
* [[Linux:Build from source]]
* [[OpenSUSE RPM]]
[[Category:Developers/Installation]]
[[Category:Developers/Packaging]]