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