# Disable the gtk frontend by default, it depends on stuff # to be obsoleted soonish (and which is not in EPEL 6) %bcond_with gtk Name: justmoon Version: 0.3.3 Release: 7%{?dist} Summary: Just Moon is lunar observing software for Linux Group: Amusements/Graphics License: GPL+ URL: http://www.shallowsky.com/software/justmoon/ Source0: http://www.shallowsky.com/software/justmoon/%{name}-%{version}.tar.gz Source1: justmoon-gmoon.desktop Source2: justmoon-qmoon.desktop # Not sent to upstream yet Patch0: justmoon-0.3.3-parenth.patch # Not upstreamable Patch1: justmoon-0.3.3-datadir.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: qt3-devel %if %with gtk BuildRequires: gtk+-devel BuildRequires: gdk-pixbuf-devel %endif BuildRequires: desktop-file-utils %description %{summary} %if %with gtk %package gtk Summary: GTK+ frontend for Just Moon, a lunar observing software Group: Amusements/Graphics Requires: %{name}-common = %{version} %description gtk This package contains a lunar observing software with GTK+-based user interface that fits the GNOME Desktop environment. %endif %package qt Summary: QT frontend for Just Moon, a lunar observing software Group: Amusements/Graphics Requires: %{name}-common = %{version} %if %without gtk Obsoletes: %{name}-gtk < %{version}-%{release} %endif %description qt This package contains a lunar observing software with QT-based user interface that fits the KDE Desktop environment. %package common Summary: Data files for Just Moon, a lunar observing software Group: Amusements/Graphics %description common This package contains data file for a lunar observing software Just Moon. In order to actually use Just Moon you need a graphical frontend from justmoon-qt or justmoon-gtk package. %prep %setup -q %patch0 -p1 -b .parenth %patch1 -p1 -b .datadir %build make %{?_smp_mflags} \ 'CFLAGS=%{optflags} -DDATADIR=\"%{_datadir}/%{name}/\"' \ 'CXXFLAGS=%{optflags} -DDATADIR=\"%{_datadir}/%{name}/\"' \ %if %with gtk gmoon \ %endif qmoon %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT/%{_bindir} make installdata INSTALLDIR=$RPM_BUILD_ROOT/%{_datadir}/%{name} %if %with gtk make -C gmoon install INSTALLPREFIX=$RPM_BUILD_ROOT/%{_prefix} %endif install -p -m 0755 qmoon/qmoon $RPM_BUILD_ROOT/%{_bindir} %if %with gtk desktop-file-install --vendor="fedora" \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ %{SOURCE1} %endif desktop-file-install --vendor="fedora" \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ %{SOURCE2} %clean rm -rf $RPM_BUILD_ROOT %files common %defattr(-,root,root,-) %dir %{_datadir}/%{name} %attr(0644,root,root) %{_datadir}/%{name}/* %doc README %if %with gtk %files gtk %defattr(-,root,root,-) %{_bindir}/gmoon %{_datadir}/applications/fedora-justmoon-gmoon.desktop %endif %files qt %defattr(-,root,root,-) %{_bindir}/qmoon %{_datadir}/applications/fedora-justmoon-qmoon.desktop %changelog * Fri Jul 09 2010 Lubomir Rintel (Fedora Astronomy) <lkundrak@v3.sk> - 0.3.3-7 - Disable old GTK1 front end by default * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Tue Mar 24 2009 Lubomir Rintel (Fedora Astronomy) <lkundrak@v3.sk> - 0.3.3-5 - Fix the summary and icon location * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Fri Sep 05 2008 Lubomir Rintel (Fedora Astronomy) <lkundrak@v3.sk> - 0.3.3-3 - Yet more review fixes, thanks to yet another Marek Mahut * Fri Sep 05 2008 Lubomir Rintel (Fedora Astronomy) <lkundrak@v3.sk> - 0.3.3-2 - Integrate review fixes, thanks to Marek Mahut * Fri Sep 05 2008 Lubomir Rintel (Fedora Astronomy) <lkundrak@v3.sk> - 0.3.3-1 - Initial packaging attempt