]>
Commit | Line | Data |
---|---|---|
aa6db6e7 | 1 | # TODO |
bc34ab39 | 2 | # - bconds: altivec joystick lcd |
58422b0a | 3 | # - lcd? (app-misc/lcdproc) |
58422b0a | 4 | # - alpha, sparc, ppc arches? |
8afae0cb ER |
5 | # |
6 | # Specfile for MythTV | |
7 | # | |
8 | # MythTV now uses a fairly intelligent cpu-detection script, so if you are | |
9 | # building an rpm by hand on the machine it will be used on, I encourage you | |
10 | # to use "--with cpu_autodetect" to let mythtv decide for you. | |
11 | # | |
ed630fed | 12 | # Conditional build: |
af73c10e | 13 | %bcond_with cpu_autodetect # enable CPU autodetection at compile time (sets "-march", "-mcpu" compile flags really) |
cb059bf8 ER |
14 | %bcond_without lirc # lirc support |
15 | %bcond_without alsa # alsa support | |
9dc1d1be | 16 | %bcond_without oss # oss support |
8c0ea56f | 17 | %bcond_with arts # arts support |
cb059bf8 | 18 | %bcond_without jack # jack audio connection kit |
cb059bf8 | 19 | %bcond_without opengl # opengl vsync |
72445c7f | 20 | %bcond_without dvb # DVB support |
bc34ab39 | 21 | %bcond_without xrandr # disable X11 resolution switching |
8c0ea56f | 22 | %bcond_without ivtv # ivtv support (PVR-250, PVR-350) NFY |
23 | %bcond_without iptv | |
9dc1d1be | 24 | %bcond_with firewire # ieee1394 (NFY) |
bc34ab39 | 25 | %bcond_without xvmc # do not use XvMCW |
2dea5de0 | 26 | %bcond_without vdpau # disable nvidia vdpau support |
3650d7d4 | 27 | %bcond_with mmx # enable MMX |
8c0ea56f | 28 | %bcond_with dshowserver # enable directshow codecs server |
29 | %bcond_with directfb | |
32b3b293 ER |
30 | |
31 | # enable mmx automatically on arches having it | |
32 | %ifarch %{ix86} %{x8664} | |
33 | %ifnarch i386 i486 i586 i686 | |
34 | %define with_mmx 1 | |
35 | %endif | |
36 | %endif | |
cb059bf8 | 37 | |
8c0ea56f | 38 | # dshowserver is exclusive arch for x86 x86_64 only |
39 | %ifnarch %{ix86} %{x8664} | |
40 | %undefine with_dshowserver | |
41 | %endif | |
42 | ||
2dea5de0 | 43 | %define snap rc1 |
8c0ea56f | 44 | #%define rel 0.1 |
b2c9e730 | 45 | Summary: A personal video recorder (PVR) application |
7456895a | 46 | Summary(pl.UTF-8): Osobista aplikacja do nagrywania obrazu (PVR) |
910a00e3 | 47 | Name: mythtv |
8c0ea56f | 48 | Version: 0.22 |
2dea5de0 | 49 | Release: 0.%{snap}.1 |
910a00e3 | 50 | License: GPL v2 |
b2c9e730 | 51 | Group: Applications/Multimedia |
2dea5de0 | 52 | Source0: ftp://ftp.osuosl.org/pub/mythtv/%{name}-%{version}%{snap}.tar.bz2 |
53 | # Source0-md5: 049e93d78d5370351539c9a23b47e1af | |
eceeddea ER |
54 | Source1: mythbackend.sysconfig |
55 | Source2: mythbackend.init | |
56 | Source3: mythbackend.logrotate | |
8c0ea56f | 57 | Source5: pld-mythfrontend.desktop |
58 | # Source5-md5: f37a903ac97463683bebacdf29406951 | |
59 | Source6: pld-mythfrontend.png | |
60 | # Source6-md5: bf76bd1463a022e174e4af976a03e678 | |
61 | Source20: dshowcodecs | |
62 | # Source20-md5: 48327772b9e150f69e1ab8ff44b9a76c | |
63 | #Patch100: %{name}-branch.diff | |
64 | Patch0: %{name}-configure.patch | |
65 | #Patch1: %{name}-mythstream.patch | |
66 | #Patch2: %{name}-pl.patch | |
67 | Patch3: %{name}-sbinpath.patch | |
68 | #Patch4: %{name}-dvdnav-shared.patch | |
69 | Patch20: %{name}-dshowserver_trunk.patch | |
b2c9e730 | 70 | URL: http://www.mythtv.org/ |
8c0ea56f | 71 | BuildRequires: Mesa-libGLU-devel |
2dea5de0 | 72 | #BuildRequires: OpenGL-GLU-devel |
73 | %{?without_vdpau:BuildRequires: OpenGL-devel} | |
8c0ea56f | 74 | BuildRequires: Qt3Support-devel |
75 | BuildRequires: QtCore-devel | |
76 | BuildRequires: QtGui-devel | |
77 | BuildRequires: QtNetwork-devel | |
78 | BuildRequires: QtOpenGL-devel | |
79 | BuildRequires: QtScript-devel | |
80 | BuildRequires: QtSql-devel | |
81 | BuildRequires: QtWebKit-devel | |
82 | BuildRequires: QtXml-devel | |
ed630fed JB |
83 | %{?with_alsa:BuildRequires: alsa-lib-devel} |
84 | %{?with_arts:BuildRequires: arts-devel >= 13:0.9.5} | |
8c0ea56f | 85 | BuildRequires: ffmpeg-devel |
c0517663 | 86 | BuildRequires: freetype-devel >= 1:2.0.0 |
cb059bf8 | 87 | %{?with_jack:BuildRequires: jack-audio-connection-kit-devel} |
c0517663 | 88 | BuildRequires: lame-libs-devel |
c0517663 | 89 | %{?with_firewire:BuildRequires: libavc1394-devel} |
8c0ea56f | 90 | BuildRequires: libdts-devel |
96b717a5 ER |
91 | %{?with_dvb:BuildRequires: libdvb-devel} |
92 | BuildRequires: libdvdnav-devel | |
c0517663 ER |
93 | %{?with_firewire:BuildRequires: libiec61883-devel} |
94 | %{?with_firewire:BuildRequires: libraw1394-devel} | |
a3ec4ed6 | 95 | BuildRequires: linux-libc-headers >= 7:2.6.10 |
f3707f19 | 96 | %{?with_lirc:BuildRequires: lirc-devel} |
ed630fed | 97 | BuildRequires: mysql-devel |
8c0ea56f | 98 | #BuildRequires: patchutils |
99 | BuildRequires: perl-devel | |
100 | BuildRequires: perl-tools-pod | |
2dea5de0 | 101 | BuildRequires: pkgconfig |
8c0ea56f | 102 | BuildRequires: python-devel |
103 | BuildRequires: qt4-build | |
104 | BuildRequires: qt4-qmake | |
105 | BuildRequires: rpm-pythonprov | |
4cd4742b | 106 | BuildRequires: rpmbuild(macros) >= 1.228 |
ed630fed | 107 | BuildRequires: sed >= 4.0 |
2dea5de0 | 108 | %{?with_vdpau:BuildRequires: xorg-driver-video-nvidia-devel} |
5df4c947 | 109 | BuildRequires: xorg-lib-libXext-devel |
8c0ea56f | 110 | %{?with_xvmc:BuildRequires: xorg-lib-libXvMC-devel} |
ca754245 | 111 | BuildRequires: xorg-lib-libXxf86vm-devel |
8c0ea56f | 112 | # for Perl bindings |
113 | BuildRequires: perl-ExtUtils-MakeMaker | |
97b6efdd | 114 | ExclusiveArch: %{ix86} %{x8664} ppc |
910a00e3 | 115 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
8afae0cb | 116 | |
96b717a5 ER |
117 | %define myth_api_version %(echo %{version} | cut -d. -f1,2) |
118 | ||
8afae0cb | 119 | %description |
910a00e3 ER |
120 | MythTV implements the following PVR features, and more, with a unified |
121 | graphical interface: | |
5eccad13 ER |
122 | - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV. |
123 | - Video compression using RTjpeg or MPEG-4 | |
124 | - Program listing retrieval using XMLTV | |
125 | - Themable, semi-transparent on-screen display | |
126 | - Electronic program guide | |
127 | - Scheduled recording of TV programs | |
128 | - Resolution of conflicts between scheduled recordings | |
129 | - Basic video editing | |
8afae0cb | 130 | |
17176342 JR |
131 | %description -l pl.UTF-8 |
132 | MythTV implementuje następujące możliwości PVR, a nawet więcej, wraz z | |
ed630fed | 133 | ujednoliconym interfejsem graficznym: |
17176342 JR |
134 | - podstawowa funkcjonalność "live-tv"; pauza, szybkie przewijanie, |
135 | przewijanie "żywej" telewizji | |
136 | - kompresja obrazu przy użyciu RTjpeg lub MPEG-4 | |
137 | - odczyt listy programów przy użyciu XMLTV | |
138 | - pseudoprzezroczyste wyświetlanie na obrazie (OSD) z obsługą motywów | |
ed630fed | 139 | - elektroniczny przewodnik po programie |
17176342 JR |
140 | - planowane nagrywanie programów telewizyjnych |
141 | - rozwiązywanie konfliktów między planowanymi nagraniami | |
ed630fed | 142 | - podstawowa edycja obrazu |
a7691716 | 143 | |
ed630fed JB |
144 | %package backend |
145 | Summary: Server component of mythtv (a PVR) | |
7456895a | 146 | Summary(pl.UTF-8): Część serwerowa mythtv (PVR) |
910a00e3 | 147 | Group: Applications/Multimedia |
96b717a5 ER |
148 | Requires(post,preun): /sbin/chkconfig |
149 | Requires(postun): /usr/sbin/groupdel | |
150 | Requires(postun): /usr/sbin/userdel | |
ed630fed | 151 | Requires(pre): /bin/id |
f2f4277e | 152 | Requires(pre): /usr/bin/getgid |
ed630fed JB |
153 | Requires(pre): /usr/sbin/groupadd |
154 | Requires(pre): /usr/sbin/useradd | |
96b717a5 | 155 | Requires: libmyth = %{version}-%{release} |
ed630fed | 156 | Requires: mythtv = %{version}-%{release} |
2dea5de0 | 157 | Suggests: mysql |
ed630fed | 158 | Provides: group(mythtv) |
96b717a5 | 159 | Provides: user(mythtv) |
8afae0cb | 160 | |
ed630fed | 161 | %description backend |
910a00e3 ER |
162 | MythTV provides a unified graphical interface for recording and |
163 | viewing television programs. Refer to the mythtv package for more | |
164 | information. | |
8afae0cb | 165 | |
ed630fed JB |
166 | This package contains only the server software, which provides video |
167 | and audio capture and encoding services. In order to be useful, it | |
168 | requires a mythtv-frontend installation, either on the same system or | |
169 | one reachable via the network. | |
170 | ||
17176342 | 171 | %description backend -l pl.UTF-8 |
ed630fed | 172 | MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i |
17176342 | 173 | oglądania programów telewizyjnych. Więcej informacji w pakiecie |
ed630fed JB |
174 | mythtv. |
175 | ||
17176342 JR |
176 | Ten pakiet zawiera tylko oprogramowanie serwerowe, udostępniające |
177 | usługi przechwytywania i kodowania obrazu i dźwięku. Aby było | |
ed630fed | 178 | przydatne, wymaga instalacji mythtv-frontend - na tym samym systemie, |
17176342 | 179 | albo innym osiągalnym po sieci. |
8afae0cb ER |
180 | |
181 | %package frontend | |
ed630fed | 182 | Summary: Client component of mythtv (a PVR) |
7456895a | 183 | Summary(pl.UTF-8): Część kliencka mythtv (PVR) |
910a00e3 | 184 | Group: Applications/Multimedia |
96b717a5 | 185 | Requires: libmyth = %{version}-%{release} |
910a00e3 ER |
186 | Requires: mythtv = %{version}-%{release} |
187 | Requires: mythtv-themes = %{version}-%{release} | |
96b717a5 | 188 | Provides: mythtv-frontend-api = %{myth_api_version} |
8afae0cb ER |
189 | |
190 | %description frontend | |
910a00e3 ER |
191 | MythTV provides a unified graphical interface for recording and |
192 | viewing television programs. Refer to the mythtv package for more | |
193 | information. | |
8afae0cb ER |
194 | |
195 | This package contains only the client software, which provides a | |
910a00e3 | 196 | front-end for playback and configuration. It requires access to a |
8afae0cb ER |
197 | mythtv-backend installation, either on the same system or one |
198 | reachable via the network. | |
199 | ||
17176342 | 200 | %description frontend -l pl.UTF-8 |
ed630fed | 201 | MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i |
17176342 | 202 | oglądania programów telewizyjnych. Więcej informacji w pakiecie |
ed630fed | 203 | mythtv. |
8afae0cb | 204 | |
17176342 JR |
205 | Ten pakiet zawiera tylko oprogramowanie klienckie, dostarczające |
206 | frontend do odtwarzania i konfiguracji. Wymaga dostępu do instalacji | |
207 | mythtv-backend - na tym samym systemie, albo innym osiągalnym po | |
ed630fed | 208 | sieci. |
8afae0cb ER |
209 | |
210 | %package setup | |
ed630fed | 211 | Summary: Setup the mythtv backend |
7456895a | 212 | Summary(pl.UTF-8): Konfigurator backendu mythtv |
910a00e3 | 213 | Group: Applications/Multimedia |
96b717a5 | 214 | Requires: libmyth = %{version}-%{release} |
8afae0cb ER |
215 | |
216 | %description setup | |
910a00e3 ER |
217 | MythTV provides a unified graphical interface for recording and |
218 | viewing television programs. Refer to the mythtv package for more | |
219 | information. | |
8afae0cb ER |
220 | |
221 | This package contains only the setup software for configuring the | |
222 | mythtv backend. | |
223 | ||
17176342 | 224 | %description setup -l pl.UTF-8 |
ed630fed | 225 | MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i |
17176342 | 226 | oglądania programów telewizyjnych. Więcej informacji w pakiecie |
ed630fed JB |
227 | mythtv. |
228 | ||
229 | Ten pakiet zawiera tylko program do konfigurowania backendu mythtv. | |
230 | ||
231 | %package themes | |
232 | Summary: Base themes for mythtv's frontend | |
7456895a | 233 | Summary(pl.UTF-8): Podstawowe motywy dla frontendu mythtv |
bbba3c1d | 234 | Group: Themes |
8c0ea56f | 235 | Requires: %{name}-frontend = %{version}-%{release} |
ed630fed JB |
236 | |
237 | %description themes | |
238 | MythTV provides a unified graphical interface for recording and | |
239 | viewing television programs. Refer to the mythtv package for more | |
240 | information. | |
241 | ||
242 | This package contains only the base themes used by the frontend and | |
243 | mythtvsetup. | |
244 | ||
17176342 | 245 | %description themes -l pl.UTF-8 |
ed630fed | 246 | MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i |
17176342 | 247 | oglądania programów telewizyjnych. Więcej informacji w pakiecie |
ed630fed JB |
248 | mythtv. |
249 | ||
17176342 | 250 | Ten pakiet zawiera tylko podstawowe motywy używane przez frontend oraz |
ed630fed JB |
251 | mythtvsetup. |
252 | ||
253 | %package -n libmyth | |
254 | Summary: Library providing mythtv support | |
7456895a | 255 | Summary(pl.UTF-8): Biblioteka udostępniająca obsługę mythtv |
ed630fed | 256 | Group: Libraries |
8c0ea56f | 257 | Requires: QtSql-mysql |
ed630fed JB |
258 | Requires: freetype >= 1:2.0.0 |
259 | Requires: lame | |
2dea5de0 | 260 | %{?with_vdpau:Requires: libvdpau.so.1} |
ed630fed JB |
261 | |
262 | %description -n libmyth | |
263 | Common library code for MythTV and add-on modules (development) MythTV | |
264 | provides a unified graphical interface for recording and viewing | |
265 | television programs. Refer to the mythtv package for more information. | |
266 | ||
17176342 JR |
267 | %description -n libmyth -l pl.UTF-8 |
268 | Wspólny kod biblioteki dla MythTV i dodatkowych modułów MythTV | |
269 | dostarczający ujednolicony interfejs graficzny do nagrywania i | |
270 | oglądania programów telewizyjnych. Więcej informacji w pakiecie | |
ed630fed JB |
271 | mythtv. |
272 | ||
273 | %package -n libmyth-devel | |
274 | Summary: Development files for libmyth | |
7456895a | 275 | Summary(pl.UTF-8): Pliki nagłówkowe libmyth |
ed630fed JB |
276 | Group: Development/Libraries |
277 | Requires: libmyth = %{version}-%{release} | |
ed630fed JB |
278 | |
279 | %description -n libmyth-devel | |
280 | This package contains the header files for developing add-ons for | |
281 | mythtv. | |
282 | ||
17176342 JR |
283 | %description -n libmyth-devel -l pl.UTF-8 |
284 | Ten pakiet zawiera pliki nagłówkowe do tworzenia dodatków dla mythtv. | |
ed630fed JB |
285 | |
286 | %package -n libmyth-static | |
287 | Summary: Static libmyth library | |
7456895a | 288 | Summary(pl.UTF-8): Statyczna biblioteka libmyth |
ed630fed JB |
289 | Group: Development/Libraries |
290 | Requires: libmyth-devel = %{version}-%{release} | |
291 | ||
292 | %description -n libmyth-static | |
293 | Static libmyth library. | |
294 | ||
17176342 | 295 | %description -n libmyth-static -l pl.UTF-8 |
ed630fed JB |
296 | Statyczna biblioteka libmyth. |
297 | ||
8c0ea56f | 298 | %package -n perl-MythTV |
299 | Summary: MythTV Perl bindings | |
300 | Summary(pl.UTF-8): Interfejs Perla dla MythTV | |
301 | Group: Libraries | |
302 | ||
303 | %description -n perl-MythTV | |
304 | MythTV Perl bindings. | |
305 | ||
306 | %description -n perl-MythTV -l pl.UTF-8 | |
307 | Ten pakiet zawiera moduły Perla do tworzenia dodatków dla mythtv. | |
308 | ||
3f7f03f8 JK |
309 | %package -n python-MythTV |
310 | Summary: MythTV Python bindings | |
8c0ea56f | 311 | Summary(pl.UTF-8): Interfejs Pythona dla MythTV |
312 | Group: Libraries | |
313 | Requires: MySQL-python | |
3f7f03f8 JK |
314 | |
315 | %description -n python-MythTV | |
8c0ea56f | 316 | MythTV Python bindings. |
3f7f03f8 JK |
317 | |
318 | %description -n python-MythTV -l pl.UTF-8 | |
319 | Ten pakiet zawiera moduły Pythona do tworzenia dodatków dla mythtv. | |
320 | ||
8afae0cb | 321 | %prep |
8c0ea56f | 322 | |
2dea5de0 | 323 | %setup -q -n %{name}-%{version}%{snap} |
8c0ea56f | 324 | |
325 | ||
2dea5de0 | 326 | %patch0 -p1 |
8c0ea56f | 327 | #%patch1 -p1 |
328 | #%patch2 -p1 | |
0ea777bd | 329 | %patch3 -p1 |
8c0ea56f | 330 | #%patch4 -p1 |
8afae0cb | 331 | |
8c0ea56f | 332 | %{?with_dshowserver:%patch20 -p1} |
6e738c98 ER |
333 | rm -rf database/old # not supported in PLD |
334 | ||
96b717a5 ER |
335 | # lib64 fix - enable to update patch |
336 | %if %{_lib} != "lib" && 0 | |
337 | find '(' -name '*.[ch]' -o -name '*.cpp' -o -name '*.pro' ')' | \ | |
338 | xargs grep -l /lib . | xargs sed -i -e ' | |
339 | s,/''usr/lib/,/%{_libdir}/,g | |
340 | s,/''lib/mythtv,/%{_lib}/mythtv,g | |
341 | s,{PREFIX}/lib$,{PREFIX}/%{_lib},g | |
342 | ' | |
343 | exit 1 | |
344 | %endif | |
345 | ||
3c3d6f2b ER |
346 | # Assigning null to QMAKE_LIBDIR_QT will prevent makefiles contain |
347 | # -L$(QTDIR)/%{_lib} and -Wl,-rpath,$(QTDIR)/%{_lib}. And that will | |
348 | # prevent compiler finding libs from system when they should be looked | |
349 | # from current buildtree. | |
350 | # but that made it link with -lqt which doesn't exist, instead of -lqt-mt | |
351 | # so we make QMAKE wrapper which will do sed subst after calling | |
352 | # qmake. this is the wrapper. | |
353 | cat > qmake-wrapper.sh <<'EOF' | |
354 | #!/bin/sh | |
355 | getmakefile() { | |
356 | while [ $# -gt 0 ]; do | |
357 | case "$1" in | |
358 | -o) | |
359 | shift | |
360 | makefile="$1" | |
361 | return | |
362 | ;; | |
8c0ea56f | 363 | esac |
3c3d6f2b ER |
364 | shift |
365 | done | |
366 | } | |
367 | ||
8c0ea56f | 368 | qmake-qt4 "$@" |
3c3d6f2b ER |
369 | getmakefile "$@" |
370 | if [ "$makefile" ]; then | |
371 | %{__sed} -i -e ' | |
372 | s;-Wl,-rpath,$(QTDIR)/%{_lib};; | |
373 | s;-L$(QTDIR)/%{_lib};; | |
374 | ' $makefile | |
375 | fi | |
376 | EOF | |
377 | chmod +x qmake-wrapper.sh | |
378 | ||
8c0ea56f | 379 | # move perl bindings to vendor prefix |
380 | sed -i -e 's#perl Makefile.PL#%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"#' \ | |
381 | bindings/perl/perl.pro | |
382 | ||
8afae0cb | 383 | %build |
8c0ea56f | 384 | |
018c2e7e ER |
385 | %if %{with cpu_autodetect} |
386 | # Make sure we have /proc mounted | |
387 | if [ ! -r /proc/cpuinfo ]; then | |
388 | echo "You need to have /proc mounted in order to build with cpu_autodetect!" | |
389 | exit 1 | |
390 | fi | |
391 | %endif | |
eceeddea | 392 | |
96b717a5 ER |
393 | ./configure \ |
394 | --prefix=%{_prefix} \ | |
395 | --libdir=%{_libdir} \ | |
8c0ea56f | 396 | --libdir-name=`basename %{_libdir}` \ |
96b717a5 | 397 | --mandir=%{_mandir} \ |
1b03363f | 398 | --disable-distcc --disable-ccache \ |
8e8230a1 | 399 | --compile-type=%{?debug:debug}%{!?debug:release} \ |
86b7888f ER |
400 | --extra-cflags="%{rpmcflags} -fomit-frame-pointer" \ |
401 | --extra-cxxflags="%{rpmcxxflags} -fomit-frame-pointer" \ | |
c79fdf07 ER |
402 | %if %{with cpu_autodetect} |
403 | --enable-proc-opt \ | |
404 | %else | |
c0517663 | 405 | %ifarch %{ix86} |
58422b0a | 406 | %ifarch athlon |
d0c7b0ef | 407 | --arch=athlon \ |
58422b0a ER |
408 | %else |
409 | --cpu=i386 --tune=pentium4 \ | |
58422b0a | 410 | %endif |
c0517663 ER |
411 | %endif |
412 | %ifarch %{x8664} | |
d0c7b0ef | 413 | --arch=x86_64 \ |
c0517663 | 414 | %endif |
32b3b293 | 415 | %{?with_mmx:--enable-mmx} \ |
8afae0cb | 416 | %endif |
ac180387 | 417 | %{?with_dvb:--enable-dvb --dvb-path=%{_includedir}} \ |
eceeddea ER |
418 | --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \ |
419 | --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \ | |
420 | --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \ | |
6c269db6 | 421 | --%{?with_jack:en}%{!?with_jack:dis}able-audio-jack \ |
c79fdf07 | 422 | --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-vsync \ |
eceeddea | 423 | --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \ |
cb059bf8 | 424 | --%{?with_firewire:en}%{!?with_firewire:dis}able-firewire \ |
bc34ab39 ER |
425 | --%{?with_xrandr:en}%{!?with_xrandr:dis}able-xrandr \ |
426 | --%{?with_xvmc:en}%{!?with_xvmc:dis}able-xvmc \ | |
8c0ea56f | 427 | --%{?with_ivtv:en}%{!?with_ivtv:dis}able-ivtv \ |
428 | --%{?with_iptv:en}%{!?with_iptv:dis}able-iptv \ | |
429 | --%{?with_nellymoserdec:en}%{!?with_nellymoserdec:dis}able-decoder=nellymoser \ | |
2dea5de0 | 430 | --%{?with_vdpau:en}%{!?with_vdpau:dis}able-vdpau \ |
8c0ea56f | 431 | --%{?with_directfb:en}%{!?with_directfb:dis}able-directfb \ |
cb059bf8 ER |
432 | --enable-xv \ |
433 | --enable-x11 \ | |
96b717a5 | 434 | |
8c0ea56f | 435 | %{_libdir}/qt4/bin/qmake mythtv.pro |
436 | #sed -i -e 's/usr\/\/usr/usr/g' config.ep | |
437 | ||
438 | ||
439 | %{__make} | |
448e41b0 | 440 | |
8afae0cb | 441 | |
8afae0cb ER |
442 | %install |
443 | rm -rf $RPM_BUILD_ROOT | |
2dcbef41 | 444 | install -d $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig} \ |
2aaa3ce4 | 445 | $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_desktopdir}} \ |
4cd4742b | 446 | $RPM_BUILD_ROOT/var/{cache,lib,log,run}/mythtv \ |
8c0ea56f | 447 | $RPM_BUILD_ROOT%{_libdir}/mythtv \ |
448 | $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins \ | |
449 | $RPM_BUILD_ROOT%{_pixmapsdir} | |
eceeddea ER |
450 | |
451 | %{__make} install \ | |
452 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
453 | ||
8c0ea56f | 454 | # required to build some plugins |
455 | # install libs/libavcodec/*.h $RPM_BUILD_ROOT%{_includedir}/mythtv \ | |
456 | # libs/libavformat/*.h $RPM_BUILD_ROOT%{_includedir}/mythtv \ | |
457 | # libs/libavutil/*.h $RPM_BUILD_ROOT%{_includedir}/mythtv | |
458 | ||
8afae0cb | 459 | # Install the files that we added on top of mythtv's own stuff |
4cd4742b ER |
460 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend |
461 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend | |
2dcbef41 | 462 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/mythbackend |
8c0ea56f | 463 | %{?with_dshowserver:install %{SOURCE20} $RPM_BUILD_ROOT%{_datadir}/mythtv} |
4cd4742b ER |
464 | |
465 | # desktop entries | |
4cd4742b | 466 | install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir} |
8c0ea56f | 467 | install %{SOURCE6} $RPM_BUILD_ROOT%{_pixmapsdir} |
8afae0cb ER |
468 | |
469 | # Install settings.pro so people can see the build options we used | |
68d88cbd ER |
470 | install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build |
471 | install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build | |
8afae0cb | 472 | |
96b717a5 ER |
473 | for p in mythfrontend; do |
474 | for l in $RPM_BUILD_ROOT%{_datadir}/mythtv/i18n/${p}_*.qm; do | |
475 | echo $l | sed -e "s,^$RPM_BUILD_ROOT\(.*${p}_\(.*\).qm\),%%lang(\2) \1," | |
476 | done > $p.lang | |
477 | done | |
478 | ||
479 | # glibc language codes. attempt was made to change it on libmyth side, | |
480 | # but that was just asking for trouble due large coverage of | |
481 | # language.lower() usage. | |
482 | sed -i -e ' | |
483 | s,%%lang(en_gb),%%lang(en_GB), | |
484 | s,%%lang(zh_tw),%%lang(zh_TW), | |
485 | s,%%lang(pt_br),%%lang(pt_BR), | |
486 | ' *.lang | |
487 | ||
488 | rm -rf mythtvosd mythwelcome mythlcdserver | |
99d50505 | 489 | install -d mythtvosd mythwelcome |
96b717a5 ER |
490 | cp -a programs/mythtvosd/{README,*.xml} mythtvosd |
491 | cp -a programs/mythwelcome/README mythwelcome | |
492 | cp -a programs/mythlcdserver/README mythlcdserver | |
493 | ||
8afae0cb ER |
494 | %clean |
495 | rm -rf $RPM_BUILD_ROOT | |
496 | ||
8c0ea56f | 497 | # Empty newline after %addusertogroup %{name} video below is intended. |
498 | # Do not remove it until rpm stop joining lines with that macro. | |
ed630fed | 499 | %pre backend |
5eccad13 | 500 | %groupadd -g 149 %{name} |
cb059bf8 ER |
501 | %useradd -u 149 -d /var/lib/mythtv -g %{name} -c "MythTV User" %{name} |
502 | %addusertogroup %{name} video | |
503 | %addusertogroup %{name} audio | |
504 | ||
505 | %post backend | |
68d88cbd | 506 | /sbin/chkconfig --add mythbackend |
cb059bf8 ER |
507 | |
508 | %preun backend | |
509 | if [ "$1" = "0" ]; then | |
510 | %service -q mythbackend stop | |
511 | /sbin/chkconfig --del mythbackend | |
512 | fi | |
8afae0cb | 513 | |
ed630fed | 514 | %postun backend |
a3eedc29 ER |
515 | if [ "$1" = "0" ]; then |
516 | %userremove %{name} | |
517 | %groupremove %{name} | |
518 | fi | |
8afae0cb | 519 | |
ed630fed JB |
520 | %post -n libmyth -p /sbin/ldconfig |
521 | %postun -n libmyth -p /sbin/ldconfig | |
522 | ||
6e738c98 | 523 | %post setup |
cb059bf8 | 524 | if [ "$1" = 1 ]; then |
6e738c98 ER |
525 | %banner -e %{name}-setup <<EOF |
526 | To grant mysql permissions to mythtv, please run | |
527 | zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql | |
528 | EOF | |
cb059bf8 | 529 | fi |
6e738c98 | 530 | |
8afae0cb | 531 | %files |
910a00e3 | 532 | %defattr(644,root,root,755) |
2b07fa66 | 533 | %doc README* UPGRADING AUTHORS FAQ |
8c0ea56f | 534 | %doc docs contrib config |
96b717a5 | 535 | %doc keys.txt mythtvosd mythwelcome mythlcdserver |
8afae0cb ER |
536 | |
537 | %files backend | |
910a00e3 | 538 | %defattr(644,root,root,755) |
96b717a5 ER |
539 | %attr(755,root,root) %{_sbindir}/mythbackend |
540 | %attr(755,root,root) %{_sbindir}/mythcommflag | |
8c0ea56f | 541 | %attr(755,root,root) %{_bindir}/mythfilldatabase |
96b717a5 ER |
542 | %attr(755,root,root) %{_sbindir}/mythjobqueue |
543 | %attr(755,root,root) %{_sbindir}/mythlcdserver | |
8c0ea56f | 544 | %attr(755,root,root) %{_bindir}/mythtranscode |
545 | %attr(755,root,root) %{_bindir}/mythreplex | |
cb059bf8 ER |
546 | %attr(775,root,mythtv) %dir /var/lib/mythtv |
547 | %attr(775,root,mythtv) %dir /var/cache/mythtv | |
548 | %attr(775,root,mythtv) %dir /var/run/mythtv | |
a3eedc29 | 549 | %attr(754,root,root) /etc/rc.d/init.d/mythbackend |
96b717a5 ER |
550 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend |
551 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mythbackend | |
cb059bf8 | 552 | %attr(775,root,mythtv) %dir %{_localstatedir}/log/mythtv |
8afae0cb | 553 | |
96b717a5 | 554 | %files frontend -f mythfrontend.lang |
910a00e3 | 555 | %defattr(644,root,root,755) |
a3ec4ed6 | 556 | %attr(755,root,root) %{_bindir}/mythfrontend |
96b717a5 | 557 | %attr(755,root,root) %{_bindir}/mythshutdown |
2dea5de0 | 558 | %attr(755,root,root) %{_bindir}/mythavtest |
910a00e3 | 559 | %attr(755,root,root) %{_bindir}/mythtvosd |
96b717a5 ER |
560 | %attr(755,root,root) %{_bindir}/mythwelcome |
561 | %dir %{_datadir}/mythtv | |
bbba3c1d | 562 | %dir %{_datadir}/mythtv/themes |
96b717a5 ER |
563 | %dir %{_libdir}/mythtv |
564 | %{_datadir}/mythtv/*.xml | |
cb059bf8 ER |
565 | %dir %{_libdir}/mythtv/filters |
566 | %dir %{_libdir}/mythtv/plugins | |
567 | %attr(755,root,root) %{_libdir}/mythtv/filters/*.so | |
8afae0cb | 568 | %{_datadir}/mythtv/*.ttf |
96b717a5 | 569 | %dir %{_datadir}/mythtv/i18n |
8c0ea56f | 570 | %if %{with dshowserver} |
571 | %{_datadir}/mythtv/dshowcodecs | |
572 | %endif | |
2aaa3ce4 | 573 | %{_desktopdir}/*.desktop |
8c0ea56f | 574 | %{_pixmapsdir}/*.png |
8afae0cb | 575 | |
ed630fed JB |
576 | %files setup |
577 | %defattr(644,root,root,755) | |
6e738c98 | 578 | %doc database |
b9307635 | 579 | %attr(755,root,root) %{_bindir}/mythtv-setup |
ed630fed | 580 | |
8afae0cb | 581 | %files themes |
910a00e3 | 582 | %defattr(644,root,root,755) |
bbba3c1d | 583 | %{_datadir}/mythtv/themes/* |
8afae0cb ER |
584 | |
585 | %files -n libmyth | |
910a00e3 | 586 | %defattr(644,root,root,755) |
8c0ea56f | 587 | %attr(755,root,root) %{_libdir}/lib*.so* |
588 | %attr(755,root,root) %{_libdir}/lib*.a | |
589 | %{_datadir}/mythtv/*.pl | |
8afae0cb ER |
590 | |
591 | %files -n libmyth-devel | |
910a00e3 | 592 | %defattr(644,root,root,755) |
910a00e3 | 593 | %attr(755,root,root) %{_libdir}/*.so |
ed630fed | 594 | %{_includedir}/* |
68d88cbd | 595 | %{_datadir}/mythtv/build |
a7691716 ER |
596 | |
597 | %files -n libmyth-static | |
598 | %defattr(644,root,root,755) | |
3f7f03f8 | 599 | |
8c0ea56f | 600 | %files -n perl-MythTV |
601 | %defattr(644,root,root,755) | |
602 | %{perl_vendorlib}/MythTV.pm | |
603 | %dir %{perl_vendorlib}/MythTV | |
604 | %{perl_vendorlib}/MythTV/*.pm | |
605 | %{perl_vendorlib}/IO/Socket/INET/MythTV.pm | |
606 | %exclude %{perl_vendorarch}/auto/MythTV/.packlist | |
607 | ||
3f7f03f8 JK |
608 | %files -n python-MythTV |
609 | %defattr(644,root,root,755) | |
8c0ea56f | 610 | %dir %{py_sitescriptdir}/MythTV |
611 | # XXX: package .py[co] only | |
612 | %{py_sitescriptdir}/MythTV/* | |
3f7f03f8 | 613 | %{py_sitescriptdir}/*.egg-info |