aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--Makefile.am3
-rw-r--r--configure.in11
-rw-r--r--kernel/Makefile.am7
-rwxr-xr-xmkmpiodev19
-rw-r--r--mpio.spec.in42
-rw-r--r--mpiosh/mpiosh.c8
7 files changed, 69 insertions, 32 deletions
diff --git a/ChangeLog b/ChangeLog
index 8de45e7..bb20637 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2002-09-15 Andreas Buesching <crunchy@tzi.de>
+
+ * kernel/Makefile.am (install): the kernel module is now installed
+ into the determinated module directory of the current kernel
+ version.
+
+ * mpio.spec.in: created rpm spec file for creating binary and
+ source rpm packages
+
2002-09-15 Markus Germeier <mager@tzi.de>
* mpiosh/callback.c (mpiosh_cmd_debug_mem): added function
@@ -12,6 +21,8 @@
* mpiosh/mpiosh.c: add a debug message, displaying the executed
command in script mode
+ (mpiosh_command_regex_fix): better mapping for shell regular
+ expressions (hopefully)
2002-09-15 Markus Germeier <mager@tzi.de>
diff --git a/Makefile.am b/Makefile.am
index 2ff58ae..8bf1d26 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1 +1,4 @@
SUBDIRS=kernel libmpio mpiosh
+
+sbin_SCRIPTS=mkmpiodev
+EXTRA_DIST=mpio.spec mkmpiodev \ No newline at end of file
diff --git a/configure.in b/configure.in
index 560d488..061f826 100644
--- a/configure.in
+++ b/configure.in
@@ -26,8 +26,19 @@ echo $kernel_version
if test "$_k_verc_fail" ; then
echo " Your kernel version is to old."
echo " Please update your system to a kernel version of 2.2.x or higher."
+ AC_ERROR("too old")
fi
+MODULE_PATH="/lib/modules/${kernel_version}"
+if test -d "${MODULE_PATH}/kernel/drivers/usb"; then
+ MODULE_PATH="${MODULE_PATH}/kernel/drivers/usb"
+else
+ MODULE_PATH="${MODULE_PATH}/misc"
+fi
+AC_MSG_RESULT(Using module path ${MODULE_PATH}.)
+
+AC_SUBST(MODULE_PATH)
+
dnl Checks for header files.
AC_CHECK_HEADER(getopt.h,HAVE_GETOPT_H=1,HAVE_GETOPT_H=0)
diff --git a/kernel/Makefile.am b/kernel/Makefile.am
index ba6402f..f308f60 100644
--- a/kernel/Makefile.am
+++ b/kernel/Makefile.am
@@ -2,12 +2,13 @@ INCLUDES=-I/usr/src/linux/include
KCFLAGS=-D__KERNEL__ -I$(INCLUDE) -Wall -Wstrict-prototypes -O2 \
-fomit-frame-pointer -pipe -DMODULE
-bin_PROGRAMS=mpio.o
-
-mpio_o_SOURCES=mpio.c
+EXTRA_DIST=mpio.c
all: mpio.o
mpio.o: mpio.c
$(CC) -c $(KCFLAGS) $(INCLUDES) $<
+install:
+ $(mkinstalldirs) $(DESTDIR)@MODULE_PATH@
+ $(INSTALL_PROGRAM) -m 644 mpio.o $(DESTDIR)@MODULE_PATH@
diff --git a/mkmpiodev b/mkmpiodev
index 9686eed..bbe6995 100755
--- a/mkmpiodev
+++ b/mkmpiodev
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#------------------------------
# Create device file for MPIO
#------------------------------
@@ -9,11 +9,16 @@ MINOR=70
PERM=666
OWNER=root.root
-if [ -a $DEVFILE ]; then
- rm -f $DEVFILE
+if test -c $DEVFILE; then
+ echo -n "Removing $DEVFILE ... "
+ rm -f $DEVFILE
+ echo "done"
+fi
+
+if test "$1" != "-r"; then
+ echo -n "Creating $DEVFILE ... "
+ mknod -m $PERM $DEVFILE c $MAJOR $MINOR
+ chown $OWNER $DEVFILE
+ echo "done"
fi
-echo -n "Creating $DEVFILE..."
-mknod -m $PERM $DEVFILE c $MAJOR $MINOR
-chown $OWNER $DEVFILE
-echo " done"
diff --git a/mpio.spec.in b/mpio.spec.in
index 301850b..303a8c2 100644
--- a/mpio.spec.in
+++ b/mpio.spec.in
@@ -1,22 +1,22 @@
-# @configure_input@
+%define version @VERSION@
+%define release 1
+%define name mpio
-Version: @VERSION@
+Version: %version
Summary: MPIO - providing access to MPIO mp3 players
-Name: mpio
-Release: 1
+Name: %name
+Release: %release
Copyright: see COPYING
Group: Applications/MultiMedia
-Source: http://download.sourceforge.net/mpio/
+Source: http://download.sourceforge.net/mpio/mpio-@VERSION@.tar.gz
Prefix: /usr
-Buildroot: /var/tmp/mpio-%version-buildroot/
+Buildroot: /var/tmp/mpio-@VERSION@-buildroot/
Packager: Andreas Büsching <crunchy@tzi.de>
-%define confdir /etc
-
%description
This is a project for using Digitalway/Adtec digital audio player MPIO
(DMG, DMK, DME) under Linux. It provides Linux kernel module driver,
-userspace library and utility.
+a userspace library and at the moment one tool to access the MPIO player.
%prep
%setup
@@ -29,19 +29,25 @@ make
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install-strip
+%post
+mkmpiodev
+ldconfig
+
+%preun
+mkmpiodev -r
+
%files
-# %attr(750,root,news) %dir %confdir/
-# %attr(640,root,news) %confdir/config.example
-# %defattr(755,root,root)
-# %prefix/bin/newsq
-# %defattr(755,root,root)
-# %prefix/sbin/*
-# %defattr(644,root,root)
-# %doc %_mandir/man1/*
-# %doc %_mandir/man8/*
+%defattr(755,root,root)
+%prefix/bin/mpiosh
+%prefix/lib/libmpio*
+%defattr(700,root,root)
+%prefix/sbin/mkmpiodev
+%defattr(644,root,root)
+@MODULE_PATH@/mpio.o
%doc COPYING ChangeLog INSTALL NEWS
%doc README TODO
%clean
rm -rf $RPM_BUILD_ROOT
+
diff --git a/mpiosh/mpiosh.c b/mpiosh/mpiosh.c
index 30a773c..79285d3 100644
--- a/mpiosh/mpiosh.c
+++ b/mpiosh/mpiosh.c
@@ -2,7 +2,7 @@
/*
*
- * $Id: mpiosh.c,v 1.11 2002/09/15 12:03:23 germeier Exp $
+ * $Id: mpiosh.c,v 1.12 2002/09/15 14:55:58 crunchy Exp $
*
* Author: Andreas Büsching <crunchy@tzi.de>
*
@@ -109,9 +109,9 @@ mpiosh_cmd_t commands[] = {
{ "format", NULL,
"format current memory card",
mpiosh_cmd_format },
- { "switch", "<file1> <file2>",
- "switches the order of two files",
- mpiosh_cmd_switch },
+/* { "switch", "<file1> <file2>", */
+/* "switches the order of two files", */
+/* mpiosh_cmd_switch }, */
{ "ldir", NULL,
"list local directory",
mpiosh_cmd_ldir },