Blob Blame History Raw
Name:		TeXamator
Version:	1.7.5
Release:	0%{?dist}
Summary:	Helping you making your exercise sheets

License:	GPLv3
URL:		http://snouffy.free.fr/blog-en/index.php/category/TeXamator
Source0:	http://snouffy.free.fr/blog-en/public/TeXamator/%{name}.v.%{version}.tar.gz
Source1:	%{name}.desktop

BuildArch:	noarch

BuildRequires:	desktop-file-utils

Requires:	PyQt4
Requires:	tex(latex)
Requires:	dvipng

%description
TeXamator is written in Python/Qt4. It is aimed at helping you making your
exercise sheets. Basically, it browses a specified directory, looks for .tex
files containing exercises and builds a tree with all your exercises in it. You
can click on an element of the tree to have a preview of the exercise and add
it to a list if you wish to. Then you can save your work to a .tex file or you
can generate a .dvi file.


%prep
%setup -q -n %{name}
find -name '*~' -delete # Remove backup file in source package


%build


%install
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -rp partielatormods %{buildroot}%{_datadir}/%{name}
cp -rp ts_files %{buildroot}%{_datadir}/%{name}
cp -rp ui_files %{buildroot}%{_datadir}/%{name}
cp -p %{name}.py %{buildroot}%{_datadir}/%{name}/%{name}.py
ln -s %{_datadir}/%{name}/%{name}.py %{buildroot}%{_bindir}/%{name} # Create a link in _bindir
# Remove shebang from Python libraries 
sed -i -e '/\/usr\/bin\/python/d' %{buildroot}%{_datadir}/%{name}/partielatormods/*.py
for lib in %{buildroot}%{_datadir}/%{name}/partielatormods/*/*.py; do
 sed '/\/usr\/bin\/python/d' $lib > $lib.new &&
 touch -r $lib $lib.new &&
 mv $lib.new $lib
done
# Remove developer's utility not need by the application
rm -f %{buildroot}%{_datadir}/%{name}/ui_files/plop.sh
# Add .desktop file
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop



%files
%doc README gpl-3.0.txt
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop


%changelog
* Sat Jan 14 2012 Mario Santagiuliana <fedora@marionline.it> - 1.7.5-0
- Update to new version 1.7.5

* Fri Jan 13 2012 Mario Santagiuliana <fedora@marionline.it> - 1.7.4-4
- Add .dektop file

* Fri Jan 13 2012 Mario Santagiuliana <fedora@marionline.it> - 1.7.4-3
- Follow comment 7 directive:
https://bugzilla.redhat.com/show_bug.cgi?id=772709#c7
- Fix error in changelog

* Thu Jan 12 2012 Mario Santagiuliana <fedora@marionline.it> - 1.7.4-2
- Follow comment 5:
https://bugzilla.redhat.com/show_bug.cgi?id=772709#c5

* Wed Jan 11 2012 Mario Santagiuliana <fedora@marionline.it> - 1.7.4-1
- Follow comment 3:
https://bugzilla.redhat.com/show_bug.cgi?id=772709#c3

* Wed Jan 11 2012 Mario Santagiuliana <fedora@marionline.it> - 1.7.4-0
- Update to new version 1.7.4

* Wed Jan 11 2012 Mario Santagiuliana <fedora@marionline.it> - 1.7.3-1
- Rename spec file

* Mon Jan 09 2012 Mario Santagiuliana <fedora@marionline.it> - 1.7.3-0
- initial build