]> git.pld-linux.org Git - packages/PyMSNt.git/blob - PyMSNt.spec
- add patch0
[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:        1
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-Imaging
26 Requires:       python-Twisted
27 Requires:       python-Twisted-ssl
28 Requires:       python-TwistedWeb
29 Requires:       python-TwistedWords
30 Requires:       python-TwistedXish
31 Requires:       python-pyOpenSSL
32 BuildArch:      noarch
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 Python MSN Jabber transport.
37
38 %description -l pl.UTF-8
39 Transport MSN dla Jabbera napisany w Pythonie.
40
41 %prep
42 %setup -q -n pymsnt-%{version}
43 %patch0 -p0
44
45 %install
46 rm -rf $RPM_BUILD_ROOT
47
48 install -d $RPM_BUILD_ROOT{%{_datadir}/pymsnt/src/{twistfix/words/{xish,protocols/jabber},legacy/msn,baseproto},%{_var}/lib/pymsnt}
49 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/jabber,/etc/rc.d/init.d}
50 install -d $RPM_BUILD_ROOT%{_datadir}/pymsnt/data
51 install src/twistfix/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix
52 install src/twistfix/words/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words
53 install src/twistfix/words/xish/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words/xish
54 install src/twistfix/words/protocols/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words/protocols
55 install src/twistfix/words/protocols/jabber/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words/protocols/jabber
56 install src/legacy/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/legacy
57 install src/legacy/msn/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/legacy/msn
58 install src/baseproto/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/baseproto
59 install src/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src
60 install data/* $RPM_BUILD_ROOT%{_datadir}/pymsnt/data
61 install PyMSNt.py $RPM_BUILD_ROOT%{_datadir}/pymsnt
62
63 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/jabber/PyMSNt.xml
64 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/PyMSNt
65
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69 %post
70 # ugly workaround (FIX it here or in twisted words/xish packages)
71 #ln -s %{py_sitescriptdir}/twisted/words %{py_sitedir}/twisted/words
72 #ln -s %{py_sitescriptdir}/twisted/xish %{py_sitedir}/twisted/xish
73
74 if [ -f %{_sysconfdir}/jabber/secret ]; then
75         SECRET=`cat %{_sysconfdir}/jabber/secret`
76         if [ -n "$SECRET" ] ; then
77                 echo "Updating component authentication secret in PyMSNt.xml..."
78                 %{__sed} -i -e "s/>secret</>$SECRET</" /etc/jabber/PyMSNt.xml
79         fi
80 fi
81 /sbin/chkconfig --add PyMSNt
82 %service PyMSNt restart "Jabber MSN transport"
83
84 %preun
85 if [ "$1" = "0" ]; then
86         %service PyMSNt stop
87         /sbin/chkconfig --del PyMSNt
88 fi
89
90 #%postun
91 #echo "Cleaing ugly workaround (%{py_sitedir}/twisted/{words,xish})"
92 #rm -f %{py_sitedir}/twisted/words
93 #rm -f %{py_sitedir}/twisted/xish
94
95 %files
96 %defattr(644,root,root,755)
97 %doc README TODO docs
98 %dir %{_datadir}/pymsnt/src/twistfix
99 %{_datadir}/pymsnt/src/twistfix/*.py
100 %dir %{_datadir}/pymsnt/src/twistfix/words
101 %{_datadir}/pymsnt/src/twistfix/words/*.py
102 %dir %{_datadir}/pymsnt/src/twistfix/words/xish
103 %{_datadir}/pymsnt/src/twistfix/words/xish/*.py
104 %dir %{_datadir}/pymsnt/src/twistfix/words/protocols
105 %{_datadir}/pymsnt/src/twistfix/words/protocols/*.py
106 %dir %{_datadir}/pymsnt/src/twistfix/words/protocols/jabber
107 %{_datadir}/pymsnt/src/twistfix/words/protocols/jabber/*.py
108 %dir %{_datadir}/pymsnt/src/legacy
109 %{_datadir}/pymsnt/src/legacy/*.py
110 %dir %{_datadir}/pymsnt/src/legacy/msn
111 %{_datadir}/pymsnt/src/legacy/msn/*.py
112 %dir %{_datadir}/pymsnt/src/baseproto
113 %{_datadir}/pymsnt/src/baseproto/*.py
114 %dir %{_datadir}/pymsnt/src
115 %{_datadir}/pymsnt/src/*.py
116 %dir %{_datadir}/pymsnt/data
117 %{_datadir}/pymsnt/data/*
118 %dir %{_datadir}/pymsnt
119 %attr(755,root,root) %{_datadir}/pymsnt/*.py
120 %dir %{_var}/lib/pymsnt
121 %attr(754,root,root) /etc/rc.d/init.d/PyMSNt
122 %attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/PyMSNt.xml
This page took 0.072898 seconds and 3 git commands to generate.