]>
Commit | Line | Data |
---|---|---|
25ce68ea | 1 | # |
2 | # TODO: | |
4ade5edb | 3 | # - i suppose that workaround for python Twisted is also needed - goto workaround and think about it |
4 | # - description (both), | |
25ce68ea | 5 | |
5cae0a27 MŁ |
6 | %bcond_with ugly # enable ugly workaround for python Twisted (see above) |
7 | ||
60aa68f6 JB |
8 | Summary: Python ICQ Jabber transport |
9 | Summary(pl.UTF-8): Transport ICQ dla Jabbera napisany w Pythonie | |
25ce68ea | 10 | Name: PyICQt |
5cae0a27 | 11 | Version: 0.8b |
25ce68ea | 12 | Release: 0.1 |
60aa68f6 | 13 | License: GPL v2 |
25ce68ea | 14 | Group: Applications/Communications |
5cae0a27 MŁ |
15 | Source0: http://pyicqt.googlecode.com/files/pyicq-t-%{version}.tar.gz |
16 | # Source0-md5: 961952be1f88d0b97bc7cc36c75d1215 | |
4ade5edb | 17 | Source1: %{name}-config.xml |
18 | Source2: %{name}.init | |
25ce68ea | 19 | URL: http://www.blathersource.org/ |
20 | BuildRequires: python | |
21 | BuildRequires: rpm-pythonprov | |
22 | BuildRequires: rpmbuild(macros) >= 1.219 | |
06e64029 | 23 | Requires: python-Imaging |
25ce68ea | 24 | Requires: python-Twisted |
25 | Requires: python-Twisted-ssl | |
25ce68ea | 26 | Requires: python-TwistedWeb |
06e64029 | 27 | Requires: python-TwistedWords |
25ce68ea | 28 | Requires: python-TwistedXish |
06e64029 | 29 | Requires: python-pyOpenSSL |
25ce68ea | 30 | BuildArch: noarch |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
33 | %description | |
60aa68f6 | 34 | Python ICQ Jabber transport. |
25ce68ea | 35 | |
36 | %description -l pl.UTF-8 | |
60aa68f6 | 37 | Transport ICQ dla Jabbera napisany w Pythonie. |
25ce68ea | 38 | |
39 | %prep | |
40 | %setup -q -n pyicq-t-%{version} | |
41 | ||
25ce68ea | 42 | %install |
43 | rm -rf $RPM_BUILD_ROOT | |
60aa68f6 | 44 | install -d $RPM_BUILD_ROOT{%{_datadir}/pyicqt/src/{twistfix/words/{xish,protocols/jabber},legacy/services,langs,tlib,services,xdb,web},%{_var}/lib/pyicqt} |
06e64029 ER |
45 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/jabber,/etc/rc.d/init.d} |
46 | install -d $RPM_BUILD_ROOT%{_datadir}/pyicqt/data/www/{css,images} | |
06e64029 ER |
47 | install src/twistfix/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/twistfix |
48 | install src/twistfix/words/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/twistfix/words | |
49 | install src/twistfix/words/xish/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/twistfix/words/xish | |
50 | install src/twistfix/words/protocols/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/twistfix/words/protocols | |
51 | install src/twistfix/words/protocols/jabber/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/twistfix/words/protocols/jabber | |
52 | install src/legacy/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/legacy | |
53 | install src/legacy/services/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/legacy/services | |
54 | install src/langs/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/langs | |
55 | install src/tlib/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/tlib | |
56 | install src/services/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/services | |
57 | install src/xdb/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/xdb | |
58 | install src/web/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/web | |
59 | install src/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src | |
60 | install data/www/css/*.css $RPM_BUILD_ROOT%{_datadir}/pyicqt/data/www/css | |
61 | install data/www/images/*.png $RPM_BUILD_ROOT%{_datadir}/pyicqt/data/www/images | |
62 | install data/www/*.html $RPM_BUILD_ROOT%{_datadir}/pyicqt/data/www | |
63 | install data/*.png $RPM_BUILD_ROOT%{_datadir}/pyicqt/data | |
64 | install PyICQt.py $RPM_BUILD_ROOT%{_datadir}/pyicqt | |
25ce68ea | 65 | |
06e64029 ER |
66 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/jabber/PyICQt.xml |
67 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/PyICQt | |
25ce68ea | 68 | |
69 | %clean | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
25ce68ea | 72 | %post |
5cae0a27 MŁ |
73 | |
74 | %if %{with ugly} | |
60aa68f6 | 75 | #ugly workaround (FIX this or twisted words/xish package to work without hacks) |
5cae0a27 MŁ |
76 | ln -s %{py_sitescriptdir}/twisted/words/ %{py_sitedir}/twisted/words |
77 | ln -s %{py_sitescriptdir}/twisted/xish/ %{py_sitedir}/twisted/xish | |
78 | %endif | |
25ce68ea | 79 | |
80 | if [ -f %{_sysconfdir}/jabber/secret ] ; then | |
06e64029 ER |
81 | SECRET=`cat %{_sysconfdir}/jabber/secret` |
82 | if [ -n "$SECRET" ] ; then | |
83 | echo "Updating component authentication secret in PyICQt.xml..." | |
84 | %{__sed} -i -e "s/>secret</>$SECRET</" /etc/jabber/PyICQt.xml | |
85 | fi | |
25ce68ea | 86 | fi |
87 | /sbin/chkconfig --add PyICQt | |
88 | %service PyICQt restart "Jabber ICQ transport" | |
89 | ||
90 | %preun | |
91 | if [ "$1" = "0" ]; then | |
06e64029 ER |
92 | %service PyICQt stop |
93 | /sbin/chkconfig --del PyICQt | |
25ce68ea | 94 | fi |
95 | ||
5cae0a27 MŁ |
96 | %postun |
97 | %if %{with ugly} | |
98 | echo "Cleaning ugly workaround (%{py_sitedir}/twisted/{words,xish})" | |
99 | rm -f %{py_sitedir}/twisted/words | |
100 | rm -f %{py_sitedir}/twisted/xish | |
101 | %endif | |
25ce68ea | 102 | |
103 | %files | |
104 | %defattr(644,root,root,755) | |
105 | %doc README NEWS AUTHORS ChangeLog | |
06e64029 | 106 | %dir %{_datadir}/pyicqt/src/twistfix |
25ce68ea | 107 | %{_datadir}/pyicqt/src/twistfix/*.py |
06e64029 | 108 | %dir %{_datadir}/pyicqt/src/twistfix/words |
25ce68ea | 109 | %{_datadir}/pyicqt/src/twistfix/words/*.py |
06e64029 | 110 | %dir %{_datadir}/pyicqt/src/twistfix/words/xish |
25ce68ea | 111 | %{_datadir}/pyicqt/src/twistfix/words/xish/*.py |
06e64029 | 112 | %dir %{_datadir}/pyicqt/src/twistfix/words/protocols |
25ce68ea | 113 | %{_datadir}/pyicqt/src/twistfix/words/protocols/*.py |
06e64029 | 114 | %dir %{_datadir}/pyicqt/src/twistfix/words/protocols/jabber |
25ce68ea | 115 | %{_datadir}/pyicqt/src/twistfix/words/protocols/jabber/*.py |
06e64029 | 116 | %dir %{_datadir}/pyicqt/src/legacy |
25ce68ea | 117 | %{_datadir}/pyicqt/src/legacy/*.py |
06e64029 | 118 | %dir %{_datadir}/pyicqt/src/legacy/services |
25ce68ea | 119 | %{_datadir}/pyicqt/src/legacy/services/*.py |
06e64029 | 120 | %dir %{_datadir}/pyicqt/src/langs |
25ce68ea | 121 | %{_datadir}/pyicqt/src/langs/*.py |
06e64029 | 122 | %dir %{_datadir}/pyicqt/src/tlib |
25ce68ea | 123 | %{_datadir}/pyicqt/src/tlib/*.py |
06e64029 | 124 | %dir %{_datadir}/pyicqt/src/services |
25ce68ea | 125 | %{_datadir}/pyicqt/src/services/*.py |
06e64029 | 126 | %dir %{_datadir}/pyicqt/src/xdb |
25ce68ea | 127 | %{_datadir}/pyicqt/src/xdb/*.py |
06e64029 | 128 | %dir %{_datadir}/pyicqt/src/web |
25ce68ea | 129 | %{_datadir}/pyicqt/src/web/*.py |
130 | %dir %{_datadir}/pyicqt/src | |
131 | %{_datadir}/pyicqt/src/*.py | |
06e64029 | 132 | %dir %{_datadir}/pyicqt/data/www/images |
25ce68ea | 133 | %{_datadir}/pyicqt/data/www/images/*.png |
06e64029 | 134 | %dir %{_datadir}/pyicqt/data/www/css |
25ce68ea | 135 | %{_datadir}/pyicqt/data/www/css/*.css |
06e64029 | 136 | %dir %{_datadir}/pyicqt/data/www |
25ce68ea | 137 | %{_datadir}/pyicqt/data/www/*.html |
06e64029 | 138 | %dir %{_datadir}/pyicqt/data |
25ce68ea | 139 | %{_datadir}/pyicqt/data/*.png |
140 | %dir %{_datadir}/pyicqt | |
141 | %attr(755,root,root) %{_datadir}/pyicqt/*.py | |
142 | %dir %{_var}/lib/pyicqt | |
06e64029 | 143 | %attr(754,root,root) /etc/rc.d/init.d/PyICQt |
4ade5edb | 144 | %attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/PyICQt.xml |