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