summaryrefslogtreecommitdiff
path: root/dumb.spec
blob: 6fd42616059740a4b9322ba3deb1e1c164efafdc (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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# TODO: don't build debug version of libraries when not packaging them
#
# Conditional build:
%bcond_without	allegro		# Allegro libraries
%bcond_without	debug_libs	# debug libraries packaging (they are built anyway)
#
Summary:	DUMB - Dynamic Universal Music Bibliotheque
Summary(pl.UTF-8):	DUMB - uniwersalna biblioteka do odtwarzania muzyki
Name:		dumb
Version:	0.9.3
Release:	6
License:	GPL-like
Group:		Development/Libraries
Source0:	http://downloads.sourceforge.net/dumb/%{name}-%{version}.tar.gz
# Source0-md5:	f48da5b990aa8aa822d3b6a951baf5c2
Patch0:		%{name}-shared.patch
URL:		http://dumb.sourceforge.net/
%{?with_allegro:BuildRequires:	allegro-devel}
BuildRequires:	libtool
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%define		specflags_ia32		-fomit-frame-pointer

%description
DUMB (Dynamic Universal Music Bibliotheque, formerly Dedicated
Universal Music Bastardisation) - IT, XM, S3M and MOD player library.

%description -l pl.UTF-8
DUMB (Dynamic Universal Music Bibliotheque, dawniej Dedicated
Universal Music Bastardisation) - biblioteka do odtwarzania muzyki w
formatach IT, XM, S3M i MOD.

%package devel
Summary:	Header files for DUMB library
Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki DUMB
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}

%description devel
Header files for DUMB library.

%description devel -l pl.UTF-8
Pliki nagłówkowe biblioteki DUMB.

%package static
Summary:	Static DUMB libraries
Summary(pl.UTF-8):	Statyczne biblioteki DUMB
Group:		Development/Libraries
Requires:	%{name}-devel = %{version}-%{release}

%description static
Static DUMB libraries.

%description static -l pl.UTF-8
Statyczne biblioteki DUMB.

%package allegro
Summary:	DUMB Allegro library
Summary(pl.UTF-8):	Biblioteka DUMB dla Allegro
Group:		Libraries
Requires:	%{name} = %{version}-%{release}

%description allegro
DUMB Allegro library.

%description allegro -l pl.UTF-8
Biblioteka DUMB dla Allegro.

%package allegro-devel
Summary:	Header files for DUMB Allegro library
Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki DUMB dla Allegro
Group:		Development/Libraries
Requires:	%{name}-allegro = %{version}-%{release}
Requires:	%{name}-devel = %{version}-%{release}
Requires:	allegro-devel

%description allegro-devel
Header files for DUMB Allegro library.

%description allegro-devel -l pl.UTF-8
Pliki nagłówkowe biblioteki DUMB dla Allegro.

%package allegro-static
Summary:	Static DUMB Allegro libraries
Summary(pl.UTF-8):	Statyczne biblioteki DUMB dla Allegro
Group:		Development/Libraries
Requires:	%{name}-allegro-devel = %{version}-%{release}

%description allegro-static
Static DUMB Allegro libraries.

%description allegro-static -l pl.UTF-8
Statyczne biblioteki DUMB dla Allegro.

%prep
%setup -q
%patch0 -p1

%build
cat <<EOF > make/config.txt
include make/unix.inc
ALL_TARGETS := core core-examples core-headers
%if %{with allegro}
ALL_TARGETS += allegro allegro-examples allegro-headers
%endif
PREFIX := /usr
EOF

%{__make} -j1 all \
	CC="%{__cc}" \
	LDFLAGS="%{rpmldflags}" \
	OFLAGS="%{rpmcflags}" \
	DBGFLAGS="-DDEBUGMODE=1 %{rpmcflags}" \
	LIB_INSTALL_PATH=%{_libdir}

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir}}

%{__make} install \
	PREFIX=$RPM_BUILD_ROOT%{_prefix} \
	LIB_INSTALL_PATH=$RPM_BUILD_ROOT%{_libdir}

%clean
rm -rf $RPM_BUILD_ROOT

%post	-p /sbin/ldconfig
%postun	-p /sbin/ldconfig

%post	allegro -p /sbin/ldconfig
%postun	allegro -p /sbin/ldconfig

%files
%defattr(644,root,root,755)
%doc *.txt docs/*.txt
%attr(755,root,root) %{_bindir}/dumb2wav
%attr(755,root,root) %{_bindir}/dumbout
%attr(755,root,root) %{_libdir}/libdumb.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libdumb.so.0
%if %{with debug_libs}
%attr(755,root,root) %{_libdir}/libdumbd.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libdumbd.so.0
%endif

%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libdumb.so
%{_libdir}/libdumb.la
%if %{with debug_libs}
%attr(755,root,root) %{_libdir}/libdumbd.so
%{_libdir}/libdumbd.la
%endif
%{_includedir}/dumb.h

%files static
%defattr(644,root,root,755)
%{_libdir}/libdumb.a
%if %{with debug_libs}
%{_libdir}/libdumbd.a
%endif

%files allegro
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/dumbplay
%attr(755,root,root) %{_libdir}/libaldmb.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libaldmb.so.0
%if %{with debug_libs}
%attr(755,root,root) %{_libdir}/libaldmd.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libaldmd.so.0
%endif

%files allegro-devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libaldmb.so
%{_libdir}/libaldmb.la
%if %{with debug_libs}
%attr(755,root,root) %{_libdir}/libaldmd.so
%{_libdir}/libaldmd.la
%endif
%{_includedir}/aldumb.h

%files allegro-static
%defattr(644,root,root,755)
%{_libdir}/libaldmb.a
%if %{with debug_libs}
%{_libdir}/libaldmd.a
%endif