]> git.pld-linux.org Git - packages/PyMSNt.git/blob - PyMSNt.spec
- use functions
[packages/PyMSNt.git] / PyMSNt.spec
1 #
2 # TODO:
3 # - goto and see workaround (!)
4 # - summary and description (both),
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:        0.1
13 Epoch:          1
14 License:        GPL
15 Group:          Applications/Communications
16 Source0:        http://delx.cjb.net/pymsnt/tarballs/pymsnt-snapshot.tar.gz
17 # Source0-md5:  878a3df019c3e56b832feb751a4b4502
18 Source1:        %{name}-config.xml
19 Source2:        %{name}.init
20 URL:            http://delx.cjb.net/pymsnt/
21 BuildRequires:  python
22 BuildRequires:  rpm-pythonprov
23 BuildRequires:  rpmbuild(macros) >= 1.219
24 Requires:       python-Imaging
25 Requires:       python-Twisted
26 Requires:       python-Twisted-ssl
27 Requires:       python-TwistedWeb
28 Requires:       python-TwistedWords
29 Requires:       python-TwistedXish
30 Requires:       python-pyOpenSSL
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35
36 %prep
37 %setup -q -n pymsnt-snapshot
38
39 %install
40 rm -rf $RPM_BUILD_ROOT
41
42 install -d $RPM_BUILD_ROOT{%{_datadir}/pymsnt/src/{twistfix/words/{xish/,protocols/jabber/},legacy/msn/,baseproto/},%{_var}/lib/pymsnt}
43 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/jabber,/etc/rc.d/init.d}
44 install -d $RPM_BUILD_ROOT%{_datadir}/pymsnt/data
45 install src/twistfix/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix
46 install src/twistfix/words/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words
47 install src/twistfix/words/xish/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words/xish
48 install src/twistfix/words/protocols/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words/protocols
49 install src/twistfix/words/protocols/jabber/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/twistfix/words/protocols/jabber
50 install src/legacy/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/legacy
51 install src/legacy/msn/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/legacy/msn
52 install src/baseproto/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src/baseproto
53 install src/*.py $RPM_BUILD_ROOT%{_datadir}/pymsnt/src
54 install data/* $RPM_BUILD_ROOT%{_datadir}/pymsnt/data
55 install PyMSNt.py $RPM_BUILD_ROOT%{_datadir}/pymsnt
56
57 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/jabber/PyMSNt.xml
58 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/PyMSNt
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
63 # ugly workaround (maybe fix in twisted words/xish package?)
64 %post
65 ln -s %{py_sitescriptdir}/twisted/words %{py_sitedir}/twisted/words
66 ln -s %{py_sitescriptdir}/twisted/xish %{py_sitedir}/twisted/xish
67
68 if [ -f %{_sysconfdir}/jabber/secret ]; then
69         SECRET=`cat %{_sysconfdir}/jabber/secret`
70         if [ -n "$SECRET" ] ; then
71                 echo "Updating component authentication secret in PyMSNt.xml..."
72                 %{__sed} -i -e "s/>secret</>$SECRET</" /etc/jabber/PyMSNt.xml
73         fi
74 fi
75 /sbin/chkconfig --add PyMSNt
76 %service PyMSNt restart "Jabber MSN transport"
77
78 %preun
79 if [ "$1" = "0" ]; then
80         %service PyMSNt stop
81         /sbin/chkconfig --del PyMSNt
82 fi
83
84 %postun
85 echo "Cleaing ugly workaround (%{py_sitedir}/twisted/{words,xish})"
86 rm -f %{py_sitedir}/twisted/words
87 rm -f %{py_sitedir}/twisted/xish
88
89 %files
90 %defattr(644,root,root,755)
91 %doc README TODO docs
92 %dir %{_datadir}/pymsnt/src/twistfix/
93 %{_datadir}/pymsnt/src/twistfix/*.py
94 %dir %{_datadir}/pymsnt/src/twistfix/words/
95 %{_datadir}/pymsnt/src/twistfix/words/*.py
96 %dir %{_datadir}/pymsnt/src/twistfix/words/xish/
97 %{_datadir}/pymsnt/src/twistfix/words/xish/*.py
98 %dir %{_datadir}/pymsnt/src/twistfix/words/protocols/
99 %{_datadir}/pymsnt/src/twistfix/words/protocols/*.py
100 %dir %{_datadir}/pymsnt/src/twistfix/words/protocols/jabber/
101 %{_datadir}/pymsnt/src/twistfix/words/protocols/jabber/*.py
102 %dir %{_datadir}/pymsnt/src/legacy/
103 %{_datadir}/pymsnt/src/legacy/*.py
104 %dir %{_datadir}/pymsnt/src/legacy/msn/
105 %{_datadir}/pymsnt/src/legacy/msn/*.py
106 %dir %{_datadir}/pymsnt/src/baseproto/
107 %{_datadir}/pymsnt/src/baseproto/*.py
108 %dir %{_datadir}/pymsnt/src
109 %{_datadir}/pymsnt/src/*.py
110 %dir %{_datadir}/pymsnt/data/
111 %{_datadir}/pymsnt/data/*
112 %dir %{_datadir}/pymsnt
113 %attr(755,root,root) %{_datadir}/pymsnt/*.py
114 %dir %{_var}/lib/pymsnt
115 %attr(754,root,root) /etc/rc.d/init.d/PyMSNt
116 %attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/PyMSNt.xml
This page took 0.266617 seconds and 3 git commands to generate.