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