]> git.pld-linux.org Git - packages/libopenmpt.git/blob - libopenmpt.spec
- updated to 0.4.11
[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.4.11
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:  0428a2b901560dbda9fe849fdc998acf
18 URL:            https://lib.openmpt.org/
19 %{?with_apidocs:BuildRequires:  doxygen}
20 BuildRequires:  libmpg123-devel >= 1.14.0
21 BuildRequires:  libstdc++-devel >= 6:4.7
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 Requires:       libmpg123 >= 1.14.0
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}
90 Requires:       flac >= 1.3.0
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
100 %setup -q -n %{name}-%{version}+release.autotools
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
113 %if %{with apidocs}
114 doxygen
115 %endif
116
117 %install
118 rm -rf $RPM_BUILD_ROOT
119
120 %{__make} install \
121         DESTDIR=$RPM_BUILD_ROOT
122
123 %if %{with apidocs}
124 install -d $RPM_BUILD_ROOT%{_examplesdir}
125 %{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
126 %endif
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
141 %doc LICENSE
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
157 %if %{with apidocs}
158 %files apidocs
159 %defattr(644,root,root,755)
160 %doc doxygen-doc/html/*
161 %{_examplesdir}/%{name}-%{version}
162 %endif
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
This page took 0.075708 seconds and 3 git commands to generate.