]>
Commit | Line | Data |
---|---|---|
e697c636 | 1 | # |
2 | # TODO: | |
4646aa2a | 3 | # - goto and see workaround (!) |
e697c636 | 4 | # - summary and description (both), |
5 | # - data to /var/lib/ dir i think, | |
63bf010c | 6 | # - init scripts |
e697c636 | 7 | |
8 | Summary: Python MSN jabber transport | |
9 | Summary(pl.UTF-8): Python MSN jabber transport | |
10 | Name: PyMSNt | |
11 | Version: 0.12 | |
12 | Release: 0.1 | |
4646aa2a | 13 | Epoch: 1 |
e697c636 | 14 | License: GPL |
15 | Group: Libraries/Python | |
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 | |
63bf010c | 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 | |
e697c636 | 31 | BuildArch: noarch |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
35 | ||
36 | %description -l pl.UTF-8 | |
37 | ||
38 | %prep | |
39 | %setup -q -n pymsnt-snapshot | |
40 | ||
41 | %build | |
42 | ||
43 | %install | |
44 | rm -rf $RPM_BUILD_ROOT | |
45 | ||
4646aa2a | 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} | |
e697c636 | 48 | install src/twistfix/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/twistfix/ |
49 | install src/twistfix/words/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/twistfix/words/ | |
50 | install src/twistfix/words/xish/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/twistfix/words/xish/ | |
51 | install src/twistfix/words/protocols/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/twistfix/words/protocols/ | |
52 | install src/twistfix/words/protocols/jabber/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/twistfix/words/protocols/jabber/ | |
53 | install src/legacy/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/legacy/ | |
54 | install src/legacy/msn/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/legacy/msn/ | |
55 | install src/baseproto/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/baseproto/ | |
56 | install src/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/ | |
57 | install PyMSNt.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/ | |
58 | ||
4646aa2a | 59 | install %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/jabber/ |
60 | install %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/ | |
61 | ||
e697c636 | 62 | %clean |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
63bf010c | 65 | #ugly workaround (maybe fix in twisted words/xish package?) |
66 | %post | |
67 | ln -s %{py_sitescriptdir}/twisted/words/ %{py_sitedir}/twisted/words | |
68 | ln -s %{py_sitescriptdir}/twisted/xish/ %{py_sitedir}/twisted/xish | |
69 | ||
4646aa2a | 70 | if [ -f %{_sysconfdir}/jabber/secret ] ; then |
71 | SECRET=`cat %{_sysconfdir}/jabber/secret` | |
72 | if [ -n "$SECRET" ] ; then | |
73 | echo "Updating component authentication secret in PyMSNt.xml..." | |
74 | %{__sed} -i -e "s/>secret</>$SECRET</" /etc/jabber/PyMSNt.xml | |
75 | fi | |
76 | fi | |
77 | /sbin/chkconfig --add pyMSNt | |
78 | %service pyMSNt restart "Jabber MSN transport" | |
79 | ||
80 | %preun | |
81 | if [ "$1" = "0" ]; then | |
82 | %service pyMSNt stop | |
83 | /sbin/chkconfig --del pyMSNt | |
84 | fi | |
85 | ||
63bf010c | 86 | %postun |
87 | rm %{py_sitedir}/twisted/words/ | |
88 | rm %{py_sitedir}/twisted/xish/ | |
89 | ||
e697c636 | 90 | %files |
91 | %defattr(644,root,root,755) | |
92 | %doc README TODO docs | |
93 | %dir %{_datadir}/pymsnt/src/twistfix/ | |
94 | %{_datadir}/pymsnt/src/twistfix/*.py | |
95 | %dir %{_datadir}/pymsnt/src/twistfix/words/ | |
96 | %{_datadir}/pymsnt/src/twistfix/words/*.py | |
97 | %dir %{_datadir}/pymsnt/src/twistfix/words/xish/ | |
98 | %{_datadir}/pymsnt/src/twistfix/words/xish/*.py | |
99 | %dir %{_datadir}/pymsnt/src/twistfix/words/protocols/ | |
100 | %{_datadir}/pymsnt/src/twistfix/words/protocols/*.py | |
101 | %dir %{_datadir}/pymsnt/src/twistfix/words/protocols/jabber/ | |
102 | %{_datadir}/pymsnt/src/twistfix/words/protocols/jabber/*.py | |
103 | %dir %{_datadir}/pymsnt/src/legacy/ | |
104 | %{_datadir}/pymsnt/src/legacy/*.py | |
105 | %dir %{_datadir}/pymsnt/src/legacy/msn/ | |
106 | %{_datadir}/pymsnt/src/legacy/msn/*.py | |
107 | %dir %{_datadir}/pymsnt/src/baseproto/ | |
108 | %{_datadir}/pymsnt/src/baseproto/*.py | |
109 | %dir %{_datadir}/pymsnt/src | |
110 | %{_datadir}/pymsnt/src/*.py | |
111 | %dir %{_datadir}/pymsnt | |
112 | %{_datadir}/pymsnt/*.py | |
4646aa2a | 113 | %dir %{_var}/lib/pymsnt |