Permalink
Browse files

Add desktop and mime file.

  • Loading branch information...
1 parent 57ee818 commit eaf42aa16863e2b19005bf7344d272abc3fba8c4 @dram committed Sep 16, 2012
Showing with 31 additions and 2 deletions.
  1. +9 −2 leo/PKGBUILD
  2. +8 −0 leo/leo.desktop
  3. +7 −0 leo/leo.install
  4. +7 −0 leo/leo.xml
View
@@ -10,8 +10,12 @@ depends=('python2-pyqt')
makedepends=('unzip')
backup=('opt/leo/leo/config/leoSettings.leo')
install="leo.install"
-source=(http://downloads.sourceforge.net/sourceforge/$pkgname/Leo-$pkgver-final.zip)
-md5sums=('5cf70fff15da57957d84b25842159467')
+source=(http://downloads.sourceforge.net/sourceforge/$pkgname/Leo-$pkgver-final.zip
+ leo.desktop
+ leo.xml)
+md5sums=('5cf70fff15da57957d84b25842159467'
+ 'fe65422281f7fcda8d1f11d457445496'
+ 'b4c0250152aa6393d4a705fcccbad26b')
build() {
install -d $pkgdir/opt/$pkgname
@@ -21,6 +25,9 @@ build() {
cp -R * $pkgdir/opt/$pkgname || return 1
install -D LICENSE.TXT $pkgdir/usr/share/licenses/$pkgname/LICENSE.TXT
install -d $pkgdir/usr/bin
+ install -D $srcdir/leo.desktop $pkgdir/usr/share/applications/leo.desktop
+ install -D $srcdir/leo.xml $pkgdir/usr/share/mime/packages/leo.xml
+ install -D leo/Icons/application-x-leo-outline.png $pkgdir/usr/share/pixmaps/leo.png
cd $pkgdir/usr/bin || return 1
ln -s ../../opt/leo/launchLeo.py leo || return 1
}
View
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Leo
+GenericName=Outliner
+Exec=leo
+Icon=leo
+MimeType=application/x-leo-outline;
+Type=Application
+Categories=Utility;TextEditor;
View
@@ -1,6 +1,8 @@
# arg 1: the new package version
post_install() {
echo ">>> leo can be configured to use the python2-pyenchant package for spellchecking."
+ update-desktop-database -q
+ update-mime-database usr/share/mime >/dev/null
}
# arg 1: the new package version
@@ -14,6 +16,11 @@ pre_remove() {
/bin/true
}
+post_remove() {
+ update-desktop-database -q
+ update-mime-database usr/share/mime >/dev/null
+}
+
op=$1
shift
View
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+ <mime-type type="application/x-leo-outline">
+ <comment xml:lang="en">Leo outline file</comment>
+ <glob pattern="*.leo"/>
+ </mime-type>
+</mime-info>

0 comments on commit eaf42aa

Please sign in to comment.