aboutsummaryrefslogtreecommitdiff
path: root/mpio.spec.in
blob: be662e283f56db87efa00e9e68fc8851b828cff8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# -*- rpm-spec -*-
%define version @VERSION@
%define release 1
%define name    mpio
%define spec_path @SPEC_PATH@
%define	prefix		/usr
%define sysconfdir	%prefix/etc

Version: %version
Summary: MPIO - providing access to MPIO mp3 players
Name: %name
Release: %release
Copyright: see COPYING
Group: Applications/MultiMedia
Source: http://download.sourceforge.net/mpio/mpio-@VERSION@.tar.gz
Prefix: %prefix
Buildroot: /var/tmp/mpio-@VERSION@-buildroot/
Packager: Andreas Büsching <crunchy@tzi.de>

%description
This is a project for using Digitalway/Adtec digital audio player MPIO
(DMG, DMK, DME) under Linux. It provides Linux kernel module driver,
a userspace library and at the moment one tool to access the MPIO player.

%prep
%setup
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix -sysconfdir=%sysconfdir

%build
make

%install
rm -rf $RPM_BUILD_ROOT
KVERSION=`uname -r`

echo "%defattr(755,root,root)" > /tmp/mpio-files.lst
echo "%prefix/bin/mpiosh" >> /tmp/mpio-files.lst
echo "%prefix/bin/mpiologo" >> /tmp/mpio-files.lst
echo "%prefix/lib/libmpio*" >> /tmp/mpio-files.lst
echo "%defattr(700,root,root)" >> /tmp/mpio-files.lst
echo "%prefix/sbin/mkmpiodev" >> /tmp/mpio-files.lst
echo "%defattr(644,root,root)" >> /tmp/mpio-files.lst
echo "/lib/modules/$KVERSION/%{spec_path}/mpio.o" >> /tmp/mpio-files.lst
echo "%defattr(644,root,root)" >> /tmp/mpio-files.lst
echo "%sysconfdir/mpio/mpioshrc" >> /tmp/mpio-files.lst

make DESTDIR=$RPM_BUILD_ROOT install

%post
mkmpiodev
ldconfig
depmod -a

%preun
mkmpiodev -r

%files -f /tmp/mpio-files.lst

%doc COPYING ChangeLog INSTALL NEWS
%doc README TODO

%clean
rm -rf $RPM_BUILD_ROOT
rm -f /tmp/mpio-files.lst