summaryrefslogtreecommitdiff
path: root/extra/mtools
diff options
context:
space:
mode:
Diffstat (limited to 'extra/mtools')
-rw-r--r--extra/mtools/PKGBUILD37
-rw-r--r--extra/mtools/mtools.install18
2 files changed, 55 insertions, 0 deletions
diff --git a/extra/mtools/PKGBUILD b/extra/mtools/PKGBUILD
new file mode 100644
index 000000000..dd1eb2c81
--- /dev/null
+++ b/extra/mtools/PKGBUILD
@@ -0,0 +1,37 @@
+# $Id: PKGBUILD 108705 2011-02-02 17:20:00Z giovanni $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=mtools
+pkgver=4.0.15
+pkgrel=1
+pkgdesc="A collection of utilities to access MS-DOS disks"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/mtools/"
+license=('GPL')
+depends=('sh')
+makedepends=('texinfo' 'libx11' 'libsm')
+optdepends=('libx11: required by floppyd'
+ 'libsm: required by floppyd')
+backup=('etc/mtools.conf')
+install=mtools.install
+source=("http://ftp.gnu.org/gnu/mtools/${pkgname}-${pkgver}.tar.bz2")
+md5sums=('b7550b649af77812cb696a780e853f47')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ sed -i '/^SAMPLE FILE$/s:^:# :' mtools.conf
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --sysconfdir=/etc
+ make || return 1
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make -j 1 DESTDIR="${pkgdir}" install || return 1
+ install -Dm644 mtools.conf "${pkgdir}/etc/mtools.conf" || return 1
+}
diff --git a/extra/mtools/mtools.install b/extra/mtools/mtools.install
new file mode 100644
index 000000000..ae357721f
--- /dev/null
+++ b/extra/mtools/mtools.install
@@ -0,0 +1,18 @@
+info_dir=/usr/share/info
+info_files=(mtools.info)
+
+post_install() {
+ for f in ${info_files[@]}; do
+ install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ for f in ${info_files[@]}; do
+ install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ done
+}