]> git.pld-linux.org Git - packages/opera.git/commitdiff
convert wrapper.patch to opera.sh
authorElan Ruusamäe <glen@delfi.ee>
Thu, 23 May 2013 21:43:28 +0000 (00:43 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 23 May 2013 21:43:28 +0000 (00:43 +0300)
opera-wrapper.patch [deleted file]
opera.sh [new file with mode: 0755]
opera.spec

diff --git a/opera-wrapper.patch b/opera-wrapper.patch
deleted file mode 100644 (file)
index 7e29da1..0000000
+++ /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 (executable)
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 "$@"
index e5437418d2afe02cafb594aca8598ea9c520b1ab..8ced3956fe1bc95dd19281a448c06b6d34d9f2a6 100644 (file)
@@ -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"
This page took 0.048895 seconds and 4 git commands to generate.