- updated to 2.0-rc6
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 5 Oct 2012 17:09:26 +0000 (19:09 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Fri, 5 Oct 2012 17:09:26 +0000 (19:09 +0200)
- no more setup.py so need to install by hand where anki wants its files
- updated BRs

anki.spec

index a34ad0a..6ade5b1 100644 (file)
--- a/anki.spec
+++ b/anki.spec
@@ -1,13 +1,15 @@
+# TODO - post?
+%define                pre     rc6
 Summary:       SuperMemo(tm)-like program
 Summary(pl.UTF-8):     Program podobny do SuperMemo
 Name:          anki
-Version:       1.2.11
-Release:       1
+Version:       2.0
+Release:       0.%{pre}.0.2
 License:       GPL v3+
 Group:         Applications
-Source0:       http://anki.googlecode.com/files/%{name}-%{version}.tgz
-# Source0-md5: dcd43787bed2dbe63ffb6d153ee9dbe5
-URL:           http://ichi2.net/anki/
+Source0:       http://ankisrs.net/download/mirror/%{name}-%{version}-%{pre}.tgz
+# Source0-md5: ab77dc8fb1a2435771677743282bc4ab
+URL:           http://ankisrs.net/
 BuildRequires: python-PyQt4
 BuildRequires: python-SQLAlchemy
 BuildRequires: python-devel
@@ -17,9 +19,11 @@ BuildRequires:       python-sqlite
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.219
 %pyrequires_eq python-modules
-Requires:      python-BeautifulSoup
+Requires:      python-BeautifulSoup >= 3.2.1
 Requires:      python-PyQt4
 Requires:      python-SQLAlchemy
+Requires:      python-httplib2 >= 0.7.4
+Requires:      python-pyaudio >= 0.2.4
 Requires:      python-simplejson
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -34,34 +38,38 @@ Program podobny w działaniu do SuperMemo(tm).
 %setup -q
 
 %build
-cd libanki
-%{__python} setup.py build
-cd ..
-%{__python} setup.py build
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_desktopdir}
-cd libanki
-%{__python} setup.py install \
-       --optimize=2 \
-       --root=$RPM_BUILD_ROOT
-cd ..
-%{__python} setup.py install \
-       --optimize=2 \
-       --root=$RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_mandir}/man1,%{_bindir}} \
+       $RPM_BUILD_ROOT%{_datadir}/%{name}/libanki
 
+cp -a aqt $RPM_BUILD_ROOT%{_datadir}/%{name}
+cp -a libanki/anki $RPM_BUILD_ROOT%{_datadir}/%{name}/libanki
+cp -p anki $RPM_BUILD_ROOT%{_bindir}
+cp -p anki.xpm anki.png $RPM_BUILD_ROOT%{_pixmapsdir}
+cp -p anki.desktop $RPM_BUILD_ROOT%{_desktopdir}
+cp -p anki.1 $RPM_BUILD_ROOT%{_mandir}/man1
+
+%py_ocomp $RPM_BUILD_ROOT%{_datadir}/%{name}
+%py_comp $RPM_BUILD_ROOT%{_datadir}/%{name}
 %py_postclean
-install anki.desktop $RPM_BUILD_ROOT%{_desktopdir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if 0
+%post
+xdg-mime install anki.xml
+xdg-mime default anki.desktop application/x-anki
+xdg-mime default anki.desktop application/x-apkg
+%endif
+
 %files
 %defattr(644,root,root,755)
-%doc CREDITS ChangeLog README*
+%doc README*
 %attr(755,root,root) %{_bindir}/%{name}
-%{py_sitescriptdir}/anki
-%{py_sitescriptdir}/ankiqt
-%{py_sitescriptdir}/*.egg-info
+%{_datadir}/anki
 %{_desktopdir}/*.desktop
+%{_pixmapsdir}/*
+%{_mandir}/man1/anki.1*
This page took 0.092471 seconds and 4 git commands to generate.