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