]>
Commit | Line | Data |
---|---|---|
d1b3878e JB |
1 | # |
2 | # Conditional build: | |
a4961162 | 3 | %bcond_without apidocs # API documentation (doxygen based) |
d1b3878e | 4 | %bcond_without openmpt123 # openmpt123 CLI player |
bcc26619 | 5 | %bcond_without portaudio # PortAudio support |
d1b3878e | 6 | %bcond_with sdl # SDL2 output in openmpt123 |
6e5efc6d | 7 | %bcond_without static_libs # static library |
d1b3878e JB |
8 | %bcond_without tests # unit tests |
9 | # | |
10 | Summary: Tracker module player based on OpenMPT | |
11 | Summary(pl.UTF-8): Odtwarzacz modułów ścieżkowych oparty na OpenMPT | |
12 | Name: libopenmpt | |
9415bfe6 | 13 | Version: 0.7.6 |
6e5efc6d | 14 | Release: 1 |
d1b3878e JB |
15 | License: BSD |
16 | Group: Libraries | |
a4961162 | 17 | Source0: https://lib.openmpt.org/files/libopenmpt/src/%{name}-%{version}+release.autotools.tar.gz |
9415bfe6 | 18 | # Source0-md5: ee6a65259bb64f7f60711e3f91a81a98 |
d1b3878e | 19 | URL: https://lib.openmpt.org/ |
a4961162 | 20 | %{?with_apidocs:BuildRequires: doxygen} |
4ac1e1bb | 21 | BuildRequires: libmpg123-devel >= 1.14.0 |
765c9443 | 22 | BuildRequires: libstdc++-devel >= 6:7 |
d1b3878e JB |
23 | BuildRequires: libogg-devel |
24 | BuildRequires: libvorbis-devel | |
25 | BuildRequires: pkgconfig >= 1:0.24 | |
08b3cc3d | 26 | BuildRequires: rpm-build >= 4.6 |
b2eb5c97 | 27 | BuildRequires: rpmbuild(macros) >= 1.752 |
d1b3878e JB |
28 | BuildRequires: zlib-devel |
29 | %if %{with openmpt123} | |
765c9443 | 30 | %{?with_sdl:BuildRequires: SDL2-devel >= 2.0.4} |
d1b3878e JB |
31 | BuildRequires: flac-devel >= 1.3.0 |
32 | BuildRequires: libsndfile-devel | |
bcc26619 | 33 | %if %{with portaudio} |
d1b3878e JB |
34 | BuildRequires: portaudio-devel >= 19 |
35 | BuildRequires: portaudio-c++-devel >= 19 | |
bcc26619 | 36 | %endif |
d1b3878e JB |
37 | BuildRequires: pulseaudio-devel |
38 | %endif | |
4ac1e1bb | 39 | Requires: libmpg123 >= 1.14.0 |
d1b3878e JB |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
41 | ||
42 | %description | |
43 | Tracker module player based on OpenMPT. | |
44 | ||
45 | %description -l pl.UTF-8 | |
46 | Odtwarzacz modułów ścieżkowych oparty na OpenMPT. | |
47 | ||
48 | %package devel | |
49 | Summary: Header files for OpenMPT library | |
50 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenMPT | |
51 | Group: Development/Libraries | |
52 | Requires: %{name} = %{version}-%{release} | |
53 | Requires: libmpg123-devel | |
54 | Requires: libogg-devel | |
55 | Requires: libvorbis-devel | |
56 | Requires: zlib-devel | |
57 | ||
58 | %description devel | |
59 | Header files for OpenMPT library. | |
60 | ||
61 | %description devel -l pl.UTF-8 | |
62 | Pliki nagłówkowe biblioteki OpenMPT. | |
63 | ||
64 | %package static | |
65 | Summary: Static OpenMPT library | |
66 | Summary(pl.UTF-8): Statyczna biblioteka OpenMPT | |
67 | Group: Development/Libraries | |
68 | Requires: %{name}-devel = %{version}-%{release} | |
69 | ||
70 | %description static | |
71 | Static OpenMPT library. | |
72 | ||
73 | %description static -l pl.UTF-8 | |
74 | Statyczna biblioteka OpenMPT. | |
75 | ||
76 | %package apidocs | |
77 | Summary: API documentation for OpenMPT library | |
78 | Summary(pl.UTF-8): Dokumentacja API biblioteki OpenMPT | |
79 | Group: Documentation | |
ce571571 | 80 | BuildArch: noarch |
d1b3878e JB |
81 | |
82 | %description apidocs | |
83 | API documentation and examples for OpenMPT library. | |
84 | ||
85 | %description apidocs -l pl.UTF-8 | |
86 | Dokumentacja API i przykłady do biblioteki OpenMPT. | |
87 | ||
88 | %package -n openmpt123 | |
89 | Summary: Command line module music player based on libopenmpt | |
90 | Summary(pl.UTF-8): Działający z linii poleceń odtwarzacz modułów muzycznych oparty na libopenmpt | |
91 | Group: Applications/Sound | |
92 | Requires: %{name} = %{version}-%{release} | |
a4961162 | 93 | Requires: flac >= 1.3.0 |
d1b3878e JB |
94 | |
95 | %description -n openmpt123 | |
96 | Command line module music player based on libopenmpt. | |
97 | ||
98 | %description -n openmpt123 -l pl.UTF-8 | |
99 | Działający z linii poleceń odtwarzacz modułów muzycznych oparty na | |
100 | libopenmpt. | |
101 | ||
102 | %prep | |
a4961162 | 103 | %setup -q -n %{name}-%{version}+release.autotools |
d1b3878e JB |
104 | |
105 | %build | |
106 | %configure \ | |
17e05002 | 107 | --disable-examples \ |
d1b3878e JB |
108 | %{!?with_openmpt123:--disable-openmpt123} \ |
109 | %{!?with_static_libs:--disable-static} \ | |
bcc26619 JP |
110 | %{!?with_portaudio:--without-portaudio} \ |
111 | %{!?with_portaudio:--without-portaudiocpp} \ | |
d1b3878e JB |
112 | %{?with_sdl:--with-sdl2} |
113 | %{__make} | |
114 | ||
115 | %if %{with tests} | |
116 | %{__make} check | |
117 | %endif | |
118 | ||
a4961162 JB |
119 | %if %{with apidocs} |
120 | doxygen | |
121 | %endif | |
122 | ||
d1b3878e JB |
123 | %install |
124 | rm -rf $RPM_BUILD_ROOT | |
125 | ||
126 | %{__make} install \ | |
127 | DESTDIR=$RPM_BUILD_ROOT | |
128 | ||
a4961162 | 129 | %if %{with apidocs} |
d1b3878e JB |
130 | install -d $RPM_BUILD_ROOT%{_examplesdir} |
131 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
a4961162 | 132 | %endif |
d1b3878e JB |
133 | # packaged as %doc / examples |
134 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} | |
135 | # obsoleted by pkg-config | |
136 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libopenmpt.la | |
137 | ||
138 | %clean | |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | ||
141 | %post -p /sbin/ldconfig | |
142 | %postun -p /sbin/ldconfig | |
143 | ||
144 | %files | |
145 | %defattr(644,root,root,755) | |
146 | # don't package README.md here, it contains only packager and libopenmpt developer information | |
a4961162 | 147 | %doc LICENSE |
d1b3878e JB |
148 | %attr(755,root,root) %{_libdir}/libopenmpt.so.*.*.* |
149 | %attr(755,root,root) %ghost %{_libdir}/libopenmpt.so.0 | |
150 | ||
151 | %files devel | |
152 | %defattr(644,root,root,755) | |
153 | %attr(755,root,root) %{_libdir}/libopenmpt.so | |
154 | %{_includedir}/libopenmpt | |
155 | %{_pkgconfigdir}/libopenmpt.pc | |
156 | ||
157 | %if %{with static_libs} | |
158 | %files static | |
159 | %defattr(644,root,root,755) | |
160 | %{_libdir}/libopenmpt.a | |
161 | %endif | |
162 | ||
a4961162 | 163 | %if %{with apidocs} |
d1b3878e JB |
164 | %files apidocs |
165 | %defattr(644,root,root,755) | |
166 | %doc doxygen-doc/html/* | |
167 | %{_examplesdir}/%{name}-%{version} | |
a4961162 | 168 | %endif |
d1b3878e JB |
169 | |
170 | %if %{with openmpt123} | |
171 | %files -n openmpt123 | |
172 | %defattr(644,root,root,755) | |
173 | %attr(755,root,root) %{_bindir}/openmpt123 | |
174 | %{_mandir}/man1/openmpt123.1* | |
175 | %endif |