]>
Commit | Line | Data |
---|---|---|
e697c636 | 1 | # |
2 | # TODO: | |
4646aa2a | 3 | # - goto and see workaround (!) |
daf8d9f9 | 4 | # - real descriptions |
100a449a | 5 | # ATTENTION! ACHTUNG! |
4e2bf44f | 6 | # - SNAPSHOT VERSION! |
e697c636 | 7 | |
daf8d9f9 JB |
8 | Summary: Python MSN Jabber transport |
9 | Summary(pl.UTF-8): Transport MSN dla Jabbera napisany w Pythonie | |
e697c636 | 10 | Name: PyMSNt |
71c8d932 | 11 | Version: 0.11.3 |
29e98974 | 12 | Release: 1 |
4646aa2a | 13 | Epoch: 1 |
281c966e | 14 | License: GPL v2 |
9c076029 | 15 | Group: Applications/Communications |
29e98974 | 16 | Source0: http://delx.net.au/projects/pymsnt/tarballs/pymsnt-%{version}.tar.gz |
17 | # Source0-md5: e74049fb1bfae59846b1be3d4ef80299 | |
4646aa2a | 18 | Source1: %{name}-config.xml |
19 | Source2: %{name}.init | |
e697c636 | 20 | URL: http://delx.cjb.net/pymsnt/ |
21 | BuildRequires: python | |
22 | BuildRequires: rpm-pythonprov | |
23 | BuildRequires: rpmbuild(macros) >= 1.219 | |
54c7fb66 | 24 | Requires: python-Imaging |
63bf010c | 25 | Requires: python-Twisted |
26 | Requires: python-Twisted-ssl | |
63bf010c | 27 | Requires: python-TwistedWeb |
54c7fb66 | 28 | Requires: python-TwistedWords |
63bf010c | 29 | Requires: python-TwistedXish |
54c7fb66 | 30 | Requires: python-pyOpenSSL |
e697c636 | 31 | BuildArch: noarch |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
daf8d9f9 JB |
35 | Python MSN Jabber transport. |
36 | ||
37 | %description -l pl.UTF-8 | |
38 | Transport MSN dla Jabbera napisany w Pythonie. | |
e697c636 | 39 | |
e697c636 | 40 | %prep |
29e98974 | 41 | %setup -q -n pymsnt-%{version} |
e697c636 | 42 | |
e697c636 | 43 | %install |
44 | rm -rf $RPM_BUILD_ROOT | |
45 | ||
daf8d9f9 | 46 | install -d $RPM_BUILD_ROOT{%{_datadir}/pymsnt/src/{twistfix/words/{xish,protocols/jabber},legacy/msn,baseproto},%{_var}/lib/pymsnt} |
54c7fb66 ER |
47 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/jabber,/etc/rc.d/init.d} |
48 | install -d $RPM_BUILD_ROOT%{_datadir}/pymsnt/data | |
49 | install src/twistfix/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix | |
50 | install src/twistfix/words/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words | |
51 | install src/twistfix/words/xish/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words/xish | |
52 | install src/twistfix/words/protocols/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words/protocols | |
53 | install src/twistfix/words/protocols/jabber/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words/protocols/jabber | |
54 | install src/legacy/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/legacy | |
55 | install src/legacy/msn/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/legacy/msn | |
56 | install src/baseproto/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/baseproto | |
57 | install src/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src | |
58 | install data/* $RPM_BUILD_ROOT%{_datadir}/pymsnt/data | |
59 | install PyMSNt.py $RPM_BUILD_ROOT%{_datadir}/pymsnt | |
e697c636 | 60 | |
b450d60f ER |
61 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/jabber/PyMSNt.xml |
62 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/PyMSNt | |
4646aa2a | 63 | |
e697c636 | 64 | %clean |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | ||
63bf010c | 67 | %post |
daf8d9f9 JB |
68 | # ugly workaround (FIX it here or in twisted words/xish packages) |
69 | #ln -s %{py_sitescriptdir}/twisted/words %{py_sitedir}/twisted/words | |
70 | #ln -s %{py_sitescriptdir}/twisted/xish %{py_sitedir}/twisted/xish | |
63bf010c | 71 | |
54c7fb66 ER |
72 | if [ -f %{_sysconfdir}/jabber/secret ]; then |
73 | SECRET=`cat %{_sysconfdir}/jabber/secret` | |
74 | if [ -n "$SECRET" ] ; then | |
75 | echo "Updating component authentication secret in PyMSNt.xml..." | |
76 | %{__sed} -i -e "s/>secret</>$SECRET</" /etc/jabber/PyMSNt.xml | |
77 | fi | |
4646aa2a | 78 | fi |
4e2bf44f | 79 | /sbin/chkconfig --add PyMSNt |
80 | %service PyMSNt restart "Jabber MSN transport" | |
4646aa2a | 81 | |
82 | %preun | |
83 | if [ "$1" = "0" ]; then | |
54c7fb66 ER |
84 | %service PyMSNt stop |
85 | /sbin/chkconfig --del PyMSNt | |
4646aa2a | 86 | fi |
87 | ||
daf8d9f9 JB |
88 | #%postun |
89 | #echo "Cleaing ugly workaround (%{py_sitedir}/twisted/{words,xish})" | |
90 | #rm -f %{py_sitedir}/twisted/words | |
91 | #rm -f %{py_sitedir}/twisted/xish | |
63bf010c | 92 | |
e697c636 | 93 | %files |
94 | %defattr(644,root,root,755) | |
95 | %doc README TODO docs | |
daf8d9f9 | 96 | %dir %{_datadir}/pymsnt/src/twistfix |
e697c636 | 97 | %{_datadir}/pymsnt/src/twistfix/*.py |
daf8d9f9 | 98 | %dir %{_datadir}/pymsnt/src/twistfix/words |
e697c636 | 99 | %{_datadir}/pymsnt/src/twistfix/words/*.py |
daf8d9f9 | 100 | %dir %{_datadir}/pymsnt/src/twistfix/words/xish |
e697c636 | 101 | %{_datadir}/pymsnt/src/twistfix/words/xish/*.py |
daf8d9f9 | 102 | %dir %{_datadir}/pymsnt/src/twistfix/words/protocols |
e697c636 | 103 | %{_datadir}/pymsnt/src/twistfix/words/protocols/*.py |
daf8d9f9 | 104 | %dir %{_datadir}/pymsnt/src/twistfix/words/protocols/jabber |
e697c636 | 105 | %{_datadir}/pymsnt/src/twistfix/words/protocols/jabber/*.py |
daf8d9f9 | 106 | %dir %{_datadir}/pymsnt/src/legacy |
e697c636 | 107 | %{_datadir}/pymsnt/src/legacy/*.py |
daf8d9f9 | 108 | %dir %{_datadir}/pymsnt/src/legacy/msn |
e697c636 | 109 | %{_datadir}/pymsnt/src/legacy/msn/*.py |
daf8d9f9 | 110 | %dir %{_datadir}/pymsnt/src/baseproto |
e697c636 | 111 | %{_datadir}/pymsnt/src/baseproto/*.py |
112 | %dir %{_datadir}/pymsnt/src | |
113 | %{_datadir}/pymsnt/src/*.py | |
daf8d9f9 | 114 | %dir %{_datadir}/pymsnt/data |
aeaf816d | 115 | %{_datadir}/pymsnt/data/* |
e697c636 | 116 | %dir %{_datadir}/pymsnt |
aeaf816d | 117 | %attr(755,root,root) %{_datadir}/pymsnt/*.py |
4646aa2a | 118 | %dir %{_var}/lib/pymsnt |
54c7fb66 | 119 | %attr(754,root,root) /etc/rc.d/init.d/PyMSNt |
8ba2f93e | 120 | %attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/PyMSNt.xml |