packages: emesene/emesene.spec, emesene/setup-install.patch (NEW) - build u...

glen glen at pld-linux.org
Sun Mar 21 11:33:47 CET 2010


Author: glen                         Date: Sun Mar 21 10:33:47 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- build using python install, no matter what developer thinks

---- Files affected:
packages/emesene:
   emesene.spec (1.4 -> 1.5) , setup-install.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/emesene/emesene.spec
diff -u packages/emesene/emesene.spec:1.4 packages/emesene/emesene.spec:1.5
--- packages/emesene/emesene.spec:1.4	Sun Mar 21 09:44:48 2010
+++ packages/emesene/emesene.spec	Sun Mar 21 11:33:41 2010
@@ -1,19 +1,18 @@
 # $Revision$, $Date$
-# TODO
-# - locales to glibc dirs
-# - make py[co] and install to python dir
 Summary:	Instant messaging client for Windows Live Messenger (tm) network
 Name:		emesene
 Version:	1.6
-Release:	0.8
+Release:	0.15
 License:	GPL v2+
 Group:		Applications/Networking
 URL:		http://www.emesene.org/
 Source0:	http://downloads.sourceforge.net/project/emesene/%{name}-%{version}/emesene-%{version}.tar.gz
 # Source0-md5:	ea4d3f4097265daac6823d8288979d02
-Patch0:		%{name}-deskop.patch
+Patch0:		%{name}-desktop.patch
+Patch1:		setup-install.patch
 BuildRequires:	gettext
 BuildRequires:	python-devel
+BuildRequires:	rpmbuild(macros) >= 1.219
 Requires:	alsa-utils
 Requires:	gtk+2
 Requires:	python
@@ -41,6 +40,7 @@
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 cat <<'EOF' > emesene.sh
 #!/bin/sh
@@ -50,27 +50,30 @@
 # fix #!%{_bindir}/env python -> #!%{__python}:
 %{__sed} -i -e '1s,^#!.*python,#!%{__python},' emesene Controller.py
 
+# po/nb already exists, so just rm
+rm -r po/nb_NO
+
 %build
 %{__python} setup.py build_ext -i
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/%{name},%{_datadir}/%{name},%{_desktopdir},%{_pixmapsdir}}
+install -d $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_libdir}/%{name}}
 
-cp -a *.py hotmlog.htm *.png $RPM_BUILD_ROOT%{_datadir}/%{name}
-cp -a abstract conversation_themes emesenelib plugins_base po smilies sound_themes themes $RPM_BUILD_ROOT%{_datadir}/%{name}
+%{__python} setup.py install \
+	--optimize=2 \
+	--root=$RPM_BUILD_ROOT
+
+%py_postclean
+
+mv $RPM_BUILD_ROOT{%{py_sitedir}/libmimic.so,%{_libdir}/%{name}}
+mv $RPM_BUILD_ROOT{%{_bindir}/%{name},%{_datadir}/%{name}}
+rm $RPM_BUILD_ROOT%{py_sitedir}/emesene-*.egg-info
+mv $RPM_BUILD_ROOT{%{py_sitedir}/*,%{_datadir}/%{name}}
+rm $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps/emesene.svg
+install -p %{name}.sh $RPM_BUILD_ROOT%{_bindir}/%{name}
 
-cp -a misc/%{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
-cp -a misc/%{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
-cp -a misc/%{name}.desktop $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
-install -p emesene.sh $RPM_BUILD_ROOT%{_bindir}/emesene
-install -p libmimic.so $RPM_BUILD_ROOT%{_libdir}/%{name}
-
-> %{name}.lang
-for file in po/*; do
-	dir=${file##*/}
-	echo "%lang($dir) %{_datadir}/%{name}/po/$dir" >> %{name}.lang
-done
+%find_lang %{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -81,8 +84,7 @@
 %dir %{_libdir}/%{name}
 %attr(755,root,root) %{_libdir}/%{name}/libmimic.so
 %dir %{_datadir}/%{name}
-%{_datadir}/%{name}/*.py
-%{_datadir}/%{name}/emesene-logo.png
+%{_datadir}/%{name}/*.py[co]
 %{_datadir}/%{name}/hotmlog.htm
 %{_datadir}/%{name}/plugins_base
 %{_datadir}/%{name}/abstract
@@ -103,7 +105,6 @@
 %{_datadir}/%{name}/themes/gnomecolors
 %{_datadir}/%{name}/themes/inthemargins
 %{_datadir}/%{name}/themes/tango
-%dir %{_datadir}/%{name}/po
 %{_mandir}/man1/emesene.1*
 %{_desktopdir}/emesene.desktop
 %{_pixmapsdir}/emesene.png
@@ -114,6 +115,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.5  2010/03/21 10:33:41  glen
+- build using python install, no matter what developer thinks
+
 Revision 1.4  2010/03/21 08:44:48  glen
 - fix desktop file
 

================================================================
Index: packages/emesene/setup-install.patch
diff -u /dev/null packages/emesene/setup-install.patch:1.1
--- /dev/null	Sun Mar 21 11:33:47 2010
+++ packages/emesene/setup-install.patch	Sun Mar 21 11:33:41 2010
@@ -0,0 +1,11 @@
+--- emesene-1.6/setup.py~	2010-01-04 18:26:30.000000000 +0200
++++ emesene-1.6/setup.py	2010-03-21 12:05:27.413402672 +0200
+@@ -6,7 +6,7 @@
+ 
+ if os.name == 'posix':
+     for arg in sys.argv:
+-        if arg == 'install': 
++        if arg == 'install-warn':
+             print 'Hello.\nYou are trying to do a system-wide install of emesene '\
+                   'using this script, which is a very bad thing to do.\n'\
+                   'Seriously, you do NOT want to do this, since it can break '\
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/emesene/emesene.spec?r1=1.4&r2=1.5&f=u



More information about the pld-cvs-commit mailing list