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