]> git.pld-linux.org Git - packages/PyMSNt.git/blob - PyMSNt.spec
92c17921d8703b60f573021e7494a4f4a6abd518
[packages/PyMSNt.git] / PyMSNt.spec
1 #
2 # TODO:
3 # - goto and see workaround (!)
4 # - real descriptions
5 # ATTENTION! ACHTUNG!
6 # - SNAPSHOT VERSION!
7
8 Summary:        Python MSN Jabber transport
9 Summary(pl.UTF-8):      Transport MSN dla Jabbera napisany w Pythonie
10 Name:           PyMSNt
11 Version:        0.11.3
12 Release:        2
13 Epoch:          1
14 License:        GPL v2
15 Group:          Applications/Communications
16 Source0:        http://delx.net.au/projects/pymsnt/tarballs/pymsnt-%{version}.tar.gz
17 # Source0-md5:  e74049fb1bfae59846b1be3d4ef80299
18 Source1:        %{name}-config.xml
19 Source2:        %{name}.init
20 Patch0:         %{name}-protocolver.patch
21 URL:            http://delx.cjb.net/pymsnt/
22 BuildRequires:  python
23 BuildRequires:  rpm-pythonprov
24 BuildRequires:  rpmbuild(macros) >= 1.219
25 Requires:       python-PIL
26 Requires:       python-TwistedCore
27 Requires:       python-TwistedCore-ssl
28 Requires:       python-TwistedWeb
29 Requires:       python-TwistedWords
30 Requires:       python-pyOpenSSL
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 Python MSN Jabber transport.
36
37 %description -l pl.UTF-8
38 Transport MSN dla Jabbera napisany w Pythonie.
39
40 %prep
41 %setup -q -n pymsnt-%{version}
42 %patch0 -p0
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46
47 install -d $RPM_BUILD_ROOT{%{_datadir}/pymsnt/src/{twistfix/words/{xish,protocols/jabber},legacy/msn,baseproto},%{_var}/lib/pymsnt}
48 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/jabber,/etc/rc.d/init.d}
49 install -d $RPM_BUILD_ROOT%{_datadir}/pymsnt/data
50 install src/twistfix/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix
51 install src/twistfix/words/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words
52 install src/twistfix/words/xish/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words/xish
53 install src/twistfix/words/protocols/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words/protocols
54 install src/twistfix/words/protocols/jabber/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words/protocols/jabber
55 install src/legacy/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/legacy
56 install src/legacy/msn/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/legacy/msn
57 install src/baseproto/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/baseproto
58 install src/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src
59 install data/* $RPM_BUILD_ROOT%{_datadir}/pymsnt/data
60 install PyMSNt.py $RPM_BUILD_ROOT%{_datadir}/pymsnt
61
62 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/jabber/PyMSNt.xml
63 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/PyMSNt
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %post
69 # ugly workaround (FIX it here or in twisted words/xish packages)
70 #ln -s %{py_sitescriptdir}/twisted/words %{py_sitedir}/twisted/words
71 #ln -s %{py_sitescriptdir}/twisted/xish %{py_sitedir}/twisted/xish
72
73 if [ -f %{_sysconfdir}/jabber/secret ]; then
74         SECRET=`cat %{_sysconfdir}/jabber/secret`
75         if [ -n "$SECRET" ] ; then
76                 echo "Updating component authentication secret in PyMSNt.xml..."
77                 %{__sed} -i -e "s/>secret</>$SECRET</" /etc/jabber/PyMSNt.xml
78         fi
79 fi
80 /sbin/chkconfig --add PyMSNt
81 %service PyMSNt restart "Jabber MSN transport"
82
83 %preun
84 if [ "$1" = "0" ]; then
85         %service PyMSNt stop
86         /sbin/chkconfig --del PyMSNt
87 fi
88
89 #%postun
90 #echo "Cleaing ugly workaround (%{py_sitedir}/twisted/{words,xish})"
91 #rm -f %{py_sitedir}/twisted/words
92 #rm -f %{py_sitedir}/twisted/xish
93
94 %files
95 %defattr(644,root,root,755)
96 %doc README TODO docs
97 %dir %{_datadir}/pymsnt/src/twistfix
98 %{_datadir}/pymsnt/src/twistfix/*.py
99 %dir %{_datadir}/pymsnt/src/twistfix/words
100 %{_datadir}/pymsnt/src/twistfix/words/*.py
101 %dir %{_datadir}/pymsnt/src/twistfix/words/xish
102 %{_datadir}/pymsnt/src/twistfix/words/xish/*.py
103 %dir %{_datadir}/pymsnt/src/twistfix/words/protocols
104 %{_datadir}/pymsnt/src/twistfix/words/protocols/*.py
105 %dir %{_datadir}/pymsnt/src/twistfix/words/protocols/jabber
106 %{_datadir}/pymsnt/src/twistfix/words/protocols/jabber/*.py
107 %dir %{_datadir}/pymsnt/src/legacy
108 %{_datadir}/pymsnt/src/legacy/*.py
109 %dir %{_datadir}/pymsnt/src/legacy/msn
110 %{_datadir}/pymsnt/src/legacy/msn/*.py
111 %dir %{_datadir}/pymsnt/src/baseproto
112 %{_datadir}/pymsnt/src/baseproto/*.py
113 %dir %{_datadir}/pymsnt/src
114 %{_datadir}/pymsnt/src/*.py
115 %dir %{_datadir}/pymsnt/data
116 %{_datadir}/pymsnt/data/*
117 %dir %{_datadir}/pymsnt
118 %attr(755,root,root) %{_datadir}/pymsnt/*.py
119 %dir %{_var}/lib/pymsnt
120 %attr(754,root,root) /etc/rc.d/init.d/PyMSNt
121 %attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/PyMSNt.xml
This page took 0.630522 seconds and 2 git commands to generate.