]>
Commit | Line | Data |
---|---|---|
5ad428f3 JB |
1 | # TODO: don't build debug version of libraries when not packaging them |
2 | # | |
3 | # Conditional build: | |
4 | %bcond_without allegro # Allegro libraries | |
5 | %bcond_without debug_libs # debug libraries packaging (they are built anyway) | |
6 | # | |
7 | Summary: DUMB - Dynamic Universal Music Bibliotheque | |
8 | Summary(pl.UTF-8): DUMB - uniwersalna biblioteka do odtwarzania muzyki | |
2f7ebe08 | 9 | Name: dumb |
7fb59113 | 10 | Version: 0.9.3 |
0da57d56 | 11 | Release: 6 |
2f7ebe08 TP |
12 | License: GPL-like |
13 | Group: Development/Libraries | |
5ad428f3 | 14 | Source0: http://downloads.sourceforge.net/dumb/%{name}-%{version}.tar.gz |
7fb59113 | 15 | # Source0-md5: f48da5b990aa8aa822d3b6a951baf5c2 |
5ad428f3 | 16 | Patch0: %{name}-shared.patch |
2f7ebe08 | 17 | URL: http://dumb.sourceforge.net/ |
5ad428f3 JB |
18 | %{?with_allegro:BuildRequires: allegro-devel} |
19 | BuildRequires: libtool | |
2f7ebe08 TP |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
21 | ||
1aa6253a | 22 | %define specflags_ia32 -fomit-frame-pointer |
fee7abb5 | 23 | |
2f7ebe08 | 24 | %description |
5ad428f3 JB |
25 | DUMB (Dynamic Universal Music Bibliotheque, formerly Dedicated |
26 | Universal Music Bastardisation) - IT, XM, S3M and MOD player library. | |
2f7ebe08 | 27 | |
2bc4c36f | 28 | %description -l pl.UTF-8 |
5ad428f3 JB |
29 | DUMB (Dynamic Universal Music Bibliotheque, dawniej Dedicated |
30 | Universal Music Bastardisation) - biblioteka do odtwarzania muzyki w | |
31 | formatach IT, XM, S3M i MOD. | |
2f7ebe08 | 32 | |
7fb59113 | 33 | %package devel |
5ad428f3 JB |
34 | Summary: Header files for DUMB library |
35 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki DUMB | |
7fb59113 | 36 | Group: Development/Libraries |
5ad428f3 | 37 | Requires: %{name} = %{version}-%{release} |
7fb59113 | 38 | |
39 | %description devel | |
5ad428f3 | 40 | Header files for DUMB library. |
7fb59113 | 41 | |
2bc4c36f | 42 | %description devel -l pl.UTF-8 |
5ad428f3 | 43 | Pliki nagłówkowe biblioteki DUMB. |
7fb59113 | 44 | |
45 | %package static | |
5ad428f3 JB |
46 | Summary: Static DUMB libraries |
47 | Summary(pl.UTF-8): Statyczne biblioteki DUMB | |
7fb59113 | 48 | Group: Development/Libraries |
49 | Requires: %{name}-devel = %{version}-%{release} | |
50 | ||
51 | %description static | |
5ad428f3 | 52 | Static DUMB libraries. |
7fb59113 | 53 | |
2bc4c36f | 54 | %description static -l pl.UTF-8 |
5ad428f3 JB |
55 | Statyczne biblioteki DUMB. |
56 | ||
57 | %package allegro | |
58 | Summary: DUMB Allegro library | |
59 | Summary(pl.UTF-8): Biblioteka DUMB dla Allegro | |
60 | Group: Libraries | |
61 | Requires: %{name} = %{version}-%{release} | |
62 | ||
63 | %description allegro | |
64 | DUMB Allegro library. | |
65 | ||
66 | %description allegro -l pl.UTF-8 | |
67 | Biblioteka DUMB dla Allegro. | |
68 | ||
69 | %package allegro-devel | |
70 | Summary: Header files for DUMB Allegro library | |
71 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki DUMB dla Allegro | |
72 | Group: Development/Libraries | |
73 | Requires: %{name}-allegro = %{version}-%{release} | |
74 | Requires: %{name}-devel = %{version}-%{release} | |
75 | Requires: allegro-devel | |
76 | ||
77 | %description allegro-devel | |
78 | Header files for DUMB Allegro library. | |
79 | ||
80 | %description allegro-devel -l pl.UTF-8 | |
81 | Pliki nagłówkowe biblioteki DUMB dla Allegro. | |
82 | ||
83 | %package allegro-static | |
84 | Summary: Static DUMB Allegro libraries | |
85 | Summary(pl.UTF-8): Statyczne biblioteki DUMB dla Allegro | |
86 | Group: Development/Libraries | |
87 | Requires: %{name}-allegro-devel = %{version}-%{release} | |
88 | ||
89 | %description allegro-static | |
90 | Static DUMB Allegro libraries. | |
91 | ||
92 | %description allegro-static -l pl.UTF-8 | |
93 | Statyczne biblioteki DUMB dla Allegro. | |
7fb59113 | 94 | |
2f7ebe08 | 95 | %prep |
7fb59113 | 96 | %setup -q |
5ad428f3 | 97 | %patch0 -p1 |
2f7ebe08 TP |
98 | |
99 | %build | |
24fe8051 TP |
100 | cat <<EOF > make/config.txt |
101 | include make/unix.inc | |
102 | ALL_TARGETS := core core-examples core-headers | |
5ad428f3 | 103 | %if %{with allegro} |
24fe8051 | 104 | ALL_TARGETS += allegro allegro-examples allegro-headers |
5ad428f3 | 105 | %endif |
24fe8051 TP |
106 | PREFIX := /usr |
107 | EOF | |
108 | ||
ec1a6992 | 109 | %{__make} -j1 all \ |
7fb59113 | 110 | CC="%{__cc}" \ |
1aa6253a ER |
111 | LDFLAGS="%{rpmldflags}" \ |
112 | OFLAGS="%{rpmcflags}" \ | |
5ad428f3 JB |
113 | DBGFLAGS="-DDEBUGMODE=1 %{rpmcflags}" \ |
114 | LIB_INSTALL_PATH=%{_libdir} | |
2f7ebe08 TP |
115 | |
116 | %install | |
117 | rm -rf $RPM_BUILD_ROOT | |
7fb59113 | 118 | install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir}} |
2f7ebe08 | 119 | |
7fb59113 | 120 | %{__make} install \ |
8f061012 JB |
121 | PREFIX=$RPM_BUILD_ROOT%{_prefix} \ |
122 | LIB_INSTALL_PATH=$RPM_BUILD_ROOT%{_libdir} | |
1aa6253a | 123 | |
2f7ebe08 TP |
124 | %clean |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | ||
5ad428f3 JB |
127 | %post -p /sbin/ldconfig |
128 | %postun -p /sbin/ldconfig | |
129 | ||
130 | %post allegro -p /sbin/ldconfig | |
131 | %postun allegro -p /sbin/ldconfig | |
132 | ||
2f7ebe08 TP |
133 | %files |
134 | %defattr(644,root,root,755) | |
5ad428f3 JB |
135 | %doc *.txt docs/*.txt |
136 | %attr(755,root,root) %{_bindir}/dumb2wav | |
137 | %attr(755,root,root) %{_bindir}/dumbout | |
138 | %attr(755,root,root) %{_libdir}/libdumb.so.*.*.* | |
139 | %attr(755,root,root) %ghost %{_libdir}/libdumb.so.0 | |
140 | %if %{with debug_libs} | |
141 | %attr(755,root,root) %{_libdir}/libdumbd.so.*.*.* | |
142 | %attr(755,root,root) %ghost %{_libdir}/libdumbd.so.0 | |
143 | %endif | |
7fb59113 | 144 | |
145 | %files devel | |
146 | %defattr(644,root,root,755) | |
5ad428f3 JB |
147 | %attr(755,root,root) %{_libdir}/libdumb.so |
148 | %{_libdir}/libdumb.la | |
149 | %if %{with debug_libs} | |
150 | %attr(755,root,root) %{_libdir}/libdumbd.so | |
151 | %{_libdir}/libdumbd.la | |
152 | %endif | |
8f061012 | 153 | %{_includedir}/dumb.h |
7fb59113 | 154 | |
155 | %files static | |
156 | %defattr(644,root,root,755) | |
8f061012 | 157 | %{_libdir}/libdumb.a |
5ad428f3 | 158 | %if %{with debug_libs} |
8f061012 | 159 | %{_libdir}/libdumbd.a |
5ad428f3 JB |
160 | %endif |
161 | ||
162 | %files allegro | |
163 | %defattr(644,root,root,755) | |
164 | %attr(755,root,root) %{_bindir}/dumbplay | |
165 | %attr(755,root,root) %{_libdir}/libaldmb.so.*.*.* | |
166 | %attr(755,root,root) %ghost %{_libdir}/libaldmb.so.0 | |
167 | %if %{with debug_libs} | |
168 | %attr(755,root,root) %{_libdir}/libaldmd.so.*.*.* | |
169 | %attr(755,root,root) %ghost %{_libdir}/libaldmd.so.0 | |
170 | %endif | |
171 | ||
172 | %files allegro-devel | |
173 | %defattr(644,root,root,755) | |
174 | %attr(755,root,root) %{_libdir}/libaldmb.so | |
175 | %{_libdir}/libaldmb.la | |
176 | %if %{with debug_libs} | |
177 | %attr(755,root,root) %{_libdir}/libaldmd.so | |
178 | %{_libdir}/libaldmd.la | |
179 | %endif | |
180 | %{_includedir}/aldumb.h | |
181 | ||
182 | %files allegro-static | |
183 | %defattr(644,root,root,755) | |
8f061012 | 184 | %{_libdir}/libaldmb.a |
5ad428f3 | 185 | %if %{with debug_libs} |
8f061012 | 186 | %{_libdir}/libaldmd.a |
5ad428f3 | 187 | %endif |