]> git.pld-linux.org Git - packages/libopenmpt.git/blob - libopenmpt.spec
- updated to 0.5.4
[packages/libopenmpt.git] / libopenmpt.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # API documentation (doxygen based)
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
12 Version:        0.5.4
13 Release:        1
14 License:        BSD
15 Group:          Libraries
16 Source0:        https://lib.openmpt.org/files/libopenmpt/src/%{name}-%{version}+release.autotools.tar.gz
17 # Source0-md5:  87d632a0bab802f9937660440d26507e
18 URL:            https://lib.openmpt.org/
19 %{?with_apidocs:BuildRequires:  doxygen}
20 BuildRequires:  libmpg123-devel >= 1.14.0
21 BuildRequires:  libstdc++-devel >= 6:7
22 BuildRequires:  libogg-devel
23 BuildRequires:  libvorbis-devel
24 BuildRequires:  pkgconfig >= 1:0.24
25 BuildRequires:  rpmbuild(macros) >= 1.752
26 BuildRequires:  zlib-devel
27 %if %{with openmpt123}
28 %{?with_sdl:BuildRequires:      SDL2-devel >= 2.0.4}
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
35 Requires:       libmpg123 >= 1.14.0
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
76 %{?noarchpackage}
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 Requires:       flac >= 1.3.0
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
99 %setup -q -n %{name}-%{version}+release.autotools
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
112 %if %{with apidocs}
113 doxygen
114 %endif
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118
119 %{__make} install \
120         DESTDIR=$RPM_BUILD_ROOT
121
122 %if %{with apidocs}
123 install -d $RPM_BUILD_ROOT%{_examplesdir}
124 %{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
125 %endif
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
140 %doc LICENSE
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
156 %if %{with apidocs}
157 %files apidocs
158 %defattr(644,root,root,755)
159 %doc doxygen-doc/html/*
160 %{_examplesdir}/%{name}-%{version}
161 %endif
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
This page took 0.041631 seconds and 3 git commands to generate.