Blob Blame History Raw
Name:           skychart
Version:        3.0.1.6
Release:        3.20100724svn%{?dist}
Summary:        Planetarium software for the advanced amateur astronomer

# svn export -r1351 https://svn.origo.ethz.ch/skychart/trunk@1351 skychart-3.0.1.6
# tar czf skychart-3.0.1.6.tar.gz skychart-3.0.1.6

Group:          Amusements/Graphics
License:        GPLv2+
URL:            https://sourceforge.net/projects/skychart/
Source0:        %{name}-%{version}.tar.gz
Source1:        skychart.desktop
Patch1:         skychart-3.0.1.6-desktop.patch
Patch2:         skychart-3.0.1.6-strip.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

# FIXME: http://koji.fedoraproject.org/koji/taskinfo?taskID=918916
ExcludeArch:    ppc64

BuildRequires:  lazarus >= 0.9.26
BuildRequires:  ImageMagick
BuildRequires:  desktop-file-utils
BuildRequires:  dos2unix
BuildRequires:  gtk2-devel
Requires:       xdg-utils
Requires:       tzdata

%description
This program enables you to draw sky charts, making use of the data in 16
catalogs of stars and nebulae. In addition the position of planets,
asteroids and comets are shown.

The purpose of this program is to prepare different sky maps for a
particular observation. A large number of parameters help you to choose
specifically or automatically which catalogs to use, the colour and the
dimension of stars and nebulae, the representation of planets, the display
of labels and coordinate grids, the superposition of pictures, the
condition of visibility and more. All these features make this celestial
atlas more complete than a conventional planetarium.


%prep
%setup -q
%patch1 -p1 -b .desktop
%patch2 -p1 -b .strip
find skychart -type f -print0 |xargs -0 chmod 644


%build
./configure lazarus=%{_libdir}/lazarus prefix=%{_prefix}

# We build these separately so that we can apply optflags
make %{_smp_mflags} arch_flags="%{optflags}" -C skychart/library/getdss
make %{_smp_mflags} arch_flags="%{optflags}" -C skychart/library/plan404

make # not concurrency-safe

# Fix exotic EOL encodings
dos2unix -qk tools/doc/html_doc/en/feature_class_fichiers/common.css
dos2unix -qk tools/doc/html_doc/en/feature_class_fichiers/custom.css
dos2unix -qk tools/doc/releasenotes*.txt


%install
rm -rf $RPM_BUILD_ROOT

make install install_data PREFIX=$RPM_BUILD_ROOT%{_prefix}

# Fix multilib path
[ %{_lib} = lib ] || mv $RPM_BUILD_ROOT%{_prefix}/{lib,%{_lib}}

# Fix debuginfo
chmod +x $RPM_BUILD_ROOT%{_libdir}/*

# Menu entry
desktop-file-install --vendor=fedora \
        --dir=$RPM_BUILD_ROOT%{_datadir}/applications \
        $RPM_BUILD_ROOT%{_datadir}/applications/skychart.desktop


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_libdir}/*.so
%{_datadir}/applications/*
%{_datadir}/pixmaps/*
%dir %{_datadir}/skychart
%{_datadir}/skychart/data
%{_datadir}/skychart/cat
%doc %{_datadir}/skychart/doc
%exclude %{_datadir}/doc/skychart
%doc skychart/gpl.txt


%post -p /sbin/ldconfig


%postun -p /sbin/ldconfig


%changelog
* Sat Jul 24 2010 Lubomir Rintel (Fedora Astronomy) <lkundrak@v3.sk> - 3.0.1.6-3.20100724svn
- Update to a later snapshot

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1.6-2.20090408svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Apr 08 2009 Lubomir Rintel (Fedora Astronomy) <lkundrak@v3.sk> - 3.0.1.6-1.20090408svn
- Update to post latest beta
- Drop the unzip patch
- Upstream did the datadir and xdg-open chage as well, drop patches

* Wed Apr 08 2009 Lubomir Rintel (Fedora Astronomy) <lkundrak@v3.sk> - 3.0.1.5-6.20081026svn
- Enable GTK2 UI

* Fri Mar 27 2009 Lubomir Rintel (Fedora Astronomy) <lkundrak@v3.sk> - 3.0.1.5-5.20081026svn
- Fix desktop entry categories

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1.5-4.20081026svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Dec 01 2008 Lubomir Rintel (Fedora Astronomy) <lkundrak@v3.sk> - 3.0.1.5-3.20081026svn
- Own /usr/share/skychart (#474037)

* Thu Nov 06 2008 Lubomir Rintel (Fedora Astronomy) <lkundrak@v3.sk> - 3.0.1.5-2.20081026svn
- Temporarily disable ppc64 build due to a compiler bug

* Wed Oct 29 2008 Lubomir Rintel (Fedora Astronomy) <lkundrak@v3.sk> - 3.0.1.5-1.20081026svn
- Rebase to later upstream, since we have more recent fpc and lazarus now

* Sun Oct 26 2008 Lubomir Rintel (Fedora Astronomy) <lkundrak@v3.sk> - 3.0.1.3-1.20071015svn
- Initial packaging attempt