summaryrefslogtreecommitdiff
path: root/palemoon/palemoon.spec
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2018-08-29 06:59:38 -0400
committerB Stack <bgstack15@gmail.com>2018-08-29 06:59:38 -0400
commit854b830ee357607396257023da6953e9a7889ba5 (patch)
treea0d93884a41bebc682000c7d7d06182c920c08e2 /palemoon/palemoon.spec
downloadstackrpms-854b830ee357607396257023da6953e9a7889ba5.tar.gz
stackrpms-854b830ee357607396257023da6953e9a7889ba5.tar.bz2
stackrpms-854b830ee357607396257023da6953e9a7889ba5.zip
initial commit
Diffstat (limited to 'palemoon/palemoon.spec')
-rw-r--r--palemoon/palemoon.spec197
1 files changed, 197 insertions, 0 deletions
diff --git a/palemoon/palemoon.spec b/palemoon/palemoon.spec
new file mode 100644
index 0000000..1c9e93f
--- /dev/null
+++ b/palemoon/palemoon.spec
@@ -0,0 +1,197 @@
+%global tarballdir UXP-PM%{version}_Release
+%define dummy_package 0
+%define pkgname palemoon
+%define prettyname Pale Moon Web Browser
+
+Name: palemoon
+Version: 28.0.0
+Release: 0
+Summary: Pale Moon web browser
+
+Group: Networking/Web
+License: MPLv2.0
+URL: http://linux.palemoon.org/
+Source0: https://github.com/MoonchildProductions/UXP/archive/PM%{version}_Release.tar.gz
+Source1: palemoon-mozconfig
+Source2: palemoon.desktop
+Source3: palemoon-mimeinfo.xml
+Packager: Bgstack15 <bgstack15@gmail.com>
+
+Buildarch: x86_64
+BuildRequires: alsa-lib-devel
+BuildRequires: autoconf213
+BuildRequires: bzip2-devel
+BuildRequires: dbus-glib-devel
+BuildRequires: desktop-file-utils
+BuildRequires: gcc
+BuildRequires: gcc-c++
+BuildRequires: gtk2-devel
+BuildRequires: glib2-devel
+BuildRequires: libXt-devel
+BuildRequires: mesa-libGL-devel
+BuildRequires: GConf2-devel
+BuildRequires: openssl-devel
+BuildRequires: pkgconfig
+BuildRequires: pulseaudio-libs-devel
+BuildRequires: sqlite-devel
+BuildRequires: yasm
+BuildRequires: zlib-devel
+BuildRequires: pkgconfig(gtk+-2.0)
+BuildRequires: pkgconfig(gtk+-3.0)
+BuildRequires: pkgconfig(vpx)
+BuildRequires: notification-daemon
+BuildRoot: %{_tmppath}/%{name}-%{version}
+Provides: mimehandler(application/x-xpinstall)
+Provides: webclient
+
+%description
+Pale Moon offers you a browsing experience in a browser completely built
+from its own, independently developed source that has been forked off from
+Firefox/Mozilla code, with carefully selected features and optimizations to
+improve the browser's speed*, resource use, stability and user experience,
+while offering full customization and a growing collection of extensions
+and themes to make the browser truly your own.
+
+%global debug_package %{nil}
+%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
+
+%prep
+%setup -q -n %{tarballdir}
+%{__cp} %{SOURCE1} ./.mozconfig
+
+%build
+#source /usr/bin/gcc49 # not needed for >= 28.0.0
+%if !%{dummy_package}
+./mach build
+%endif
+
+%install
+#source /usr/bin/gcc49 # not needed for >= 28.0.0
+rm -rf %{buildroot}
+
+%if !%{dummy_package}
+make -f client.mk \
+ DESTDIR=%{buildroot} \
+ idldir=%{_datadir}/idl/%{name} \
+ includedir=%{_includedir}/%{name} \
+ installdir=%{_libdir}/%{name} \
+ sdkdir=%{_libdir}/%{name}-devel \
+ install
+%endif
+
+# cleanup
+%{__rm} -rf %{buildroot}%{_datadir}/idl/%{pkgname} \
+ %{buildroot}%{_includedir}/%{pkgname} \
+ %{buildroot}%{_libdir}/%{pkgname}-devel
+
+%{__mkdir_p} %{buildroot}%{_datadir}/applications
+
+desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE2}
+
+%{__sed} -i -r -e "s/@NAME@/%{prettyname}/;" \
+ -e "s/@EXEC@/%{pkgname}/;" \
+ -e "s/@ICON@/%{pkgname}/;" \
+ %{buildroot}%{_datadir}/applications/%{pkgname}.desktop
+
+# application start script
+# none
+
+# man pages
+# none
+
+# mimetypes
+%{__install} -Dm0644 %{SOURCE3} \
+ %{buildroot}%{_datadir}/mime/packages/%{pkgname}.xml
+
+# icons
+%{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps
+for s in 16 22 24 32 48 256 ;
+do
+ %{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps
+ %{__cp} -p application/%{pkgname}/branding/official/default${s}.png \
+ %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps/%{pkgname}.png
+done
+
+# Register as an application to be visible in the software center
+# EXPERIMENTAL
+mkdir -p %{buildroot}%{_datadir}/appdata
+cat > %{buildroot}%{_datadir}/appdata/%{pkgname}.appdata.xml <<EOF
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Adapted from content by Richard Hughes <richard-at-hughsie-dot-com> -->
+<application>
+ <id type="desktop">%{pkgname}.desktop</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <description>
+ <p>
+ Pale Moon offers you a browsing experience in a browser completely built from its own, independently developed source that has been forked off from Firefox/Mozilla code a number of years ago, with carefully selected features and optimizations to improve the browser stability and user experience, while offering full customization and a growing collection of extensions and themes to make the browser truly your own.
+ </p>
+ </description>
+ <url type="homepage">http://www.palemoon.org/</url>
+ <screenshots>
+ <screenshot type="default">http://www.palemoon.org/images/screenshots/Win10-start-portal.png</screenshot>
+ </screenshots>
+ <!-- FIXME: change this to an upstream email address for spec updates
+ <updatecontact>someone_who_cares@upstream_project.org</updatecontact>
+ -->
+</application>
+EOF
+
+# Add distribution.ini
+# skipped
+
+# get a list of files
+# $2 - dirlist
+# $3 - dir of fileslist
+# $4 - excludelist
+filelist() {
+ filelist=$PWD/$1
+ pushd %{buildroot}
+ find ./ | while read list; do
+ if [ -n "$4" ]; then
+ ! echo $list | grep "$4" || continue
+ fi
+ _file=$(echo $list | sed 's/[^/]//')
+ _dir=$(dirname $_file)
+ if echo $_dir | grep "$2"; then
+ grep -xqs "\%dir\ $_dir" $filelist || echo "%dir $_dir" >> $filelist
+ fi
+ if echo $_file | grep "$3"; then
+ [ -d "$list" ] || echo $_file >> $filelist
+ fi
+ done
+ popd
+}
+
+filelist file.lst %{pkgname} usr langpack
+
+%clean
+%{__rm} -rf %{buildroot} || :
+
+%post
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+update-desktop-database &> /dev/null || :
+
+%preun
+# is it a final removal?
+#if test "$1" = "0" ;
+#then
+#fi
+
+%postun
+update-desktop-database &> /dev/null || :
+if test "$1" = "0" ;
+then
+ touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+%posttrans
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
+%files -f file.lst
+%defattr(-,root,root)
+%doc AUTHORS LICENSE
+
+%changelog
+* Fri Aug 24 2018 B Stack <bgstack15@gmail.com> 28.0.0-0
+- Initial rpm built.
bgstack15