]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - mediaServer should have init-scripts, user, etc, etc... | |
3 | # - package test apps (?) | |
4 | # | |
5 | # Conditional build: | |
6 | %bcond_without static_libs # static libraries | |
7 | %bcond_without atomic_flag # C++20 std::atomic_flag functionality | |
8 | ||
9 | Summary: LIVE555 streaming media server | |
10 | Summary(pl.UTF-8): LIVE555 - serwer strumieni multimedialnych | |
11 | Name: live | |
12 | Version: 2024.02.28 | |
13 | Release: 1 | |
14 | Epoch: 2 | |
15 | License: LGPL v2.1+ | |
16 | Group: Applications/Multimedia | |
17 | Source0: http://www.live555.com/liveMedia/public/%{name}.%{version}.tar.gz | |
18 | # Source0-md5: 8c4a142349abbdf6e5e24813c7a15501 | |
19 | Source1: http://www.live555.com/liveMedia/public/changelog.txt | |
20 | # Source1-md5: 000f6435ea418b0365f68d83edd7a361 | |
21 | Patch0: %{name}-link.patch | |
22 | # from debian | |
23 | Patch1: %{name}-pkgconfig.patch | |
24 | URL: http://www.live555.com/liveMedia/ | |
25 | %if %{with atomic_flag} | |
26 | BuildRequires: libstdc++-devel >= 6:11 | |
27 | %else | |
28 | BuildRequires: libstdc++-devel | |
29 | %endif | |
30 | BuildRequires: openssl-devel | |
31 | BuildRequires: sed >= 4.0 | |
32 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} | |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %define specflags -fno-strict-aliasing | |
36 | # circular symbol dependencies with libBasicUsageEnvironment | |
37 | %define skip_post_check_so .*%{_libdir}/libUsageEnvironment\.so.* | |
38 | ||
39 | %description | |
40 | LIVE555 streaming media server. | |
41 | ||
42 | %description -l pl.UTF-8 | |
43 | LIVE555 - serwer strumieni multimedialnych. | |
44 | ||
45 | %package libs | |
46 | Summary: Shared LIVE555 libraries for streaming media | |
47 | Summary(pl.UTF-8): Biblioteki współdzielone LIVE555 do strumieni multimedialnych | |
48 | Group: Libraries | |
49 | ||
50 | %description libs | |
51 | Shared LIVE555 libraries for streaming media. | |
52 | ||
53 | %description libs -l pl.UTF-8 | |
54 | Biblioteki współdzielone LIVE555 do strumieni multimedialnych. | |
55 | ||
56 | %package devel | |
57 | Summary: Header files for developing programs using LIVE555 | |
58 | Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki LIVE555 | |
59 | Group: Development/Libraries | |
60 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} | |
61 | Requires: libstdc++-devel | |
62 | Obsoletes: live < 2:2009.07.09-2.5 | |
63 | ||
64 | %description devel | |
65 | Header files for developing programs using LIVE555. | |
66 | ||
67 | %description devel -l pl.UTF-8 | |
68 | Pliki nagłówkowe do biblioteki LIVE555 | |
69 | ||
70 | %package static | |
71 | Summary: Static LIVE555 libraries for streaming media | |
72 | Summary(pl.UTF-8): Biblioteki statyczne LIVE555 do strumieni multimedialnych | |
73 | Group: Development/Libraries | |
74 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
75 | ||
76 | %description static | |
77 | Static LIVE555 libraries for streaming media. | |
78 | ||
79 | %description static -l pl.UTF-8 | |
80 | Biblioteki statyczne LIVE555 do strumieni multimedialnych. | |
81 | ||
82 | %prep | |
83 | %setup -q -c | |
84 | %patch0 -p1 | |
85 | %patch1 -p1 | |
86 | ||
87 | # disable building test programs | |
88 | %{__sed} -i -e '/cd \$(TESTPROGS_DIR)/d' live/Makefile.tail | |
89 | ||
90 | # out-of-source builds not supported, so clone sources for shared and static build | |
91 | %if %{with static_libs} | |
92 | cp -pPR live live-static | |
93 | %endif | |
94 | %{__mv} live live-shared | |
95 | ||
96 | cp -af %{SOURCE1} ChangeLog.txt | |
97 | ||
98 | %build | |
99 | %if %{with static_libs} | |
100 | cd live-static | |
101 | ./genMakefiles linux | |
102 | %{__make} \ | |
103 | C_COMPILER="%{__cc}" \ | |
104 | CPLUSPLUS_COMPILER="%{__cxx}" \ | |
105 | CPPFLAGS="%{rpmcppflags} %{!?with_atomic_flag:-DNO_STD_LIB}" \ | |
106 | CFLAGS="%{rpmcflags} -fPIC" \ | |
107 | CXXFLAGS="%{rpmcxxflags} -fPIC %{?with_atomic_flag:-std=c++20}" | |
108 | cd .. | |
109 | %endif | |
110 | ||
111 | cd live-shared | |
112 | ./genMakefiles linux-with-shared-libraries | |
113 | %{__make} \ | |
114 | C_COMPILER="%{__cc}" \ | |
115 | CPLUSPLUS_COMPILER="%{__cxx}" \ | |
116 | CPPFLAGS="%{rpmcppflags} %{!?with_atomic_flag:-DNO_STD_LIB}" \ | |
117 | CFLAGS="%{rpmcflags}" \ | |
118 | CXXFLAGS="%{rpmcxxflags} %{?with_atomic_flag:-std=c++20}" \ | |
119 | LIBRARY_LINK="%{__cxx} -o" | |
120 | ||
121 | %install | |
122 | rm -rf $RPM_BUILD_ROOT | |
123 | ||
124 | %if %{with static_libs} | |
125 | # static first so that binaries will be overwritten by shared version | |
126 | %{__make} -C live-static install \ | |
127 | PREFIX=%{_prefix} \ | |
128 | LIBDIR=%{_libdir} \ | |
129 | DESTDIR=$RPM_BUILD_ROOT | |
130 | %endif | |
131 | ||
132 | %{__make} -C live-shared install \ | |
133 | PREFIX=%{_prefix} \ | |
134 | LIBDIR=%{_libdir} \ | |
135 | DESTDIR=$RPM_BUILD_ROOT | |
136 | ||
137 | %clean | |
138 | rm -rf $RPM_BUILD_ROOT | |
139 | ||
140 | %post libs -p /sbin/ldconfig | |
141 | %postun libs -p /sbin/ldconfig | |
142 | ||
143 | %files | |
144 | %defattr(644,root,root,755) | |
145 | %attr(755,root,root) %{_bindir}/live555HLSProxy | |
146 | %attr(755,root,root) %{_bindir}/live555MediaServer | |
147 | %attr(755,root,root) %{_bindir}/live555ProxyServer | |
148 | ||
149 | %files libs | |
150 | %defattr(644,root,root,755) | |
151 | %attr(755,root,root) %{_libdir}/libBasicUsageEnvironment.so.*.*.* | |
152 | %attr(755,root,root) %ghost %{_libdir}/libBasicUsageEnvironment.so.2 | |
153 | %attr(755,root,root) %{_libdir}/libUsageEnvironment.so.*.*.* | |
154 | %attr(755,root,root) %ghost %{_libdir}/libUsageEnvironment.so.3 | |
155 | %attr(755,root,root) %{_libdir}/libgroupsock.so.*.*.* | |
156 | %attr(755,root,root) %ghost %{_libdir}/libgroupsock.so.30 | |
157 | %attr(755,root,root) %{_libdir}/libliveMedia.so.*.*.* | |
158 | %attr(755,root,root) %ghost %{_libdir}/libliveMedia.so.112 | |
159 | ||
160 | %files devel | |
161 | %defattr(644,root,root,755) | |
162 | %doc ChangeLog.txt | |
163 | %attr(755,root,root) %{_libdir}/libBasicUsageEnvironment.so | |
164 | %attr(755,root,root) %{_libdir}/libUsageEnvironment.so | |
165 | %attr(755,root,root) %{_libdir}/libgroupsock.so | |
166 | %attr(755,root,root) %{_libdir}/libliveMedia.so | |
167 | %{_includedir}/BasicUsageEnvironment | |
168 | %{_includedir}/UsageEnvironment | |
169 | %{_includedir}/groupsock | |
170 | %{_includedir}/liveMedia | |
171 | %{_pkgconfigdir}/live555.pc | |
172 | ||
173 | %if %{with static_libs} | |
174 | %files static | |
175 | %defattr(644,root,root,755) | |
176 | %{_libdir}/libBasicUsageEnvironment.a | |
177 | %{_libdir}/libUsageEnvironment.a | |
178 | %{_libdir}/libgroupsock.a | |
179 | %{_libdir}/libliveMedia.a | |
180 | %endif |