]> git.pld-linux.org Git - packages/mythtv.git/blame - mythtv.spec
- todo
[packages/mythtv.git] / mythtv.spec
CommitLineData
aa6db6e7
ER
1# TODO
2# - CFLAGS doesn't get passed
3# - bconds broken?
8afae0cb
ER
4#
5# Specfile for MythTV
6#
7# MythTV now uses a fairly intelligent cpu-detection script, so if you are
8# building an rpm by hand on the machine it will be used on, I encourage you
9# to use "--with cpu_autodetect" to let mythtv decide for you.
10#
11
12# The name of the DVB driver package (used in a couple of places,
13# so it's not hard-coded in the spec itself)
14%define linuxtv_dvb_package linuxtv-dvb-1.1.1
15
8afae0cb 16# Set up some custom-build parameters
aa6db6e7
ER
17%bcond_with lirc # lirc
18%bcond_without alsa # alsa
19%bcond_without oss # oss
20%bcond_with opengl_vsync # opengl vsync
21%bcond_with arts # arts
22%bcond_with xvmc # xvmc
910a00e3
ER
23%bcond_with cpu_autodetect # enable cpu autodetection at compile time
24
25Name: mythtv
26Version: 0.17
27#define _snap 20050326
a7691716 28Release: 0.2
910a00e3
ER
29Summary: A personal video recorder (PVR) application.
30Group: Applications/Multimedia
31License: GPL v2
32URL: http://www.mythtv.org/
33Source0: http://www.mythtv.org/mc/%{name}-%{version}.tar.bz2
34# Source0-md5: c996dc690d36e946396fc5cd4b715e3b
eceeddea
ER
35Source1: mythbackend.sysconfig
36Source2: mythbackend.init
37Source3: mythbackend.logrotate
910a00e3 38Source12: http://linuxtv.org/download/dvb/%{linuxtv_dvb_package}.tar.bz2
eceeddea 39Patch0: %{name}-configure.patch
910a00e3
ER
40# Source12-md5: 6dd599f24b7abecd1e32c203eaa7fa8a
41ExclusiveArch: i386 i686 athlon x86_64
a7691716
ER
42Requires(post): /sbin/ldconfig
43Requires(postun): /sbin/ldconfig
910a00e3
ER
44BuildRequires: gcc-c++
45BuildRequires: XFree86-devel
46BuildRequires: freetype-devel >= 1:2.0.0
47BuildRequires: lame-libs-devel
48BuildRequires: qt-devel >= 6:3.2.1-4
49BuildRequires: qmake >= 6:3.2.1-4
50BuildRequires: mysql-devel
51BuildRequires: desktop-file-utils
f3707f19
ER
52BuildRequires: sed >= 4.0
53%{?with_alsa:BuildRequires: alsa-lib-devel}
54%{?with_lirc:BuildRequires: lirc-devel}
55%{?with_arts:BuildRequires: arts-devel >= 13:0.9.5}
56%{?with_xvmc:BuildRequires: nvidia-graphics-devel}
57%{?with_opengl_vsync:BuildRequires: nvidia-graphics-devel}
910a00e3 58BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
8afae0cb
ER
59
60%description
910a00e3
ER
61MythTV implements the following PVR features, and more, with a unified
62graphical interface:
8afae0cb
ER
63
64 - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
65 - Video compression using RTjpeg or MPEG-4
66 - Program listing retrieval using XMLTV
67 - Themable, semi-transparent on-screen display
68 - Electronic program guide
69 - Scheduled recording of TV programs
70 - Resolution of conflicts between scheduled recordings
71 - Basic video editing
72
73%package -n libmyth
910a00e3
ER
74Summary: Library providing mythtv support.
75Group: Libraries
76Requires: freetype >= 1:2.0.0
77Requires: lame
a7691716 78Requires: qt >= 6:3.2.1-4
910a00e3 79Requires: qt-plugin-mysql >= 6:3.2.1-4
8afae0cb
ER
80
81%description -n libmyth
910a00e3
ER
82Common library code for MythTV and add-on modules (development) MythTV
83provides a unified graphical interface for recording and viewing
84television programs. Refer to the mythtv package for more information.
8afae0cb
ER
85
86%package -n libmyth-devel
910a00e3
ER
87Summary: Development files for libmyth.
88Group: Development/Libraries
89Requires: libmyth = %{version}-%{release}
90BuildRequires: freetype-devel >= 1:2.0.0
91BuildRequires: lame-libs-devel
92BuildRequires: qt-devel >= 6:3.2.1-4
93BuildRequires: mysql-devel
94BuildRequires: DirectFB-devel
95%if %{with alsa}
96BuildRequires: alsa-lib-devel
8afae0cb 97%endif
910a00e3
ER
98%if %{with lirc}
99BuildRequires: lirc-devel
8afae0cb 100%endif
910a00e3
ER
101%if %{with arts}
102BuildRequires: arts-devel >= 13:0.9.5
8afae0cb
ER
103%endif
104
105%description -n libmyth-devel
106This package contains the header files and libraries for developing
107add-ons for mythtv.
108
a7691716
ER
109%package -n libmyth-static
110Summary: Static libmyth library
111Group: Development/Libraries
112Requires: lib%{name}-devel = %{version}-%{release}
113
114%description -n libmyth-static
115Static libmyth library.
116
8afae0cb 117%package themes
910a00e3
ER
118Summary: Base themes for mythtv's frontend.
119Group: Applications/Multimedia
120Obsoletes: mythtv-theme-Titivillus
8afae0cb
ER
121
122%description themes
910a00e3
ER
123MythTV provides a unified graphical interface for recording and
124viewing television programs. Refer to the mythtv package for more
125information.
8afae0cb
ER
126
127This package contains only the base themes used by the frontend and
128mythtvsetup.
129
130%package frontend
910a00e3
ER
131Summary: Client component of mythtv (a PVR).
132Group: Applications/Multimedia
133Requires: mythtv = %{version}-%{release}
134Requires: mythtv-themes = %{version}-%{release}
135Provides: mythtv-frontend-api = %(echo %{version} | cut -d. -f1,2)
8afae0cb
ER
136
137%description frontend
910a00e3
ER
138MythTV provides a unified graphical interface for recording and
139viewing television programs. Refer to the mythtv package for more
140information.
8afae0cb
ER
141
142This package contains only the client software, which provides a
910a00e3 143front-end for playback and configuration. It requires access to a
8afae0cb
ER
144mythtv-backend installation, either on the same system or one
145reachable via the network.
146
147%package backend
910a00e3
ER
148Summary: Server component of mythtv (a PVR).
149Group: Applications/Multimedia
150Conflicts: xmltv-grabbers < 0.5.34
151Requires: mythtv = %{version}-%{release}
8afae0cb
ER
152
153%description backend
910a00e3
ER
154MythTV provides a unified graphical interface for recording and
155viewing television programs. Refer to the mythtv package for more
156information.
8afae0cb
ER
157
158This package contains only the server software, which provides video
910a00e3 159and audio capture and encoding services. In order to be useful, it
8afae0cb
ER
160requires a mythtv-frontend installation, either on the same system or
161one reachable via the network.
162
163%package setup
910a00e3
ER
164Summary: Setup the mythtv backend.
165Group: Applications/Multimedia
166Requires: mythtv-backend = %{version}-%{release}
167Requires: mythtv-themes = %{version}-%{release}
168Provides: mythtvsetup
8afae0cb
ER
169
170%description setup
910a00e3
ER
171MythTV provides a unified graphical interface for recording and
172viewing television programs. Refer to the mythtv package for more
173information.
8afae0cb
ER
174
175This package contains only the setup software for configuring the
176mythtv backend.
177
178%prep
179%setup -q -a 12
eceeddea 180%patch0 -p1
8afae0cb
ER
181
182%build
910a00e3 183export QTDIR="%{_prefix}"
eceeddea 184#export QMAKESPEC="linux-g++"
8afae0cb
ER
185
186# Initialize the options string
187OPTS=""
188
eceeddea
ER
189
190# Finally, actually configure
191
192# BTW: this is not autoconf configure
193%configure \
194 --compile-type=%{?debug:debug}%{!?debug:release} \
195 --disable-audio-jack \
196 --enable-dvb \
197 --dvb-path=%{_builddir}/%{name}-%{version}/%{linuxtv_dvb_package}/linux/include \
910a00e3 198%if %{with cpu_autodetect}
8afae0cb 199 %ifarch i386
eceeddea 200 --cpu=i386 --tune=pentium4 --enable-mmx \
8afae0cb
ER
201 %endif
202 %ifarch i686
eceeddea 203 --cpu=i686 --tune=pentium4 --enable-mmx \
8afae0cb
ER
204 %endif
205 %ifarch athlon
eceeddea 206 --arch=athlon \
8afae0cb
ER
207 %endif
208 %ifarch x86_64
eceeddea 209 --arch=x86_64 \
8afae0cb
ER
210 %endif
211%endif
eceeddea
ER
212 --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \
213 --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
214 --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
215 --%{?with_opengl_vsync:en}%{!?with_openvl_vsync:dis}able-opengl-vsync \
216 --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
217 %{?with_xvmc:--enable-xvmc --enable-xvmc-vld} \
218 %{!?with_xvmc:--disable-xvmc --disable-xvmc-vld} \
219# --disable-joystick-menu \
220# --disable-firewire \
221# --disable-ivtv \
222# --enable-dvb-eit \
223
224#sed -i -e 's:OPTFLAGS=.*:OPTFLAGS=%{rpmcflags} -Wno-switch:g' config.mak
f3707f19
ER
225# dunno. the configure doesn't take --prefix...
226sed -i -e 's:PREFIX =.*:PREFIX = %{_prefix}:g' settings.pro
8afae0cb
ER
227
228# MythTV doesn't support parallel builds
eceeddea
ER
229qmake -o Makefile mythtv.pro \
230 QMAKE_CXX="%{__cxx}" \
231 QMAKE_LINK="%{__cxx}" \
232 QMAKE_CXXFLAGS_RELEASE="%{rpmcflags}"
233
234%{__make} qmake
8afae0cb
ER
235
236# We don't want rpm to add perl requirements to anything in contrib
237find contrib -type f | xargs -r chmod a-x
238
239%install
240rm -rf $RPM_BUILD_ROOT
eceeddea
ER
241install -d $RPM_BUILD_ROOT
242
243%{__make} install \
244 INSTALL_ROOT=$RPM_BUILD_ROOT
245
8afae0cb 246# Install the files that we added on top of mythtv's own stuff
eceeddea
ER
247install -pD %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/mythbackend
248install -pD %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/mythbackend
249install -pD %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
8afae0cb
ER
250
251# Desktop entries
252#mkdir -p %{buildroot}%{_datadir}/pixmaps
253#mkdir -p %{buildroot}%{_datadir}/applications
254#for file in %{desktop_applications}; do
255# install -p %{_sourcedir}/$file.png %{buildroot}%{_datadir}/pixmaps/$file.png
256# desktop-file-install --vendor %{desktop_vendor} \
257# --dir %{buildroot}%{_datadir}/applications \
258# --add-category X-Red-Hat-Extra \
259# --add-category Application \
260# --add-category AudioVideo \
261# %{_sourcedir}/$file.desktop
262#done
263
264# Various utility directories that we want rpm to keep track of mythtv ownership
910a00e3
ER
265install -d $RPM_BUILD_ROOT/var/lib/mythtv
266install -d $RPM_BUILD_ROOT/var/lib/cache/mythtv
267install -d $RPM_BUILD_ROOT%{_localstatedir}/log/mythtv
268install -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
269install -d $RPM_BUILD_ROOT%{_initrddir}
eceeddea 270install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
8afae0cb
ER
271
272# Create the plugins directory, so rpm can know mythtv owns it
910a00e3 273install -d $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins
8afae0cb
ER
274
275# Install settings.pro so people can see the build options we used
276install -pD settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build/settings.pro
277
278%clean
279rm -rf $RPM_BUILD_ROOT
280
281# ldconfig's for packages that install %{_libdir}/*.so.*
282# -> Don't forget Requires(post) and Requires(postun): /sbin/ldconfig
283# ...and install-info's for ones that install %{_infodir}/*.info*
284# -> Don't forget Requires(post) and Requires(preun): /sbin/install-info
285
910a00e3
ER
286%post -p /sbin/ldconfig
287%postun -p /sbin/ldconfig
8afae0cb
ER
288
289%files
910a00e3 290%defattr(644,root,root,755)
8afae0cb
ER
291%doc README* UPGRADING AUTHORS COPYING FAQ
292%doc database keys.txt
293%doc docs contrib configfiles
294
295%files backend
910a00e3 296%defattr(644,root,root,755)
eceeddea 297#%attr(755,root,root) %{_bindir}/mythbackend # MISSING
910a00e3
ER
298%attr(755,root,root) %{_bindir}/mythfilldatabase
299%attr(755,root,root) %{_bindir}/mythjobqueue
300%attr(-,mythtv,mythtv) %dir /var/lib/mythtv
301%attr(-,mythtv,mythtv) %dir /var/lib/cache/mythtv
302%{_initrddir}/mythbackend
eceeddea 303%config %{_sysconfdir}/sysconfig/mythbackend
910a00e3
ER
304%config /etc/logrotate.d/mythbackend
305%attr(-,mythtv,mythtv) %dir %{_localstatedir}/log/mythtv
8afae0cb
ER
306
307%files setup
910a00e3 308%defattr(644,root,root,755)
eceeddea 309#%attr(755,root,root) %{_bindir}/mythtv-setup MISSING
8afae0cb
ER
310
311%files frontend
910a00e3 312%defattr(644,root,root,755)
8afae0cb 313%{_datadir}/mythtv/*.xml
eceeddea 314#%attr(755,root,root) %{_bindir}/mythfrontend # MISSING
910a00e3
ER
315%attr(755,root,root) %{_bindir}/mythtv
316%attr(755,root,root) %{_bindir}/mythepg
317%attr(755,root,root) %{_bindir}/mythprogfind
318%attr(755,root,root) %{_bindir}/mythcommflag
319%attr(755,root,root) %{_bindir}/mythtranscode
320%attr(755,root,root) %{_bindir}/mythtvosd
8afae0cb
ER
321%{_libdir}/mythtv/filters
322%{_libdir}/mythtv/plugins
323%{_datadir}/mythtv/*.ttf
324%{_datadir}/mythtv/i18n
325#%{_datadir}/applications/*myth*.desktop
326#%{_datadir}/pixmaps/myth*.png
327
328%files themes
910a00e3 329%defattr(644,root,root,755)
8afae0cb
ER
330%{_datadir}/mythtv/themes
331
332%files -n libmyth
910a00e3 333%defattr(644,root,root,755)
a7691716 334%attr(755,root,root) %{_libdir}/lib*.so.*.*.*
8afae0cb
ER
335
336%files -n libmyth-devel
910a00e3 337%defattr(644,root,root,755)
8afae0cb 338%{_includedir}/*
910a00e3 339%attr(755,root,root) %{_libdir}/*.so
8afae0cb 340%{_datadir}/mythtv/build/settings.pro
a7691716
ER
341
342%files -n libmyth-static
343%defattr(644,root,root,755)
344%{_libdir}/lib*.a
This page took 0.377789 seconds and 4 git commands to generate.