Skip to content

Instantly share code, notes, and snippets.

@rasschaert
Created October 12, 2014 18:52
Show Gist options
  • Save rasschaert/9bb689d9ce53d7e5e77b to your computer and use it in GitHub Desktop.
Save rasschaert/9bb689d9ce53d7e5e77b to your computer and use it in GitHub Desktop.
Eclipse 4.4.1 packaging script
#!/bin/bash
echo "Creating directory structure"
mkdir -p ./tmproot/usr/local/bin
mkdir -p ./tmproot/usr/share/applications
mkdir -p ./tmproot/usr/share/icons/hicolor/256x256/apps
mkdir -p ./tmproot/usr/share/icons/gnome/256x256/apps
mkdir -p ./tmproot/opt/
cd ./tmproot/opt
echo "Downloading tarball"
wget http://download.springsource.com/release/ECLIPSE/luna/SR1/eclipse-standard-luna-SR1-linux-gtk-x86_64.tar.gz
echo "Extracting tarball"
tar xzf eclipse-standard-luna-SR1-linux-gtk-x86_64.tar.gz
rm eclipse-standard-luna-SR1-linux-gtk-x86_64.tar.gz
echo "Creating shortcut"
cd ../usr/local/bin/
ln -s ../../../opt/eclipse/eclipse eclipse
echo "Creating launcher"
cd ../../../usr/share/applications/
cat << EOF > eclipse.desktop
[Desktop Entry]
Type=Application
Name=Eclipse
Comment=Eclipse Integrated Development Environment
Icon=eclipse
Exec=eclipse
Terminal=false
Categories=Development;IDE;Java;
EOF
chmod 644 eclipse.desktop
echo "Placing icon"
cd ../../../
cp ./opt/eclipse/icon.xpm ./usr/share/icons/hicolor/256x256/apps/eclipse.xpm
cp ./opt/eclipse/icon.xpm ./usr/share/icons/gnome/256x256/apps/eclipse.xpm
echo "Creating package"
cd ..
fpm -s dir -t deb -n eclipse -v 4.4.1 -a amd64 -C tmproot .
echo "Cleaning up"
rm -rf tmproot
echo 'Done!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment