[packages/opera] convert wrapper.patch to opera.sh

glen glen at pld-linux.org
Thu May 23 23:43:47 CEST 2013


commit c0208be930aed2028a3f2d64c07a0297be6046f1
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Fri May 24 00:43:28 2013 +0300

    convert wrapper.patch to opera.sh

 opera-wrapper.patch | 15 ---------------
 opera.sh            |  9 +++++++++
 opera.spec          |  8 +++-----
 3 files changed, 12 insertions(+), 20 deletions(-)
---
diff --git a/opera.spec b/opera.spec
index e543741..8ced395 100644
--- a/opera.spec
+++ b/opera.spec
@@ -27,7 +27,7 @@ Source10:	ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{name}-%{version}-%{buil
 Source11:	ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{name}-%{version}-%{buildid}.x86_64.linux.tar.xz
 # Source11-md5:	59e1bb087e5861126a296ef0a68df8a4
 Source0:	%{name}.desktop
-Patch0:		%{name}-wrapper.patch
+Source1:	%{name}.sh
 Patch1:		%{name}-desktop.patch
 Patch2:		%{name}-pluginpath.patch
 URL:		http://www.opera.com/
@@ -93,11 +93,12 @@ Obsługa 32-bitowych wtyczek Opery.
 %ifarch %{ix86}
 %setup -q -T -b 10 -n %{name}-%{version}-%{buildid}.i386.linux
 %endif
-
 %ifarch %{x8664}
 %setup -q -T -b 11 -n %{name}-%{version}-%{buildid}.x86_64.linux
 %endif
 
+sed -e 's#/usr/lib/opera#%{_libdir}/opera#g' %{SOURCE1} > opera
+
 %{__sed} -i -e '
 	s,@@{PREFIX},%{_prefix},g
 	s,@@{SUFFIX},,
@@ -106,7 +107,6 @@ Obsługa 32-bitowych wtyczek Opery.
 
 %{__sed} -i -e 's,kfmclient exec,xdg-open,' share/opera/defaults/filehandler.ini
 
-%patch0 -p1
 %patch1 -p1
 
 # remove lib32/lib64 paths so patch2 can apply (i386 build contained lib64 as well, oh well)
@@ -144,8 +144,6 @@ cp -a share/* $RPM_BUILD_ROOT%{_datadir}
 ln -s %{_docdir}/%{name}-%{version}/LICENSE $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults/license.txt
 #cp -a etc/*.ini $RPM_BUILD_ROOT%{_sysconfdir}
 
-sed -i -e 's#/usr/lib/opera#%{_libdir}/opera#g' $RPM_BUILD_ROOT%{_bindir}/opera
-
 cat << 'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/operaprefs_default.ini
 [ISP]
 Id="DISTRO"
diff --git a/opera-wrapper.patch b/opera-wrapper.patch
deleted file mode 100644
index 7e29da1..0000000
--- a/opera-wrapper.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- opera-10.51-6252.i386.linux/opera~	2010-03-20 02:45:01.000000000 +0200
-+++ opera-10.51-6252.i386.linux/opera	2010-03-20 13:32:03.132427427 +0200
-@@ -1,4 +1,9 @@
- #!/bin/sh
--export OPERA_DIR=${OPERA_DIR:-"${0%/*}"/share/opera}
--export OPERA_PERSONALDIR=${OPERA_PERSONALDIR:-"${0%/*}"/profile}
--exec "${0%/*}"/lib/opera/opera "$@"
-+# set JAVA_HOME from jpackage-utils if available
-+if [ -f /usr/share/java-utils/java-functions ]; then
-+	. /usr/share/java-utils/java-functions
-+	set_jvm
-+fi
-+export OPERA_DIR=/usr/share/opera
-+export OPERA_PERSONALDIR=$HOME/.opera
-+exec /usr/lib/opera/opera "$@"
diff --git a/opera.sh b/opera.sh
new file mode 100755
index 0000000..0083587
--- /dev/null
+++ b/opera.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+# set JAVA_HOME from jpackage-utils if available
+if [ -f /usr/share/java-utils/java-functions ]; then
+	. /usr/share/java-utils/java-functions
+	set_jvm
+fi
+export OPERA_DIR=/usr/share/opera
+export OPERA_PERSONALDIR=$HOME/.opera
+exec /usr/lib/opera/opera "$@"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/opera.git/commitdiff/c0208be930aed2028a3f2d64c07a0297be6046f1



More information about the pld-cvs-commit mailing list