Sophie

Sophie

distrib > Fedora > 16 > x86_64 > media > updates-src > by-pkgid > dc39721b9f9a3f64d98e6f9511488bb4 > files > 3

starcal-2.0.2-1.fc16.src.rpm

%global pkg_name %{name}2

Name:           starcal
Version:        2.0.2
Release:        1%{?dist}
Summary:        A full-featured international calendar written in Python

Group:          User Interface/Desktops
License:        GPLv3+
URL:            http://sourceforge.net/projects/starcal/
Source0:        http://downloads.sourceforge.net/%{name}/%{pkg_name}-%{version}.zip
# Following Sources are created by me. All of the following were sent upstream
Source1:        %{pkg_name}.desktop
Source2:        %{pkg_name}-qt.desktop
Source3:        extension.js
Source4:        metadata.json
Patch0:         starcal2-2.0.0-compilefix.patch

Requires:       pygtk2 python-httplib2 python-gflags
#Requires(post): chkconfig
#Requires(preun): chkconfig
# This is for /sbin/service
#Requires(preun): initscripts

BuildArch:      noarch
BuildRequires:  python2-devel desktop-file-utils gettext

%description
StarCalendar is a full-featured international calendar written in Python,
with both PyGTK and PyQt interfaces, that supports Jalai(Iranian),
Hijri(Islamic), and Indian National calendars, as well as common 
English(Gregorian) calendar

%prep
%setup -q -n %{pkg_name}-%{version}
%patch0 -p1 -b .compilefix
sed -i.sudo "s/sudo//" locale.d/install

find -type f -name "*.py*" -exec chmod a+x {} \;
find -name "*.py" -exec sh -c 'if ! grep "^#\!" {} &> /dev/null;  then \
   sed -i -e "1i#!/usr/bin/python" {}; fi'  \;

%build

%install
./install %{buildroot} --for-pkg

# install Gnome shell's extension
mkdir -p %{buildroot}%{_datadir}/gnome-shell/extensions/starcal@hedayatvk.wordpress.com
install -p -m 644 %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/gnome-shell/extensions/starcal@hedayatvk.wordpress.com/

# cleanups
rm -rf %{buildroot}%{_datadir}/doc/
rm -rf %{buildroot}/etc/init.d/ %{buildroot}%{_prefix}/lib/
rm -rf      \
  %{buildroot}%{_datadir}/%{pkg_name}/{*install*,README,donate} \
  %{buildroot}%{_datadir}/%{pkg_name}/locale.d
rm -f %{buildroot}/%{_datadir}/applications/*

# Remove Qt ui for now since it doesn't work (from 1.9.4)
rm -rf %{buildroot}%{_datadir}/%{pkg_name}/{scal2/ui_qt,starcal2-qt*,pixmaps_qt}
rm -rf \
   %{buildroot}%{_datadir}/%{pkg_name}/plugins/pray_times_files/pray_times_qt.py
rm -rf %{buildroot}%{_bindir}/starcal2-qt

#mkdir -p %{buildroot}%{_initddir}/
#cp scripts/starcal2d %{buildroot}%{_initddir}

# temporarily remove SOURCE2 due to bug in -qt ui
desktop-file-install     \
  --dir=%{buildroot}/%{_datadir}/applications %{SOURCE1}

%find_lang %{pkg_name}

#%post
#/sbin/chkconfig --add starcal2d

#%preun
#if [ $1 -eq 0 ] ; then
#    /sbin/service starcal2d stop >/dev/null 2>&1
#    /sbin/chkconfig --del starcal2d
#fi
 
%files -f %{pkg_name}.lang
%doc ChangeLog authors license copyright donate README
%{_bindir}/*
%{_datadir}/%{pkg_name}
%{_datadir}/applications/*
%{_datadir}/pixmaps/*
#%{_prefix}/lib/bonobo/servers/GNOME_Starcal2Applet.server
%{_datadir}/icons/hicolor/*/apps/starcal2.png
#%{_initddir}/starcal2d
%{_datadir}/gnome-shell/extensions/*

%changelog
* Sun Nov 18 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 2.0.2-1
- Update to 2.0.2
- Add new requires

* Sat Jul 21 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 2.0.0-1
- Update to 2.0.0
- The extension works with gnome shell 3.4 too

* Wed Apr 11 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.9.5-1
- Updated to 1.9.5 version

* Mon Jan 23 2012 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.9.4-3
- Add patch to fix bug #759600
- Remove Qt gui as it doesn't work now, fix for bug #751553

* Thu Oct 20 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.9.4-2
- Add support gnome-shell 3.2 by starcal integration extention

* Thu Oct 13 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.9.4-1
- Updated to 1.9.4

* Thu Jul 28 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.9.3-2
- Retain license and about files in share/starcal2/ directory which is
  used in the first run

* Sat Jul 23 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.9.3-1
- Updated to 1.9.3
- removed defattr
- removed starcal daemon; doesn't seem to be reasonable (we don't have 
  system-wide events!)
- added gnome-shell extension

* Fri Jun 10 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.9.2-1
- Updated to 1.9.2 version

* Mon Feb 21 2011 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.5.3-1
- Initial version