SPECS: PyMSNt.spec - temporary save,

djrzulf djrzulf at pld-linux.org
Sat Aug 18 22:08:48 CEST 2007


Author: djrzulf                      Date: Sat Aug 18 20:08:48 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- temporary save,

---- Files affected:
SPECS:
   PyMSNt.spec (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SPECS/PyMSNt.spec
diff -u SPECS/PyMSNt.spec:1.2 SPECS/PyMSNt.spec:1.3
--- SPECS/PyMSNt.spec:1.2	Sat Aug 18 21:42:50 2007
+++ SPECS/PyMSNt.spec	Sat Aug 18 22:08:43 2007
@@ -1,7 +1,7 @@
 # $Revision$, $Date$
 #
 # TODO:
-# - make it work (create good dependences) (see workaround)
+# - goto and see workaround (!)
 # - summary and description (both),
 # - data to /var/lib/ dir i think,
 # - init scripts
@@ -11,10 +11,13 @@
 Name:		PyMSNt
 Version:	0.12
 Release:	0.1
+Epoch:		1
 License:	GPL
 Group:		Libraries/Python
 Source0:	http://delx.cjb.net/pymsnt/tarballs/pymsnt-snapshot.tar.gz
 # Source0-md5:	878a3df019c3e56b832feb751a4b4502
+Source1:	%{name}-config.xml
+Source2:	%{name}.init
 URL:		http://delx.cjb.net/pymsnt/
 BuildRequires:	python
 BuildRequires:	rpm-pythonprov
@@ -41,8 +44,8 @@
 %install
 rm -rf $RPM_BUILD_ROOT
 
-install -d $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/{twistfix/words/{xish/,protocols/jabber/},legacy/msn/,baseproto/}
-
+install -d $RPM_BUILD_ROOT/{%{_datadir}/pymsnt/src/{twistfix/words/{xish/,protocols/jabber/},legacy/msn/,baseproto/},%{_var}/lib/pymsnt}
+install -d $RPM_BUILD_ROOT/%{_sysconfdir}/{jabber,init.d}
 install src/twistfix/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/twistfix/
 install src/twistfix/words/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/twistfix/words/
 install src/twistfix/words/xish/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/twistfix/words/xish/
@@ -54,6 +57,9 @@
 install src/*.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/src/
 install PyMSNt.py $RPM_BUILD_ROOT/%{_datadir}/pymsnt/
 
+install %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/jabber/
+install %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -62,6 +68,22 @@
 ln -s %{py_sitescriptdir}/twisted/words/ %{py_sitedir}/twisted/words
 ln -s %{py_sitescriptdir}/twisted/xish/ %{py_sitedir}/twisted/xish
 
+if [ -f %{_sysconfdir}/jabber/secret ] ; then
+        SECRET=`cat %{_sysconfdir}/jabber/secret`
+        if [ -n "$SECRET" ] ; then
+                echo "Updating component authentication secret in PyMSNt.xml..."
+                %{__sed} -i -e "s/>secret</>$SECRET</" /etc/jabber/PyMSNt.xml
+        fi
+fi
+/sbin/chkconfig --add pyMSNt
+%service pyMSNt restart "Jabber MSN transport"
+
+%preun
+if [ "$1" = "0" ]; then
+        %service pyMSNt stop
+        /sbin/chkconfig --del pyMSNt
+fi
+
 %postun
 rm %{py_sitedir}/twisted/words/
 rm %{py_sitedir}/twisted/xish/
@@ -89,6 +111,7 @@
 %{_datadir}/pymsnt/src/*.py
 %dir %{_datadir}/pymsnt
 %{_datadir}/pymsnt/*.py
+%dir %{_var}/lib/pymsnt
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -96,6 +119,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.3  2007/08/18 20:08:43  djrzulf
+- temporary save,
+
 Revision 1.2  2007/08/18 19:42:50  djrzulf
 - updated,
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/PyMSNt.spec?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list