3 # - goto and see workaround (!)
4 # - summary and description (both),
8 Summary: Python MSN jabber transport
9 Summary(pl.UTF-8): Transport MSN dla jabbera napisany w pythonie
15 Group: Applications/Communications
16 Source0: http://delx.cjb.net/pymsnt/tarballs/pymsnt-snapshot.tar.gz
17 # Source0-md5: 878a3df019c3e56b832feb751a4b4502
18 Source1: %{name}-config.xml
20 URL: http://delx.cjb.net/pymsnt/
22 BuildRequires: rpm-pythonprov
23 BuildRequires: rpmbuild(macros) >= 1.219
24 Requires: python-Imaging
25 Requires: python-Twisted
26 Requires: python-Twisted-ssl
27 Requires: python-TwistedWeb
28 Requires: python-TwistedWords
29 Requires: python-TwistedXish
30 Requires: python-pyOpenSSL
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %setup -q -n pymsnt-snapshot
40 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT{%{_datadir}/pymsnt/src/{twistfix/words/{xish/,protocols/jabber/},legacy/msn/,baseproto/},%{_var}/lib/pymsnt}
43 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/jabber,/etc/rc.d/init.d}
44 install -d $RPM_BUILD_ROOT%{_datadir}/pymsnt/data
45 install src/twistfix/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix
46 install src/twistfix/words/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words
47 install src/twistfix/words/xish/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words/xish
48 install src/twistfix/words/protocols/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words/protocols
49 install src/twistfix/words/protocols/jabber/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words/protocols/jabber
50 install src/legacy/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/legacy
51 install src/legacy/msn/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/legacy/msn
52 install src/baseproto/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/baseproto
53 install src/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src
54 install data/* $RPM_BUILD_ROOT%{_datadir}/pymsnt/data
55 install PyMSNt.py $RPM_BUILD_ROOT%{_datadir}/pymsnt
57 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/jabber/PyMSNt.xml
58 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/PyMSNt
61 rm -rf $RPM_BUILD_ROOT
63 # ugly workaround (maybe fix in twisted words/xish package?)
65 ln -s %{py_sitescriptdir}/twisted/words %{py_sitedir}/twisted/words
66 ln -s %{py_sitescriptdir}/twisted/xish %{py_sitedir}/twisted/xish
68 if [ -f %{_sysconfdir}/jabber/secret ]; then
69 SECRET=`cat %{_sysconfdir}/jabber/secret`
70 if [ -n "$SECRET" ] ; then
71 echo "Updating component authentication secret in PyMSNt.xml..."
72 %{__sed} -i -e "s/>secret</>$SECRET</" /etc/jabber/PyMSNt.xml
75 /sbin/chkconfig --add PyMSNt
76 %service PyMSNt restart "Jabber MSN transport"
79 if [ "$1" = "0" ]; then
81 /sbin/chkconfig --del PyMSNt
85 echo "Cleaing ugly workaround (%{py_sitedir}/twisted/{words,xish})"
86 rm -f %{py_sitedir}/twisted/words
87 rm -f %{py_sitedir}/twisted/xish
90 %defattr(644,root,root,755)
92 %dir %{_datadir}/pymsnt/src/twistfix/
93 %{_datadir}/pymsnt/src/twistfix/*.py
94 %dir %{_datadir}/pymsnt/src/twistfix/words/
95 %{_datadir}/pymsnt/src/twistfix/words/*.py
96 %dir %{_datadir}/pymsnt/src/twistfix/words/xish/
97 %{_datadir}/pymsnt/src/twistfix/words/xish/*.py
98 %dir %{_datadir}/pymsnt/src/twistfix/words/protocols/
99 %{_datadir}/pymsnt/src/twistfix/words/protocols/*.py
100 %dir %{_datadir}/pymsnt/src/twistfix/words/protocols/jabber/
101 %{_datadir}/pymsnt/src/twistfix/words/protocols/jabber/*.py
102 %dir %{_datadir}/pymsnt/src/legacy/
103 %{_datadir}/pymsnt/src/legacy/*.py
104 %dir %{_datadir}/pymsnt/src/legacy/msn/
105 %{_datadir}/pymsnt/src/legacy/msn/*.py
106 %dir %{_datadir}/pymsnt/src/baseproto/
107 %{_datadir}/pymsnt/src/baseproto/*.py
108 %dir %{_datadir}/pymsnt/src
109 %{_datadir}/pymsnt/src/*.py
110 %dir %{_datadir}/pymsnt/data/
111 %{_datadir}/pymsnt/data/*
112 %dir %{_datadir}/pymsnt
113 %attr(755,root,root) %{_datadir}/pymsnt/*.py
114 %dir %{_var}/lib/pymsnt
115 %attr(754,root,root) /etc/rc.d/init.d/PyMSNt
116 %attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/PyMSNt.xml