Place atom.png icons in standard system locations

This is so that the atom.desktop file will be able to find the
"atom" icon when requested. This adds the dependency of ImageMagick
to convert atom.png to varying resolutions, although, only during
the rpm build process (not during actual install). So the result
is ultimatly no different for the end user.

Also, fixed an absolute path from the rpm build process and made
it relative. It was hardcoded in the spec file to
"/tmp/atom-build/Atom/*", so builds that were made elsewhere would
have broken when attempting to package into an rpm. Now rpm packaging
should work from a build made anywhere. Also needed to modify
script/mkrpm so that it copies the build files in such a way that
they can more easily be dealt with in the spec file in a relative
way.
This commit is contained in:
Ethan Estrada 2015-01-31 22:14:07 -07:00
parent a7e18b05d3
commit 223334181b
3 changed files with 14 additions and 6 deletions

View File

@ -21,7 +21,7 @@ Ubuntu LTS 12.04 64-bit is the recommended platform.
### Fedora / CentOS / RHEL
* `sudo yum --assumeyes install make gcc gcc-c++ glibc-devel git-core libgnome-keyring-devel rpmdevtools`
* `sudo yum --assumeyes install make gcc gcc-c++ glibc-devel git-core libgnome-keyring-devel rpmdevtools ImageMagick`
* Instructions for [Node.js](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#fedora).
### Arch
@ -35,7 +35,7 @@ Ubuntu LTS 12.04 64-bit is the recommended platform.
### openSUSE
* `sudo zypper install nodejs make gcc gcc-c++ glibc-devel git-core libgnome-keyring-devel rpmdevtools`
* `sudo zypper install nodejs make gcc gcc-c++ glibc-devel git-core libgnome-keyring-devel rpmdevtools ImageMagick`
## Instructions

View File

@ -12,16 +12,24 @@ Prefix: /usr
%install
mkdir -p %{buildroot}/usr/share/atom
cp -r /tmp/atom-build/Atom/* %{buildroot}/usr/share/atom
cp -r Atom/* %{buildroot}/usr/share/atom
mkdir -p %{buildroot}/usr/bin/
ln -sf ../share/atom/resources/app/apm/node_modules/.bin/apm %{buildroot}/usr/bin/apm
cp atom.sh %{buildroot}/usr/bin/atom
chmod 755 atom.sh
chmod 755 %{buildroot}/usr/bin/atom
mkdir -p %{buildroot}/usr/share/applications/
mv atom.desktop %{buildroot}/usr/share/applications/
cp atom.desktop %{buildroot}/usr/share/applications/
# use imagemagick to create icons in sizes that most desktop environments like
for i in 512x512 256x256 64x64 48x48 32x32 24x24 22x22 16x16
do
mkdir -p %{buildroot}/usr/share/icons/hicolor/${i}/apps
convert Atom/resources/app/resources/atom.png -resize ${i} %{buildroot}/usr/share/icons/hicolor/${i}/apps/atom.png
done
%files
/usr/bin/atom
/usr/bin/apm
/usr/share/atom/
/usr/share/applications/atom.desktop
/usr/share/icons/hicolor/

View File

@ -11,7 +11,7 @@ ARCH=`uname -m`
rpmdev-setuptree
cp -r $BUILD_DIRECTORY/Atom/* $RPM_BUILD_ROOT/BUILD
cp -r $BUILD_DIRECTORY/Atom $RPM_BUILD_ROOT/BUILD
cp $SPEC_FILE $RPM_BUILD_ROOT/SPECS
cp ./atom.sh $RPM_BUILD_ROOT/BUILD
cp $DESKTOP_FILE $RPM_BUILD_ROOT/BUILD