3 # - goto and see workaround (!)
4 # - summary and description (both),
5 # - data to /var/lib/ dir i think,
10 Summary: Python MSN jabber transport
11 Summary(pl.UTF-8): Python MSN jabber transport
17 Group: Libraries/Python
18 Source0: http://delx.cjb.net/pymsnt/tarballs/pymsnt-snapshot.tar.gz
19 # Source0-md5: 878a3df019c3e56b832feb751a4b4502
20 Source1: %{name}-config.xml
22 URL: http://delx.cjb.net/pymsnt/
24 BuildRequires: rpm-pythonprov
25 BuildRequires: rpmbuild(macros) >= 1.219
26 Requires: python-Twisted
27 Requires: python-Twisted-ssl
28 Requires: python-TwistedWords
29 Requires: python-TwistedWeb
30 Requires: python-TwistedXish
31 Requires: python-Imaging
32 Requires: python-pyOpenSSL
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 %description -l pl.UTF-8
41 %setup -q -n pymsnt-snapshot
46 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT/{%{_datadir}/pymsnt/src/{twistfix/words/{xish/,protocols/jabber/},legacy/msn/,baseproto/},%{_var}/lib/pymsnt}
49 install -d $RPM_BUILD_ROOT/%{_sysconfdir}/{jabber,init.d}
50 install src/twistfix/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/twistfix/
51 install src/twistfix/words/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/twistfix/words/
52 install src/twistfix/words/xish/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/twistfix/words/xish/
53 install src/twistfix/words/protocols/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/twistfix/words/protocols/
54 install src/twistfix/words/protocols/jabber/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/twistfix/words/protocols/jabber/
55 install src/legacy/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/legacy/
56 install src/legacy/msn/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/legacy/msn/
57 install src/baseproto/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/baseproto/
58 install src/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/
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 rm -f %{py_sitedir}/twisted/words/
90 rm -f %{py_sitedir}/twisted/xish/
93 %defattr(644,root,root,755)
95 %dir %{_datadir}/pymsnt/src/twistfix/
96 %{_datadir}/pymsnt/src/twistfix/*.py
97 %dir %{_datadir}/pymsnt/src/twistfix/words/
98 %{_datadir}/pymsnt/src/twistfix/words/*.py
99 %dir %{_datadir}/pymsnt/src/twistfix/words/xish/
100 %{_datadir}/pymsnt/src/twistfix/words/xish/*.py
101 %dir %{_datadir}/pymsnt/src/twistfix/words/protocols/
102 %{_datadir}/pymsnt/src/twistfix/words/protocols/*.py
103 %dir %{_datadir}/pymsnt/src/twistfix/words/protocols/jabber/
104 %{_datadir}/pymsnt/src/twistfix/words/protocols/jabber/*.py
105 %dir %{_datadir}/pymsnt/src/legacy/
106 %{_datadir}/pymsnt/src/legacy/*.py
107 %dir %{_datadir}/pymsnt/src/legacy/msn/
108 %{_datadir}/pymsnt/src/legacy/msn/*.py
109 %dir %{_datadir}/pymsnt/src/baseproto/
110 %{_datadir}/pymsnt/src/baseproto/*.py
111 %dir %{_datadir}/pymsnt/src
112 %{_datadir}/pymsnt/src/*.py
113 %dir %{_datadir}/pymsnt
114 %{_datadir}/pymsnt/*.py
115 %dir %{_var}/lib/pymsnt
116 %dir %{_sysconfdir}/init.d/
117 %{_sysconfdir}/init.d/PyMSNt
118 %dir %{_sysconfdir}/jabber/
119 %{_sysconfdir}/jabber/PyMSNt.xml