]>
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 |
deb1696f | 12 | Release: 2 |
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 | |
98c222a6 | 20 | Patch0: %{name}-protocolver.patch |
b70f55f9 | 21 | Patch1: %{name}-delete-reactor.patch |
22 | Patch2: %{name}-remove-pid.patch | |
23 | Patch3: %{name}-unexpected-xfr.patch | |
e697c636 | 24 | URL: http://delx.cjb.net/pymsnt/ |
25 | BuildRequires: python | |
26 | BuildRequires: rpm-pythonprov | |
27 | BuildRequires: rpmbuild(macros) >= 1.219 | |
75c4bf71 | 28 | Requires: python-PIL |
29 | Requires: python-TwistedCore | |
30 | Requires: python-TwistedCore-ssl | |
63bf010c | 31 | Requires: python-TwistedWeb |
54c7fb66 | 32 | Requires: python-TwistedWords |
54c7fb66 | 33 | Requires: python-pyOpenSSL |
e697c636 | 34 | BuildArch: noarch |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
36 | ||
37 | %description | |
daf8d9f9 JB |
38 | Python MSN Jabber transport. |
39 | ||
40 | %description -l pl.UTF-8 | |
41 | Transport MSN dla Jabbera napisany w Pythonie. | |
e697c636 | 42 | |
e697c636 | 43 | %prep |
29e98974 | 44 | %setup -q -n pymsnt-%{version} |
98c222a6 | 45 | %patch0 -p0 |
b70f55f9 | 46 | %patch1 -p1 |
47 | %patch2 -p1 | |
48 | %patch3 -p1 | |
e697c636 | 49 | |
e697c636 | 50 | %install |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
daf8d9f9 | 53 | install -d $RPM_BUILD_ROOT{%{_datadir}/pymsnt/src/{twistfix/words/{xish,protocols/jabber},legacy/msn,baseproto},%{_var}/lib/pymsnt} |
54c7fb66 ER |
54 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/jabber,/etc/rc.d/init.d} |
55 | install -d $RPM_BUILD_ROOT%{_datadir}/pymsnt/data | |
56 | install src/twistfix/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix | |
57 | install src/twistfix/words/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words | |
58 | install src/twistfix/words/xish/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words/xish | |
59 | install src/twistfix/words/protocols/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words/protocols | |
60 | install src/twistfix/words/protocols/jabber/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words/protocols/jabber | |
61 | install src/legacy/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/legacy | |
62 | install src/legacy/msn/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/legacy/msn | |
63 | install src/baseproto/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/baseproto | |
64 | install src/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src | |
65 | install data/* $RPM_BUILD_ROOT%{_datadir}/pymsnt/data | |
66 | install PyMSNt.py $RPM_BUILD_ROOT%{_datadir}/pymsnt | |
e697c636 | 67 | |
b450d60f ER |
68 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/jabber/PyMSNt.xml |
69 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/PyMSNt | |
4646aa2a | 70 | |
e697c636 | 71 | %clean |
72 | rm -rf $RPM_BUILD_ROOT | |
73 | ||
63bf010c | 74 | %post |
daf8d9f9 JB |
75 | # ugly workaround (FIX it here or in twisted words/xish packages) |
76 | #ln -s %{py_sitescriptdir}/twisted/words %{py_sitedir}/twisted/words | |
77 | #ln -s %{py_sitescriptdir}/twisted/xish %{py_sitedir}/twisted/xish | |
63bf010c | 78 | |
54c7fb66 ER |
79 | if [ -f %{_sysconfdir}/jabber/secret ]; then |
80 | SECRET=`cat %{_sysconfdir}/jabber/secret` | |
81 | if [ -n "$SECRET" ] ; then | |
82 | echo "Updating component authentication secret in PyMSNt.xml..." | |
83 | %{__sed} -i -e "s/>secret</>$SECRET</" /etc/jabber/PyMSNt.xml | |
84 | fi | |
4646aa2a | 85 | fi |
4e2bf44f | 86 | /sbin/chkconfig --add PyMSNt |
87 | %service PyMSNt restart "Jabber MSN transport" | |
4646aa2a | 88 | |
89 | %preun | |
90 | if [ "$1" = "0" ]; then | |
54c7fb66 ER |
91 | %service PyMSNt stop |
92 | /sbin/chkconfig --del PyMSNt | |
4646aa2a | 93 | fi |
94 | ||
daf8d9f9 JB |
95 | #%postun |
96 | #echo "Cleaing ugly workaround (%{py_sitedir}/twisted/{words,xish})" | |
97 | #rm -f %{py_sitedir}/twisted/words | |
98 | #rm -f %{py_sitedir}/twisted/xish | |
63bf010c | 99 | |
e697c636 | 100 | %files |
101 | %defattr(644,root,root,755) | |
102 | %doc README TODO docs | |
daf8d9f9 | 103 | %dir %{_datadir}/pymsnt/src/twistfix |
e697c636 | 104 | %{_datadir}/pymsnt/src/twistfix/*.py |
daf8d9f9 | 105 | %dir %{_datadir}/pymsnt/src/twistfix/words |
e697c636 | 106 | %{_datadir}/pymsnt/src/twistfix/words/*.py |
daf8d9f9 | 107 | %dir %{_datadir}/pymsnt/src/twistfix/words/xish |
e697c636 | 108 | %{_datadir}/pymsnt/src/twistfix/words/xish/*.py |
daf8d9f9 | 109 | %dir %{_datadir}/pymsnt/src/twistfix/words/protocols |
e697c636 | 110 | %{_datadir}/pymsnt/src/twistfix/words/protocols/*.py |
daf8d9f9 | 111 | %dir %{_datadir}/pymsnt/src/twistfix/words/protocols/jabber |
e697c636 | 112 | %{_datadir}/pymsnt/src/twistfix/words/protocols/jabber/*.py |
daf8d9f9 | 113 | %dir %{_datadir}/pymsnt/src/legacy |
e697c636 | 114 | %{_datadir}/pymsnt/src/legacy/*.py |
daf8d9f9 | 115 | %dir %{_datadir}/pymsnt/src/legacy/msn |
e697c636 | 116 | %{_datadir}/pymsnt/src/legacy/msn/*.py |
daf8d9f9 | 117 | %dir %{_datadir}/pymsnt/src/baseproto |
e697c636 | 118 | %{_datadir}/pymsnt/src/baseproto/*.py |
119 | %dir %{_datadir}/pymsnt/src | |
120 | %{_datadir}/pymsnt/src/*.py | |
daf8d9f9 | 121 | %dir %{_datadir}/pymsnt/data |
aeaf816d | 122 | %{_datadir}/pymsnt/data/* |
e697c636 | 123 | %dir %{_datadir}/pymsnt |
aeaf816d | 124 | %attr(755,root,root) %{_datadir}/pymsnt/*.py |
4646aa2a | 125 | %dir %{_var}/lib/pymsnt |
54c7fb66 | 126 | %attr(754,root,root) /etc/rc.d/init.d/PyMSNt |
8ba2f93e | 127 | %attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/PyMSNt.xml |