diff options
-rw-r--r-- | palemoon/credits.md | 1 | ||||
-rw-r--r-- | palemoon/palemoon.spec | 93 |
2 files changed, 68 insertions, 26 deletions
diff --git a/palemoon/credits.md b/palemoon/credits.md index 255389f..35d05f4 100644 --- a/palemoon/credits.md +++ b/palemoon/credits.md @@ -2,3 +2,4 @@ Credit goes to so many sources and inspirations: * trava90 of the Pale Moon project * firefox-61.0.2-3.fc28.src.rpm * https://build.opensuse.org/package/view_file/network/palemoon/palemoon.spec?expand=1 +* instructions for compiling on centos 6 and 7 http://developer.palemoon.org/Developer_Guide:Build_Instructions/Pale_Moon/Linux#head:CentOS_6 diff --git a/palemoon/palemoon.spec b/palemoon/palemoon.spec index df52b72..c7d2f6c 100644 --- a/palemoon/palemoon.spec +++ b/palemoon/palemoon.spec @@ -1,11 +1,35 @@ %global tarballdir UXP-PM%{version}_Release -%define dummy_package 0 -%define pkgname palemoon -%define prettyname Pale Moon Web Browser +%global dummy_package 0 +%global pkgname palemoon +%global prettyname Pale Moon Web Browser + +# to get python27 and devtoolset-7 on el6.i386: +# https://copr-be.cloud.fedoraproject.org/results/ewdurbin/pythons-el6/epel-6-$basearch/ +# https://copr-be.cloud.fedoraproject.org/results/mlampe/devtoolset-7/epel-6-$basearch/ +# add them to your epel-6 chroot in copr +# to get python27 and devtoolset-7 on el6.x86_64 and el7 (which only has x86_64) +# http://mirror.centos.org/centos/7/sclo/x86_64/sclo/ +# http://mirror.centos.org/centos/7/sclo/x86_64/rh/ +# which are already provided by the copr build systems +%define scl_env %{nil} +%define scl_buildreq coreutils +%if 0%{?el6} + %define scl_buildreq python27, devtoolset-7-toolchain + %ifarch x86_64 + %define scl_env python27 devtoolset-7 + %endif + %ifarch i386 || i686 || i586 + %define scl_env devtoolset-7 + %endif +%endif +%if 0%{?el7} + %define scl_env devtoolset-7 + %define scl_buildreq devtoolset-7-toolchain +%endif Name: palemoon Version: 28.0.0 -Release: 0 +Release: 1 Summary: Pale Moon web browser Group: Networking/Web @@ -17,29 +41,31 @@ Source2: palemoon.desktop Source3: palemoon-mimeinfo.xml Packager: Bgstack15 <bgstack15@gmail.com> +%if "%{?scl_env}" != "" +BuildRequires: %{scl_buildreq} +%endif BuildRequires: alsa-lib-devel BuildRequires: autoconf213 BuildRequires: bzip2-devel BuildRequires: dbus-glib-devel BuildRequires: desktop-file-utils BuildRequires: gcc -%if 0%{?el7} -BuildRequires: gcc49 -%endif BuildRequires: gcc-c++ -BuildRequires: gtk2-devel +BuildRequires: GConf2-devel BuildRequires: glib2-devel +BuildRequires: gtk2-devel BuildRequires: libXt-devel BuildRequires: mesa-libGL-devel -BuildRequires: GConf2-devel +BuildRequires: notification-daemon BuildRequires: openssl-devel BuildRequires: pkgconfig +BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: pulseaudio-libs-devel BuildRequires: sqlite-devel +BuildRequires: unzip BuildRequires: yasm +BuildRequires: zip BuildRequires: zlib-devel -BuildRequires: pkgconfig(gtk+-2.0) -BuildRequires: notification-daemon BuildRoot: %{_tmppath}/%{name}-%{version} Provides: mimehandler(application/x-xpinstall) Provides: webclient @@ -60,27 +86,41 @@ and themes to make the browser truly your own. %{__cp} %{SOURCE1} ./.mozconfig %build -%if 0%{?el7} -source /usr/bin/gcc49 +# when version < 28.0.0 it needed gcc 4.9 +#source /usr/bin/gcc49 +%if "%{?scl_env}" != "" + thispwd=$( pwd ) + scl enable %{scl_env} /bin/bash << EOF + pushd $thispwd %endif %if !%{dummy_package} -./mach build + ./mach build +%endif +%if "%{?scl_env}" != "" + popd || : +EOF %endif %install -%if 0%{?el7} -source /usr/bin/gcc49 -%endif rm -rf %{buildroot} +%if "%{?scl_env}" != "" + thispwd=$( pwd ) + scl enable %{scl_env} /bin/bash << EOF + pushd $thispwd +%endif %if !%{dummy_package} -make -f client.mk \ - DESTDIR=%{buildroot} \ - idldir=%{_datadir}/idl/%{name} \ - includedir=%{_includedir}/%{name} \ - installdir=%{_libdir}/%{name} \ - sdkdir=%{_libdir}/%{name}-devel \ - install + make -f client.mk \ + DESTDIR=%{buildroot} \ + idldir=%{_datadir}/idl/%{name} \ + includedir=%{_includedir}/%{name} \ + installdir=%{_libdir}/%{name} \ + sdkdir=%{_libdir}/%{name}-devel \ + install +%endif +%if "%{?scl_env}" != "" + popd || : +EOF %endif # cleanup @@ -143,6 +183,7 @@ EOF # Add distribution.ini # skipped +# filelist lifted straight from https://build.opensuse.org/package/view_file/network/palemoon/palemoon.spec?expand=1 # get a list of files # $2 - dirlist # $3 - dir of fileslist @@ -197,5 +238,5 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %doc AUTHORS LICENSE %changelog -* Fri Aug 24 2018 B Stack <bgstack15@gmail.com> 28.0.0-0 -- Initial rpm built. +* Wed Sep 05 2018 B Stack <bgstack15@gmail.com> 28.0.0-1 +- rpm spec updated |