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