Created
September 29, 2015 19:17
-
-
Save phikal/835936d04642aace1b97 to your computer and use it in GitHub Desktop.
Create Palemoon package via fpm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# usage: ... [archive] [package type] | |
NAME=palemoon | |
MAINT="[email protected]" | |
LICE="MPLv3.0" | |
URL="http://www.palemoon.org/" | |
VERSION=$(echo $1 | sed 's/^palemoon-//' | sed 's/.en-US.*$//') | |
ARCH=$(echo $1 | sed 's/^.*linux-//' | sed 's/.tar.bz2$//') | |
DIR="./palemoon_$VERSION_$ARCH" | |
rm -rvf $DIR | |
rm -vf "${NAME}_${VERSION}_${ARCH}.$2" | |
mkdir -vp $DIR/opt/palemoon\ | |
$DIR/usr/bin/\ | |
$DIR/usr/share/applications/\ | |
$DIR/usr/share/icons/hicolor/{16x16,48x48,32x32,128x128}/apps | |
tar -xjvf $1 -C $DIR/opt/palemoon | |
ln -vs $DIR/opt/palemoon/palemoon $DIR/usr/bin/palemoon | |
ln -vs $DIR/opt/palemoon/browser/chrome/icons/default/default16.png $DIR/usr/share/icons/hicolor/16x16/apps/palemoon.png | |
ln -vs $DIR/opt/palemoon/browser/chrome/icons/default/default32.png $DIR/usr/share/icons/hicolor/32x32/apps/palemoon.png | |
ln -vs $DIR/opt/palemoon/browser/chrome/icons/default/default48.png $DIR/usr/share/icons/hicolor/48x48/apps/palemoon.png | |
ln -vs $DIR/opt/palemoon/browser/icons/mozicon128.png $DIR/usr/share/icons/hicolor/128x128/apps/palemoon.png | |
cat > $DIR/usr/share/applications/palemoon.desktop <<EOF | |
[Desktop Entry] | |
Version=1.0 | |
Name=Pale Moon Web Browser | |
Comment=Browse the World Wide Web | |
Keywords=Internet;WWW;Browser;Web;Explorer | |
Exec=palemoon %u | |
Terminal=false | |
X-MultipleArgs=false | |
Type=Application | |
Icon=palemoon | |
Categories=Network;WebBrowser;Internet; | |
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall; | |
StartupNotify=true | |
Actions=NewWindow;NewPrivateWindow; | |
[Desktop Action NewWindow] | |
Name=Open a New Window | |
Exec=palemoon -new-window | |
OnlyShowIn=Unity; | |
[Desktop Action NewPrivateWindow] | |
Name=Open a New Private Window | |
Exec=palemoon -private-window | |
OnlyShowIn=Unity; | |
EOF | |
fpm -s dir -t $2 -n $NAME -v $VERSION -a $ARCH -m $MAINT --license $LICE --vendor $VEND --url=$URL .=$DIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment