]>
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 | |
a4961162 | 12 | Version: 0.3.4 |
d1b3878e JB |
13 | Release: 1 |
14 | License: BSD | |
15 | Group: Libraries | |
a4961162 JB |
16 | Source0: https://lib.openmpt.org/files/libopenmpt/src/%{name}-%{version}+release.autotools.tar.gz |
17 | # Source0-md5: de8ec867feff4460a8c707ee3388df09 | |
d1b3878e | 18 | URL: https://lib.openmpt.org/ |
a4961162 JB |
19 | %{?with_apidocs:BuildRequires: doxygen} |
20 | BuildRequires: libmpg123-devel >= 1.13.0 | |
d1b3878e JB |
21 | BuildRequires: libstdc++-devel >= 6:4.3 |
22 | BuildRequires: libogg-devel | |
23 | BuildRequires: libvorbis-devel | |
24 | BuildRequires: pkgconfig >= 1:0.24 | |
25 | BuildRequires: zlib-devel | |
26 | %if %{with openmpt123} | |
27 | %{?with_sdl:BuildRequires: SDL2-devel >= 2} | |
28 | BuildRequires: flac-devel >= 1.3.0 | |
29 | BuildRequires: libsndfile-devel | |
30 | BuildRequires: portaudio-devel >= 19 | |
31 | BuildRequires: portaudio-c++-devel >= 19 | |
32 | BuildRequires: pulseaudio-devel | |
33 | %endif | |
a4961162 | 34 | Requires: libmpg123 >= 1.13.0 |
d1b3878e JB |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
37 | %description | |
38 | Tracker module player based on OpenMPT. | |
39 | ||
40 | %description -l pl.UTF-8 | |
41 | Odtwarzacz modułów ścieżkowych oparty na OpenMPT. | |
42 | ||
43 | %package devel | |
44 | Summary: Header files for OpenMPT library | |
45 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenMPT | |
46 | Group: Development/Libraries | |
47 | Requires: %{name} = %{version}-%{release} | |
48 | Requires: libmpg123-devel | |
49 | Requires: libogg-devel | |
50 | Requires: libvorbis-devel | |
51 | Requires: zlib-devel | |
52 | ||
53 | %description devel | |
54 | Header files for OpenMPT library. | |
55 | ||
56 | %description devel -l pl.UTF-8 | |
57 | Pliki nagłówkowe biblioteki OpenMPT. | |
58 | ||
59 | %package static | |
60 | Summary: Static OpenMPT library | |
61 | Summary(pl.UTF-8): Statyczna biblioteka OpenMPT | |
62 | Group: Development/Libraries | |
63 | Requires: %{name}-devel = %{version}-%{release} | |
64 | ||
65 | %description static | |
66 | Static OpenMPT library. | |
67 | ||
68 | %description static -l pl.UTF-8 | |
69 | Statyczna biblioteka OpenMPT. | |
70 | ||
71 | %package apidocs | |
72 | Summary: API documentation for OpenMPT library | |
73 | Summary(pl.UTF-8): Dokumentacja API biblioteki OpenMPT | |
74 | Group: Documentation | |
75 | %if "%{_rpmversion}" >= "5" | |
76 | BuildArch: noarch | |
77 | %endif | |
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 |