File: pmidi.spec.in

package info (click to toggle)
pmidi-0.9 1.5.4-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 452 kB
  • ctags: 637
  • sloc: ansic: 2,905; sh: 2,365; makefile: 84
file content (101 lines) | stat: -rw-r--r-- 2,593 bytes parent folder | download | duplicates (5)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
%define ver	@VERSION@
%define rel	1
%define prefix	/usr

Summary:	A Command Line MIDI Player Through ALSA Sequencer.
Name:		@PACKAGE@
Version:	%{ver}
Release:	%{rel}
Copyright:	GPL
Group:		Applications/Multimedia/Audio
Source: ftp://download.sourceforge.net/pub/sourceforge/@PACKAGE@/@PACKAGE@-@VERSION@.tar.gz
URL:		http://@PACKAGE@.sourceforge.net
BuildRoot:	/usr/tmp/@PACKAGE@-@VERSION@-%{rel}-root
Packager:	Habibie <habibie@NetZero.net>
Docdir:		%{prefix}/doc

%description
@PACKAGE@ is a command line midi player for ALSA.  It can play to any MIDI
device that is supported by ALSA.  Most external MIDI ports are supported.
The sfxload program included with the awesfx is required to load a sound
font first to using the internal synthesizer on a SB Live! or SB AWE32/64.

Authors:
	Steve Ratcliffe	<steve@parabola.demon.co.uk>


%prep
%setup -q


%build
# Needed for snapshot releases.
if [ ! -f configure ]; then
	CFLAGS="${RPM_OPT_FLAGS}" ./autogen.sh --prefix=%prefix
else
	CFLAGS="${RPM_OPT_FLAGS}" ./configure --prefix=%prefix
fi

[ "${SMP}" != "" ] && JSMP = '-j${SMP} "MAKE=make -j${SMP}"';
make ${JSMP};


%install
[ -d ${RPM_BUILD_ROOT} ] && rm -rf ${RPM_BUILD_ROOT}

make prefix=${RPM_BUILD_ROOT}%{prefix} install-strip

#
# Strip off binary and library files, if not done so.
#
# First, gathering the binary files list.
# Process and store them as FILEB
#
find ${RPM_BUILD_ROOT}%{prefix} -type f > file-lists;
FILEB=`file -f file-lists | awk -F':' '/executable/ { print $1 }'`

#
# Second, gathering the library files list.
# Process and store them as FILEL.
#
find ${RPM_BUILD_ROOT}%{prefix} -type f > file-lists;
FILEL=`file -f file-lists | awk -F':' '/shared object/ { print $1 }'`

#
# Then,  strip both the binary and library
# files listed in FILEB and FILEL.
#
[ "${FILEB}" ] && strip ${FILEB};
[ "${FILEL}" ] && strip ${FILEL};

#
# Compressing the info files and manpages, if any.
#
if [ -d ${RPM_BUILD_ROOT}%{prefix}/info ]; then
	(cd ${RPM_BUILD_ROOT}%{prefix}/info; [ -z dir ] && rm -f dir;)
	find ${RPM_BUILD_ROOT}%{prefix}/info -type f -exec gzip -9nf {} \;
fi

if [ -d ${RPM_BUILD_ROOT}%{prefix}/man ]; then
	find ${RPM_BUILD_ROOT}%{prefix}/man -type f -exec gzip -9nf {} \;
fi

#
# Generating the package file lists and store them in file-lists
#
echo "%defattr (-, root, root)" > file-lists
find ${RPM_BUILD_ROOT}%{prefix} -type f | sed -e "s#^${RPM_BUILD_ROOT}##g" >> file-lists


%clean
(PKGDIR=`pwd`; cd ..; rm -rf ${PKGDIR} ${RPM_BUILD_ROOT})


%files -f file-lists
%defattr (-, root, root)
%doc AUTHORS
%doc ChangeLog
%doc INSTALL
%doc NEWS
%doc README