summaryrefslogtreecommitdiff
path: root/extra/xchm
diff options
context:
space:
mode:
Diffstat (limited to 'extra/xchm')
-rw-r--r--extra/xchm/PKGBUILD32
-rw-r--r--extra/xchm/xchm.desktop10
-rw-r--r--extra/xchm/xchm.install15
-rw-r--r--extra/xchm/xchm.xml7
4 files changed, 64 insertions, 0 deletions
diff --git a/extra/xchm/PKGBUILD b/extra/xchm/PKGBUILD
new file mode 100644
index 000000000..809e0ed05
--- /dev/null
+++ b/extra/xchm/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 108735 2011-02-02 18:31:26Z giovanni $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+
+pkgname=xchm
+pkgver=1.18
+pkgrel=1
+pkgdesc="A cross-platform GUI front-end to chmlib"
+arch=('i686' 'x86_64')
+url="http://xchm.sourceforge.net"
+license=('GPL')
+depends=('chmlib' 'wxgtk' 'desktop-file-utils')
+install=xchm.install
+source=(http://downloads.sourceforge.net/sourceforge/xchm/${pkgname}-${pkgver}.tar.gz
+ xchm.desktop
+ xchm.xml)
+md5sums=('07d7a910b3216301a002be5630c71866'
+ '31fb9692b9ee9f2a205f58b9ff4bc4fe'
+ '4102b0a393f5c60236143cc034664dd0')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ export CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
+ ./configure --prefix=/usr
+ make || return 1
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR=${pkgdir} install || return 1
+ install -D -m644 ${srcdir}/xchm.desktop "${pkgdir}/usr/share/applications/xchm.desktop" || return 1
+ install -D -m644 ${srcdir}/xchm.xml "${pkgdir}/usr/share/mime/packages/xchm.xml" || return 1
+}
diff --git a/extra/xchm/xchm.desktop b/extra/xchm/xchm.desktop
new file mode 100644
index 000000000..ca20876b2
--- /dev/null
+++ b/extra/xchm/xchm.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Xchm
+Comment=Views CHM files
+Exec=xchm %f
+Terminal=false
+Type=Application
+Icon=xchm-48
+Categories=Viewer;Utility;
+MimeType=application/x-chm;
+StartupNotify=true
diff --git a/extra/xchm/xchm.install b/extra/xchm/xchm.install
new file mode 100644
index 000000000..1ad77f9aa
--- /dev/null
+++ b/extra/xchm/xchm.install
@@ -0,0 +1,15 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+ update-desktop-database -q
+ update-mime-database usr/share/mime > /dev/null
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+ update-desktop-database -q
+ update-mime-database usr/share/mime > /dev/null
+}
diff --git a/extra/xchm/xchm.xml b/extra/xchm/xchm.xml
new file mode 100644
index 000000000..08cb9ca3f
--- /dev/null
+++ b/extra/xchm/xchm.xml
@@ -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-chm">
+ <comment>Compiled HTML Help Format</comment>
+ <glob pattern="*.chm"/>
+ </mime-type>
+</mime-info>