]>
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 |
079dec45 | 12 | Release: 0.2 |
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 | |
079dec45 MŁ |
23 | Requires: python-PIL |
24 | Requires: python-TwistedCore | |
25 | Requires: python-TwistedCore-ssl | |
25ce68ea | 26 | Requires: python-TwistedWeb |
079dec45 | 27 | Requires: python-TwistedWords >= 8.0.0 |
06e64029 | 28 | Requires: python-pyOpenSSL |
25ce68ea | 29 | BuildArch: noarch |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %description | |
60aa68f6 | 33 | Python ICQ Jabber transport. |
25ce68ea | 34 | |
35 | %description -l pl.UTF-8 | |
60aa68f6 | 36 | Transport ICQ dla Jabbera napisany w Pythonie. |
25ce68ea | 37 | |
38 | %prep | |
39 | %setup -q -n pyicq-t-%{version} | |
40 | ||
25ce68ea | 41 | %install |
42 | rm -rf $RPM_BUILD_ROOT | |
60aa68f6 | 43 | 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 |
44 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/jabber,/etc/rc.d/init.d} |
45 | install -d $RPM_BUILD_ROOT%{_datadir}/pyicqt/data/www/{css,images} | |
06e64029 ER |
46 | install src/twistfix/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/twistfix |
47 | install src/twistfix/words/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/twistfix/words | |
48 | install src/twistfix/words/xish/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/twistfix/words/xish | |
49 | install src/twistfix/words/protocols/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/twistfix/words/protocols | |
50 | install src/twistfix/words/protocols/jabber/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/twistfix/words/protocols/jabber | |
51 | install src/legacy/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/legacy | |
52 | install src/legacy/services/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/legacy/services | |
53 | install src/langs/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/langs | |
54 | install src/tlib/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/tlib | |
55 | install src/services/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/services | |
56 | install src/xdb/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/xdb | |
57 | install src/web/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src/web | |
58 | install src/*.py $RPM_BUILD_ROOT%{_datadir}/pyicqt/src | |
59 | install data/www/css/*.css $RPM_BUILD_ROOT%{_datadir}/pyicqt/data/www/css | |
60 | install data/www/images/*.png $RPM_BUILD_ROOT%{_datadir}/pyicqt/data/www/images | |
61 | install data/www/*.html $RPM_BUILD_ROOT%{_datadir}/pyicqt/data/www | |
62 | install data/*.png $RPM_BUILD_ROOT%{_datadir}/pyicqt/data | |
63 | install PyICQt.py $RPM_BUILD_ROOT%{_datadir}/pyicqt | |
25ce68ea | 64 | |
06e64029 ER |
65 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/jabber/PyICQt.xml |
66 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/PyICQt | |
25ce68ea | 67 | |
68 | %clean | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | ||
25ce68ea | 71 | %post |
5cae0a27 MŁ |
72 | |
73 | %if %{with ugly} | |
60aa68f6 | 74 | #ugly workaround (FIX this or twisted words/xish package to work without hacks) |
5cae0a27 MŁ |
75 | ln -s %{py_sitescriptdir}/twisted/words/ %{py_sitedir}/twisted/words |
76 | ln -s %{py_sitescriptdir}/twisted/xish/ %{py_sitedir}/twisted/xish | |
77 | %endif | |
25ce68ea | 78 | |
79 | if [ -f %{_sysconfdir}/jabber/secret ] ; then | |
06e64029 ER |
80 | SECRET=`cat %{_sysconfdir}/jabber/secret` |
81 | if [ -n "$SECRET" ] ; then | |
82 | echo "Updating component authentication secret in PyICQt.xml..." | |
83 | %{__sed} -i -e "s/>secret</>$SECRET</" /etc/jabber/PyICQt.xml | |
84 | fi | |
25ce68ea | 85 | fi |
86 | /sbin/chkconfig --add PyICQt | |
87 | %service PyICQt restart "Jabber ICQ transport" | |
88 | ||
89 | %preun | |
90 | if [ "$1" = "0" ]; then | |
06e64029 ER |
91 | %service PyICQt stop |
92 | /sbin/chkconfig --del PyICQt | |
25ce68ea | 93 | fi |
94 | ||
5cae0a27 MŁ |
95 | %postun |
96 | %if %{with ugly} | |
97 | echo "Cleaning ugly workaround (%{py_sitedir}/twisted/{words,xish})" | |
98 | rm -f %{py_sitedir}/twisted/words | |
99 | rm -f %{py_sitedir}/twisted/xish | |
100 | %endif | |
25ce68ea | 101 | |
102 | %files | |
103 | %defattr(644,root,root,755) | |
104 | %doc README NEWS AUTHORS ChangeLog | |
06e64029 | 105 | %dir %{_datadir}/pyicqt/src/twistfix |
25ce68ea | 106 | %{_datadir}/pyicqt/src/twistfix/*.py |
06e64029 | 107 | %dir %{_datadir}/pyicqt/src/twistfix/words |
25ce68ea | 108 | %{_datadir}/pyicqt/src/twistfix/words/*.py |
06e64029 | 109 | %dir %{_datadir}/pyicqt/src/twistfix/words/xish |
25ce68ea | 110 | %{_datadir}/pyicqt/src/twistfix/words/xish/*.py |
06e64029 | 111 | %dir %{_datadir}/pyicqt/src/twistfix/words/protocols |
25ce68ea | 112 | %{_datadir}/pyicqt/src/twistfix/words/protocols/*.py |
06e64029 | 113 | %dir %{_datadir}/pyicqt/src/twistfix/words/protocols/jabber |
25ce68ea | 114 | %{_datadir}/pyicqt/src/twistfix/words/protocols/jabber/*.py |
06e64029 | 115 | %dir %{_datadir}/pyicqt/src/legacy |
25ce68ea | 116 | %{_datadir}/pyicqt/src/legacy/*.py |
06e64029 | 117 | %dir %{_datadir}/pyicqt/src/legacy/services |
25ce68ea | 118 | %{_datadir}/pyicqt/src/legacy/services/*.py |
06e64029 | 119 | %dir %{_datadir}/pyicqt/src/langs |
25ce68ea | 120 | %{_datadir}/pyicqt/src/langs/*.py |
06e64029 | 121 | %dir %{_datadir}/pyicqt/src/tlib |
25ce68ea | 122 | %{_datadir}/pyicqt/src/tlib/*.py |
06e64029 | 123 | %dir %{_datadir}/pyicqt/src/services |
25ce68ea | 124 | %{_datadir}/pyicqt/src/services/*.py |
06e64029 | 125 | %dir %{_datadir}/pyicqt/src/xdb |
25ce68ea | 126 | %{_datadir}/pyicqt/src/xdb/*.py |
06e64029 | 127 | %dir %{_datadir}/pyicqt/src/web |
25ce68ea | 128 | %{_datadir}/pyicqt/src/web/*.py |
129 | %dir %{_datadir}/pyicqt/src | |
130 | %{_datadir}/pyicqt/src/*.py | |
06e64029 | 131 | %dir %{_datadir}/pyicqt/data/www/images |
25ce68ea | 132 | %{_datadir}/pyicqt/data/www/images/*.png |
06e64029 | 133 | %dir %{_datadir}/pyicqt/data/www/css |
25ce68ea | 134 | %{_datadir}/pyicqt/data/www/css/*.css |
06e64029 | 135 | %dir %{_datadir}/pyicqt/data/www |
25ce68ea | 136 | %{_datadir}/pyicqt/data/www/*.html |
06e64029 | 137 | %dir %{_datadir}/pyicqt/data |
25ce68ea | 138 | %{_datadir}/pyicqt/data/*.png |
139 | %dir %{_datadir}/pyicqt | |
140 | %attr(755,root,root) %{_datadir}/pyicqt/*.py | |
141 | %dir %{_var}/lib/pyicqt | |
06e64029 | 142 | %attr(754,root,root) /etc/rc.d/init.d/PyICQt |
4ade5edb | 143 | %attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/PyICQt.xml |