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