Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update and minor spec fixes #1

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ Check http://packages.ubuntu.com/trusty-updates/libssl1.0.0

wget http://<i>example.com/somewhere</i>

Alternatively, use spectool from Fedora's rpmdevtools package:
spectool -g -A opera-developer.spec

# build rpm package
rpmbuild -bb opera-developer.spec

# install rpm
rpm -ivh --nodeps opera-developer-*.x86_64.rpm
sudo yum localinstall opera-developer-*.x86_64.rpm

# start to use opera developer
Just click icon or
Just click icon or run

$ /usr/bin/opera-developer

Expand Down
38 changes: 29 additions & 9 deletions SPEC/opera-developer.spec
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
%define deb_opera %{name}_%{version}_amd64.deb
%define deb_openssl libssl1.0.0_1.0.1f-1ubuntu2.4_amd64.deb
%define deb_openssl libssl1.0.0_1.0.1f-1ubuntu2.5_amd64.deb

# these Requires are provided internally because of our bundling or symlinking
%global _excl lib(ssl|crypto|udev)\\.so
%global __requires_exclude %{_excl}
# they're provided internally, but not for other packages please
%global __provides_exclude_from ^.*/%{_excl}.*$

Summary: Opera Developer
Name: opera-developer
Version: 24.0.1543.0
Version: 25.0.1583.1
Release: 1%{dist}
License: Proprietary
Group: Applications/Internet
Expand All @@ -12,11 +18,10 @@ Source0: http://get.geo.opera.com/pub/opera-developer/%{version}/linux/%{deb_ope
# download ubuntu package from http://packages.ubuntu.com/trusty-updates/libssl1.0.0
Source1: http://mirrors.kernel.org/ubuntu/pool/main/o/openssl/%{deb_openssl}
Vendor: Opera Software ASA
Packager: Nobuyuki Ito
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: x86_64
Requires: %{_libdir}/libudev.so.1
Requires: systemd-libs
BuildRequires: binutils xz tar

%description
Opera Developer
Expand All @@ -26,14 +31,17 @@ Opera Developer
%setup -T -n %{name} -c

%build
ar p $RPM_SOURCE_DIR/%{deb_openssl} data.tar.xz | xz -d -9 | tar x -C $RPM_BUILD_DIR
# nothing to do

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
mkdir $RPM_BUILD_ROOT

# provide openssl-1.0.0
ar p %{SOURCE1} data.tar.xz | xz -d | tar x -C $RPM_BUILD_DIR

# extract data from the deb package
ar p $RPM_SOURCE_DIR/%{deb_opera} data.tar.xz | xz -d -9 | tar x -C $RPM_BUILD_ROOT
ar p %{SOURCE0} data.tar.xz | xz -d | tar x -C $RPM_BUILD_ROOT

# rename libdir
mv $RPM_BUILD_ROOT/usr/lib/x86_64-linux-gnu/%{name} $RPM_BUILD_ROOT/usr/lib/
Expand All @@ -42,7 +50,7 @@ mv $RPM_BUILD_ROOT/usr/lib $RPM_BUILD_ROOT%{_libdir}

# create new symlink
rm -f $RPM_BUILD_ROOT%{_bindir}/%{name}
ln -sr $RPM_BUILD_ROOT%{_libdir}/%{name}/opera $RPM_BUILD_ROOT%{_bindir}/%{name}
ln -sr $RPM_BUILD_ROOT%{_libdir}/%{name}/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}

# delete some directories that is not needed on Fedora
rm -rf $RPM_BUILD_ROOT%{_datadir}/{lintian,menu}
Expand All @@ -61,8 +69,8 @@ done
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

%post
# create symlink for libudev
[ -e %{_libdir}/libudev.so.1 ] && ln -fs %{_libdir}/libudev.so.1 %{_libdir}/%{name}/lib/libudev.so.0
# create symlink for libudev.so.0
ln -fs %{_libdir}/libudev.so.1 %{_libdir}/%{name}/lib/libudev.so.0

%postun
[ -L %{_libdir}/%{name}/lib/libudev.so.0 ] && rm -f %{_libdir}/%{name}/lib/libudev.so.0
Expand All @@ -74,6 +82,18 @@ done
%{_datadir}

%changelog
* Mon Aug 11 2014 Moritz Barsnick <[email protected]> 25.0.1583.1-1
- update to 25.0.1583.1
- fix symlink to binary
- use latest openssl package from Ubuntu
- use %%{SOURCE} macros
- unpack openssl in %%install phase
- drop xz compression flag for decompression
- drop Packager tag (should be provided by rpmbuild tool chain) and BRs
(they're all pre-provided on Fedora)
- fix Requires and Provides, in order to not require --no-deps and to not
provide bogus stuff

* Mon Jun 30 2014 Nobuyuki Ito <[email protected]> - 24.0.1543.0
- version up
- change libssl/libcrypto install dir
Expand Down