Blob Blame History Raw
Name:           gnofract4d
Version:        3.14.1
Release:        1%{?dist}
Summary:        Gnofract 4D is a Gnome-based program to draw fractals
Group:          Amusements/Graphics
License:        LGPLv2+
URL:            http://gnofract4d.sourceforge.net/
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2

BuildRequires:  desktop-file-utils
BuildRequires:  docbook-style-xsl
BuildRequires:  GConf2-devel
BuildRequires:  gtk2-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libxslt
BuildRequires:  pygtk2-devel
BuildRequires:  xorg-x11-fonts-Type1
BuildRequires:  xorg-x11-server-Xvfb
BuildRequires:  xorg-x11-xinit

Requires:       gcc
Requires:       libgcc%{?_isa}
Requires:       glibc-devel%{?_isa}
Requires:       pygtk2%{?_isa}
Requires:       yelp

%global __provides_exclude_from ^%{_libdir}/python.*\\.so$

%description
Gnofract 4D is a free, open source program which allows anyone to create
beautiful images called fractals.  The images are automatically created
by the computer based on mathematical principles.  These include the
Mandelbrot and Julia sets and many more.  You don't need to do any math:
you can explore a universe of images just using a mouse.

%prep
%setup -q

# Fix the desktop file
sed -e "/Encoding/d" \
    -e "s/logo\.png/logo/" \
    -e "s/Categories.*/Categories=Graphics;GTK;GNOME;Education;Science;Math;/" \
    -e "s/MimeType.*/&;/" \
    %{name}.desktop > %{name}.desktop.new
touch -r %{name}.desktop %{name}.desktop.new
mv -f %{name}.desktop.new %{name}.desktop

# Point the XSL file to where Fedora stores its docbook XSL files
sed -i 's|stylesheet/xsl/nwalsh|xsl-stylesheets|' \
    doc/gnofract4d-manual/C/gnofract4d.xsl

%build
python2 setup.py build

# Generate documentation with an X server running (on a random X server to
# avoid collisions) so pygtk doesn't bail out immediately.
let "dnum = $RANDOM % 90 + 10"
xinit %{__python} createdocs.py -- /usr/bin/Xvfb :$dnum -ac

%install
python2 setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

# Check the desktop file
desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop

# Remove the shebangs
for fil in `find $RPM_BUILD_ROOT%{python2_sitearch} -perm 644 -name '*.py'`; do
  sed '\|^#!/usr/bin.*python|d' $fil > $fil.new
  touch -r $fil $fil.new
  mv -f $fil.new $fil
done

# Fix the one shebang that should remain
sed -i.orig 's|/usr/bin/env python|/usr/bin/python2|' \
    $RPM_BUILD_ROOT%{python2_sitearch}/fractutils/get.py
touch -r $RPM_BUILD_ROOT%{python2_sitearch}/fractutils/get.py.orig \
    $RPM_BUILD_ROOT%{python2_sitearch}/fractutils/get.py
rm -f $RPM_BUILD_ROOT%{python2_sitearch}/fractutils/get.py.orig

# Remove duplicated docs
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}

# Why is this map 755?
chmod 644 $RPM_BUILD_ROOT%{_datadir}/%{name}/maps/royal.map

# Install the man page
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
cp -p doc/%{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1

%post
update-desktop-database &> /dev/null || :
update-mime-database %{_datadir}/mime &> /dev/null || :

%postun
update-desktop-database &> /dev/null || :
update-mime-database %{_datadir}/mime &> /dev/null || :

%files
%doc COPYING README
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/gnome/help/%{name}/
%{_datadir}/mime/packages/%{name}-mime.xml
%{_datadir}/pixmaps/%{name}*
%{_mandir}/man1/%{name}*
%{python2_sitearch}/*.egg-info
%{python2_sitearch}/fract4d/
%{python2_sitearch}/fract4dgui/
%{python2_sitearch}/fractutils/

%changelog
* Fri Mar 15 2013 Jerry James <loganjerry@gmail.com> - 3.14.1-1
- New upstream release

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 3.14-3
- rebuild due to "jpeg8-ABI" feature drop

* Thu Nov  8 2012 Jerry James <loganjerry@gmail.com> - 3.14-2
- Fix bz 872853 by doing the following:
- Add missing tutorial*.xml files from upstream git
- BR libxslt to get xsltproc
- BR docbook-style-xsl, required by the doc files
- BR xorg packages so pygtk is able to generate the PNG files
- Run createdocs.py after building

* Thu Jul 26 2012 Jerry James <loganjerry@gmail.com> - 3.14-1
- New upstream release (fixes bz 665571, 834382, and 843224)
- Require glibc-devel (fixes bz 725205)
- Filter provides of private Python shared objects
- Ship the man page
- Spec file cleanups

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.13-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.13-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 3.13-3
- Rebuild for new libpng

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Aug 20 2010 Adam Tkac <atkac redhat com> - 3.13-1
- rebuild to ensure F14 has higher NVR than F13
- following changes have been merged from F13 [Stewart Adam]
  - Update to 3.13
  - Require gcc (fixes #571970)

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 3.12-4
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Fri Aug 14 2009 Stewart Adam <s.adam at diffingo.com> - 3.12-3
- Disable make check, it seems to cause extremely long build times (>24h)

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Fri Jun 19 2009 Stewart Adam <s.adam at diffingo.com> - 3.12-1
- Update to 3.12

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Feb 19 2009 Stewart Adam <s.adam at diffingo.com> - 3.10-2
- Use a random X display number from :10 to :99 to avoid "display in use"
  errors while building

* Thu Feb 19 2009 Stewart Adam <s.adam at diffingo.com> - 3.10-1
- Update to 3.10

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 3.9-2
- Rebuild for Python 2.6

* Sat Jul 19 2008 Stewart Adam <s.adam at diffingo.com> - 3.9-1
- Update to 3.9

* Sat Feb 16 2008 Stewart Adam <s.adam at diffingo.com> - 3.8-1
- Update to 3.8

* Fri Dec 28 2007 Stewart Adam <s.adam at diffingo.com> - 3.7-1
- Update to 3.7
- Drop obsolete patches

* Sun Nov 18 2007 Stewart Adam <s.adam at diffingo.com> - 3.6-4
- Fix .desktop file location
- Fix Source0 URL
- Own /usr/share/gnofract4d

* Sun Nov 18 2007 Stewart Adam <s.adam at diffingo.com> - 3.6-3
- BR xorg-x11-xinit, pygtk2-devel >= 2.6

* Sat Nov 17 2007 Stewart Adam <s.adam at diffingo.com> - 3.6-2
- License is actually LGPLv2+ because of lex.py, yacc.py, FCTGen.py
- Add patch for test suite files since two tests are invalid
- Update MIME and desktop databases
- Use virtual X for GUI test suite
- Remove redundant BR
- Remove redundant entries from %%files
- Fix rpmlint's errors about executable files/shebangs

* Wed Nov 14 2007 Stewart Adam <s.adam at diffingo.com> - 3.6-1
- Update to 3.6
- Make Source0 a URL again
- License is no longer GPL
- Update spec for Fedora (re)review
- Add patch to generate a valid .desktop file

* Mon Aug 27 2006 Michael J. Knox <michael[AT]knox.net.nz> - 2.14-4
- Rebuild for FC6

* Thu Jul 20 2006 Michael J. Knox <michael[AT]knox.net.nz> - 2.14-3
- fixed bz# 192878

* Sun May 21 2006 Michael J. Knox <michael[AT]Knox.net.nz> - 2.14-2
- fixed files list for x86_64 builds

* Wed May 17 2006 Michael J. Knox <michael[AT]Knox.net.nz> - 2.14-1
- version bump and spec clean

* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
- rebuilt

* Sun Feb 13 2005 Throsten Leemhuis <fedora at leemhuis dot info> 0:2.6-2
- "sed -i s|/usr/lib/|%%{_libdir}|g setup.cfg" on x86_64

* Tue Feb 01 2005 Panu Matilainen <pmatilai@welho.com> 0:2.6-1
- update to 2.6
- drop epoch 0 and fedora.us release tag
- run update-desktop-database on post+postun

* Sun Oct 03 2004 Panu Matilainen <pmatilai@welho.com> 0:2.1-0.fdr.1
- update to 2.1

* Tue Jul 06 2004 Panu Matilainen <pmatilai@welho.com> 0:2.0-0.fdr.1
- update to 2.0
- quite a few dependency changes because of switch to python etc

* Mon May 31 2004 Panu Matilainen <pmatilai@welho.com> 0:1.9-0.fdr.3
- fix build against newer gtk (gtk-buildfix patch)

* Tue Dec 23 2003 Panu Matilainen <pmatilai@welho.com> 0:1.9-0.fdr.2
- address issues in #1114
- huh, this requires g++ to run...

* Mon Dec 15 2003 Panu Matilainen <pmatilai@welho.com> 0:1.9-0.fdr.1
- update to 1.9
- drop patch (no longer needed to build)
- add translations now that there is one


* Sun Dec 07 2003 Panu Matilainen <pmatilai@welho.com> 0:1.8-0.fdr.1
- Initial Fedora packaging.