]>
Commit | Line | Data |
---|---|---|
e697c636 | 1 | # |
2 | # TODO: | |
4646aa2a | 3 | # - goto and see workaround (!) |
e697c636 | 4 | # - summary and description (both), |
100a449a | 5 | # ATTENTION! ACHTUNG! |
4e2bf44f | 6 | # - SNAPSHOT VERSION! |
e697c636 | 7 | |
8 | Summary: Python MSN jabber transport | |
e1d9f758 | 9 | Summary(pl.UTF-8): Transport MSN dla jabbera napisany w pythonie |
e697c636 | 10 | Name: PyMSNt |
71c8d932 | 11 | Version: 0.11.3 |
e697c636 | 12 | Release: 0.1 |
4646aa2a | 13 | Epoch: 1 |
e697c636 | 14 | License: GPL |
9c076029 | 15 | Group: Applications/Communications |
e697c636 | 16 | Source0: http://delx.cjb.net/pymsnt/tarballs/pymsnt-snapshot.tar.gz |
17 | # Source0-md5: 878a3df019c3e56b832feb751a4b4502 | |
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 | |
35 | ||
e697c636 | 36 | %prep |
37 | %setup -q -n pymsnt-snapshot | |
38 | ||
e697c636 | 39 | %install |
40 | rm -rf $RPM_BUILD_ROOT | |
41 | ||
54c7fb66 ER |
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 | |
e697c636 | 56 | |
b450d60f ER |
57 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/jabber/PyMSNt.xml |
58 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/PyMSNt | |
4646aa2a | 59 | |
e697c636 | 60 | %clean |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
54c7fb66 | 63 | # ugly workaround (maybe fix in twisted words/xish package?) |
63bf010c | 64 | %post |
54c7fb66 ER |
65 | ln -s %{py_sitescriptdir}/twisted/words %{py_sitedir}/twisted/words |
66 | ln -s %{py_sitescriptdir}/twisted/xish %{py_sitedir}/twisted/xish | |
63bf010c | 67 | |
54c7fb66 ER |
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 | |
73 | fi | |
4646aa2a | 74 | fi |
4e2bf44f | 75 | /sbin/chkconfig --add PyMSNt |
76 | %service PyMSNt restart "Jabber MSN transport" | |
4646aa2a | 77 | |
78 | %preun | |
79 | if [ "$1" = "0" ]; then | |
54c7fb66 ER |
80 | %service PyMSNt stop |
81 | /sbin/chkconfig --del PyMSNt | |
4646aa2a | 82 | fi |
83 | ||
63bf010c | 84 | %postun |
aeaf816d | 85 | echo "Cleaing ugly workaround (%{py_sitedir}/twisted/{words,xish})" |
86 | rm -f %{py_sitedir}/twisted/words | |
87 | rm -f %{py_sitedir}/twisted/xish | |
63bf010c | 88 | |
e697c636 | 89 | %files |
90 | %defattr(644,root,root,755) | |
91 | %doc README TODO docs | |
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 | |
aeaf816d | 110 | %dir %{_datadir}/pymsnt/data/ |
111 | %{_datadir}/pymsnt/data/* | |
e697c636 | 112 | %dir %{_datadir}/pymsnt |
aeaf816d | 113 | %attr(755,root,root) %{_datadir}/pymsnt/*.py |
4646aa2a | 114 | %dir %{_var}/lib/pymsnt |
54c7fb66 | 115 | %attr(754,root,root) /etc/rc.d/init.d/PyMSNt |
8ba2f93e | 116 | %attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/PyMSNt.xml |