3 # - goto and see workaround (!)
4 # - summary and description (both),
8 Summary: Python MSN jabber transport
9 Summary(pl.UTF-8): Python MSN jabber transport
15 Group: Libraries/Python
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-Twisted
25 Requires: python-Twisted-ssl
26 Requires: python-TwistedWords
27 Requires: python-TwistedWeb
28 Requires: python-TwistedXish
29 Requires: python-Imaging
30 Requires: python-pyOpenSSL
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %description -l pl.UTF-8
39 %setup -q -n pymsnt-snapshot
44 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT/{%{_datadir}/pymsnt/src/{twistfix/words/{xish/,protocols/jabber/},legacy/msn/,baseproto/},%{_var}/lib/pymsnt}
47 install -d $RPM_BUILD_ROOT/%{_sysconfdir}/{jabber,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/
61 install %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/jabber/PyMSNt.xml
62 install %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/PyMSNt
65 rm -rf $RPM_BUILD_ROOT
67 #ugly workaround (maybe fix in twisted words/xish package?)
69 ln -s %{py_sitescriptdir}/twisted/words/ %{py_sitedir}/twisted/words
70 ln -s %{py_sitescriptdir}/twisted/xish/ %{py_sitedir}/twisted/xish
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
79 /sbin/chkconfig --add PyMSNt
80 %service PyMSNt restart "Jabber MSN transport"
83 if [ "$1" = "0" ]; then
85 /sbin/chkconfig --del PyMSNt
89 echo "Cleaing ugly workaround (%{py_sitedir}/twisted/{words,xish})"
90 rm -f %{py_sitedir}/twisted/words
91 rm -f %{py_sitedir}/twisted/xish
94 %defattr(644,root,root,755)
96 %dir %{_datadir}/pymsnt/src/twistfix/
97 %{_datadir}/pymsnt/src/twistfix/*.py
98 %dir %{_datadir}/pymsnt/src/twistfix/words/
99 %{_datadir}/pymsnt/src/twistfix/words/*.py
100 %dir %{_datadir}/pymsnt/src/twistfix/words/xish/
101 %{_datadir}/pymsnt/src/twistfix/words/xish/*.py
102 %dir %{_datadir}/pymsnt/src/twistfix/words/protocols/
103 %{_datadir}/pymsnt/src/twistfix/words/protocols/*.py
104 %dir %{_datadir}/pymsnt/src/twistfix/words/protocols/jabber/
105 %{_datadir}/pymsnt/src/twistfix/words/protocols/jabber/*.py
106 %dir %{_datadir}/pymsnt/src/legacy/
107 %{_datadir}/pymsnt/src/legacy/*.py
108 %dir %{_datadir}/pymsnt/src/legacy/msn/
109 %{_datadir}/pymsnt/src/legacy/msn/*.py
110 %dir %{_datadir}/pymsnt/src/baseproto/
111 %{_datadir}/pymsnt/src/baseproto/*.py
112 %dir %{_datadir}/pymsnt/src
113 %{_datadir}/pymsnt/src/*.py
114 %dir %{_datadir}/pymsnt/data/
115 %{_datadir}/pymsnt/data/*
116 %dir %{_datadir}/pymsnt
117 %attr(755,root,root) %{_datadir}/pymsnt/*.py
118 %dir %{_var}/lib/pymsnt
119 %dir %{_sysconfdir}/init.d/
120 %attr(755,root,root) %{_sysconfdir}/init.d/PyMSNt
121 %dir %{_sysconfdir}/jabber/
122 %attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/PyMSNt.xml