summaryrefslogtreecommitdiff
path: root/palemoon
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2018-09-09 03:29:42 +0000
committerB Stack <bgstack15@gmail.com>2018-09-09 03:29:42 +0000
commit8c36a7cecb930a5fa72bda63aef54808ed21a5e8 (patch)
tree93a0dbbe401952e8097a8122a172bb34d4478160 /palemoon
parentMerge branch 'fix-pm-el7' (diff)
parentpalemoon: build successfully in el6.i686 and all other archs (diff)
downloadstackrpms-8c36a7cecb930a5fa72bda63aef54808ed21a5e8.tar.gz
stackrpms-8c36a7cecb930a5fa72bda63aef54808ed21a5e8.tar.bz2
stackrpms-8c36a7cecb930a5fa72bda63aef54808ed21a5e8.zip
Merge branch 'fix-pm-el6' into 'master'
palemoon: build successfully in el6.i686 and all other archs See merge request bgstack15/stackrpms!4
Diffstat (limited to 'palemoon')
-rw-r--r--palemoon/credits.md1
-rw-r--r--palemoon/palemoon.spec59
2 files changed, 43 insertions, 17 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 d0f3bf2..c7d2f6c 100644
--- a/palemoon/palemoon.spec
+++ b/palemoon/palemoon.spec
@@ -1,7 +1,31 @@
%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
@@ -17,30 +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}
-# from repo sclo or scl-rh
-BuildRequires: devtoolset-7-toolchain
-%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
@@ -63,15 +88,15 @@ and themes to make the browser truly your own.
%build
# when version < 28.0.0 it needed gcc 4.9
#source /usr/bin/gcc49
-%if 0%{?el7}
+%if "%{?scl_env}" != ""
thispwd=$( pwd )
- scl enable devtoolset-7 /bin/bash << EOF
+ scl enable %{scl_env} /bin/bash << EOF
pushd $thispwd
%endif
%if !%{dummy_package}
./mach build
%endif
-%if 0%{?el7}
+%if "%{?scl_env}" != ""
popd || :
EOF
%endif
@@ -79,9 +104,9 @@ EOF
%install
rm -rf %{buildroot}
-%if 0%{?el7}
+%if "%{?scl_env}" != ""
thispwd=$( pwd )
- scl enable devtoolset-7 /bin/bash << EOF
+ scl enable %{scl_env} /bin/bash << EOF
pushd $thispwd
%endif
%if !%{dummy_package}
@@ -93,7 +118,7 @@ rm -rf %{buildroot}
sdkdir=%{_libdir}/%{name}-devel \
install
%endif
-%if 0%{?el7}
+%if "%{?scl_env}" != ""
popd || :
EOF
%endif
bgstack15