]> git.pld-linux.org Git - packages/mythtv.git/blobdiff - mythtv.spec
- second nvidia cleanup
[packages/mythtv.git] / mythtv.spec
index 336c192b8ed25f4c0956c63fcffcc560d5a8e719..15aa9a7b25a5dd92ae5de0ff026f2db04a34c16b 100644 (file)
@@ -1,3 +1,7 @@
+# TODO
+# - bconds: altivec joystick lcd
+# - lcd? (app-misc/lcdproc)
+# - alpha, sparc, ppc arches?
 #
 # Specfile for MythTV
 #
 #  building an rpm by hand on the machine it will be used on, I encourage you
 #  to use "--with cpu_autodetect" to let mythtv decide for you.
 #
-
-# The name of the DVB driver package (used in a couple of places,
-# so it's not hard-coded in the spec itself)
-%define linuxtv_dvb_package linuxtv-dvb-1.1.1
-
-# Compile type:  debug or release
-%define compile_type debug
-
-# Set up some custom-build parameters
-%define with_lirc          %{?_without_lirc: 0}%{!?_without_lirc: 1}
-%define with_alsa          %{?_without_alsa: 0}%{!?_without_alsa: 1}
-%define with_oss           %{?_without_oss: 0}%{!?_without_oss: 1}
-%define with_opengl_vsync  %{?_with_opengl_vsync: 1}%{!?_with_opengl_vsync: 0}
-%define with_arts          %{?_with_arts: 1}%{!?_with_arts: 0}
-%define with_xvmc          %{?_with_xvmc: 1}%{!?_with_xvmc: 0}
-
-Name:           mythtv
-Version: 0.18
-Release: 0.20050326.snapshot
-Summary:        A personal video recorder (PVR) application.
-
-Group:          Applications/Multimedia
-License:        GPL2
-URL:            http://www.mythtv.org/
-
-Source0:        %{name}-%{version}.tar.bz2
-Source1:        mythbackend.sysconfig.in
-Source2:        mythbackend.init.in
-Source3:        mythbackend.logrotate.in
-Source12:       http://linuxtv.org/download/dvb/%{linuxtv_dvb_package}.tar.bz2
-
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-ExclusiveArch:  i386 i686 athlon x86_64
-
-BuildRequires:  gcc-c++
-BuildRequires:  XFree86-devel
-BuildRequires:  freetype-devel >= 2
-BuildRequires:  lame-devel
-BuildRequires:  qt-devel >= 3
-BuildRequires:  mysql-devel
-BuildRequires:  desktop-file-utils
-
-%if %{with_alsa}
-BuildRequires:  alsa-lib-devel
-%endif
-
-%if %{with_lirc}
-BuildRequires:  lirc-lib-devel
+# Conditional build:
+%bcond_with    cpu_autodetect  # enable CPU autodetection at compile time (sets "-march", "-mcpu" compile flags really)
+%bcond_without lirc            # lirc support
+%bcond_without alsa            # alsa support
+%bcond_without oss             # oss support
+%bcond_with    arts            # arts support
+%bcond_without jack            # jack audio connection kit
+%bcond_without opengl          # opengl vsync
+%bcond_without dvb             # DVB support
+%bcond_without xrandr          # disable X11 resolution switching
+%bcond_without ivtv            # ivtv support (PVR-250, PVR-350) NFY
+%bcond_without iptv
+%bcond_with    firewire        # ieee1394 (NFY)
+%bcond_without xvmc            # do not use XvMCW
+%bcond_without  vdpau          # disable nvidia vdpau support
+%bcond_with    mmx             # enable MMX
+%bcond_with     dshowserver    # enable directshow codecs server
+%bcond_with    directfb
+
+# enable mmx automatically on arches having it
+%ifarch %{ix86} %{x8664}
+%ifnarch i386 i486 i586 i686
+%define        with_mmx 1
 %endif
-
-%if %{with_arts}
-BuildRequires:  arts-devel
 %endif
 
-%if %{with_xvmc}
-BuildRequires: nvidia-graphics-devel
+# dshowserver is exclusive arch for x86 x86_64 only
+%ifnarch %{ix86} %{x8664}
+%undefine with_dshowserver
 %endif
 
-#%if %{with_opengl_vsync}
-#BuildRequires: nvidia-graphics-devel
-#%endif
+%define snap rc1
+#%define rel 0.1
+Summary:       A personal video recorder (PVR) application
+Summary(pl.UTF-8):     Osobista aplikacja do nagrywania obrazu (PVR)
+Name:          mythtv
+Version:       0.22
+Release:       0.%{snap}.1
+License:       GPL v2
+Group:         Applications/Multimedia
+Source0:       ftp://ftp.osuosl.org/pub/mythtv/%{name}-%{version}%{snap}.tar.bz2
+# Source0-md5: 049e93d78d5370351539c9a23b47e1af
+Source1:       mythbackend.sysconfig
+Source2:       mythbackend.init
+Source3:       mythbackend.logrotate
+Source5:       pld-mythfrontend.desktop
+# Source5-md5:  f37a903ac97463683bebacdf29406951
+Source6:       pld-mythfrontend.png
+# Source6-md5:  bf76bd1463a022e174e4af976a03e678
+Source20:      dshowcodecs
+# Source20-md5: 48327772b9e150f69e1ab8ff44b9a76c
+#Patch100: %{name}-branch.diff
+Patch0:                %{name}-configure.patch
+#Patch1: %{name}-mythstream.patch
+#Patch2: %{name}-pl.patch
+Patch3:                %{name}-sbinpath.patch
+#Patch4: %{name}-dvdnav-shared.patch
+Patch20:       %{name}-dshowserver_trunk.patch
+URL:           http://www.mythtv.org/
+BuildConflicts:        xorg-driver-video-nvidia-libs
+BuildConflicts: xorg-driver-video-nvidia-devel
+BuildRequires: Mesa-libGLU-devel
+#BuildRequires:        OpenGL-GLU-devel
+BuildRequires: OpenGL-devel
+BuildRequires: Qt3Support-devel
+BuildRequires: QtCore-devel
+BuildRequires: QtGui-devel
+BuildRequires: QtNetwork-devel
+BuildRequires: QtOpenGL-devel
+BuildRequires: QtScript-devel
+BuildRequires: QtSql-devel
+BuildRequires: QtWebKit-devel
+BuildRequires: QtXml-devel
+%{?with_alsa:BuildRequires:    alsa-lib-devel}
+%{?with_arts:BuildRequires:    arts-devel >= 13:0.9.5}
+BuildRequires: ffmpeg-devel
+BuildRequires: freetype-devel >= 1:2.0.0
+%{?with_jack:BuildRequires:    jack-audio-connection-kit-devel}
+BuildRequires: lame-libs-devel
+%{?with_firewire:BuildRequires:        libavc1394-devel}
+BuildRequires: libdts-devel
+%{?with_dvb:BuildRequires:     libdvb-devel}
+BuildRequires: libdvdnav-devel
+%{?with_firewire:BuildRequires:        libiec61883-devel}
+%{?with_firewire:BuildRequires:        libraw1394-devel}
+BuildRequires: linux-libc-headers >= 7:2.6.10
+%{?with_lirc:BuildRequires:    lirc-devel}
+BuildRequires: mysql-devel
+#BuildRequires:        patchutils
+BuildRequires: perl-devel
+BuildRequires: perl-tools-pod
+BuildRequires: pkgconfig
+BuildRequires: python-devel
+BuildRequires: qt4-build
+BuildRequires: qt4-qmake
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.228
+BuildRequires: sed >= 4.0
+%{?with_vdpau:BuildRequires:   libvdpau-devel}
+BuildRequires: xorg-lib-libXext-devel
+%{?with_xvmc:BuildRequires:    xorg-lib-libXvMC-devel}
+BuildRequires: xorg-lib-libXxf86vm-devel
+# for Perl bindings
+BuildRequires: perl-ExtUtils-MakeMaker
+ExclusiveArch: %{ix86} %{x8664} ppc
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define        myth_api_version %(echo %{version} | cut -d. -f1,2)
 
 %description
-MythTV implements the following PVR features, and more, with a
-unified graphical interface:
-
- - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
- - Video compression using RTjpeg or MPEG-4
- - Program listing retrieval using XMLTV
- - Themable, semi-transparent on-screen display
- - Electronic program guide
- - Scheduled recording of TV programs
- - Resolution of conflicts between scheduled recordings
- - Basic video editing
-
-%package -n libmyth
-Summary:        Library providing mythtv support.
-Group:          System Environment/Libraries
-Requires:       freetype >= 2
-Requires:       lame
-Requires:       qt >= 3
-Requires:       qt-MySQL
+MythTV implements the following PVR features, and more, with a unified
+graphical interface:
+- Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
+- Video compression using RTjpeg or MPEG-4
+- Program listing retrieval using XMLTV
+- Themable, semi-transparent on-screen display
+- Electronic program guide
+- Scheduled recording of TV programs
+- Resolution of conflicts between scheduled recordings
+- Basic video editing
+
+%description -l pl.UTF-8
+MythTV implementuje następujące możliwości PVR, a nawet więcej, wraz z
+ujednoliconym interfejsem graficznym:
+- podstawowa funkcjonalność "live-tv"; pauza, szybkie przewijanie,
+  przewijanie "żywej" telewizji
+- kompresja obrazu przy użyciu RTjpeg lub MPEG-4
+- odczyt listy programów przy użyciu XMLTV
+- pseudoprzezroczyste wyświetlanie na obrazie (OSD) z obsługą motywów
+- elektroniczny przewodnik po programie
+- planowane nagrywanie programów telewizyjnych
+- rozwiązywanie konfliktów między planowanymi nagraniami
+- podstawowa edycja obrazu
 
-%description -n libmyth
-Common library code for MythTV and add-on modules (development)
-MythTV provides a unified graphical interface for recording and viewing
-television programs.  Refer to the mythtv package for more information.
-
-%package -n libmyth-devel
-Summary:        Development files for libmyth.
-Group:          Development/Libraries
-Requires:       libmyth = %{version}
-BuildRequires:  freetype-devel >= 2
-BuildRequires:  lame-devel
-BuildRequires:  qt-devel >= 3
-BuildRequires:  mysql-devel
-BuildRequires:  directfb-devel
-%if %{with_alsa}
-BuildRequires:  alsa-lib-devel
-%endif
-%if %{with_lirc}
-BuildRequires:  lirc-lib-devel
-%endif
-%if %{with_arts}
-BuildRequires:  arts-devel
-%endif
+%package backend
+Summary:       Server component of mythtv (a PVR)
+Summary(pl.UTF-8):     Część serwerowa mythtv (PVR)
+Group:         Applications/Multimedia
+Requires(post,preun):  /sbin/chkconfig
+Requires(postun):      /usr/sbin/groupdel
+Requires(postun):      /usr/sbin/userdel
+Requires(pre): /bin/id
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
+Requires:      libmyth = %{version}-%{release}
+Requires:      mythtv = %{version}-%{release}
+Suggests:      mysql
+Provides:      group(mythtv)
+Provides:      user(mythtv)
 
-%description -n libmyth-devel
-This package contains the header files and libraries for developing
-add-ons for mythtv.
+%description backend
+MythTV provides a unified graphical interface for recording and
+viewing television programs. Refer to the mythtv package for more
+information.
 
-%package themes
-Summary:        Base themes for mythtv's frontend.
-Group:          Applications/Multimedia
-Obsoletes:      mythtv-theme-Titivillus
+This package contains only the server software, which provides video
+and audio capture and encoding services. In order to be useful, it
+requires a mythtv-frontend installation, either on the same system or
+one reachable via the network.
 
-%description themes
-MythTV provides a unified graphical interface for recording and viewing
-television programs.  Refer to the mythtv package for more information.
+%description backend -l pl.UTF-8
+MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
+oglądania programów telewizyjnych. Więcej informacji w pakiecie
+mythtv.
 
-This package contains only the base themes used by the frontend and
-mythtvsetup.
+Ten pakiet zawiera tylko oprogramowanie serwerowe, udostępniające
+usługi przechwytywania i kodowania obrazu i dźwięku. Aby było
+przydatne, wymaga instalacji mythtv-frontend - na tym samym systemie,
+albo innym osiągalnym po sieci.
 
 %package frontend
-Summary:        Client component of mythtv (a PVR).
-Group:          Applications/Multimedia
-Requires:       mythtv = %{version}
-Requires:       mythtv-themes = %{version}
-Provides:       mythtv-frontend-api = %(echo %{version} | awk -F. '{print $1 "." $2}')
+Summary:       Client component of mythtv (a PVR)
+Summary(pl.UTF-8):     Część kliencka mythtv (PVR)
+Group:         Applications/Multimedia
+Requires:      libmyth = %{version}-%{release}
+Requires:      mythtv = %{version}-%{release}
+Requires:      mythtv-themes = %{version}-%{release}
+Provides:      mythtv-frontend-api = %{myth_api_version}
 
 %description frontend
-MythTV provides a unified graphical interface for recording and viewing
-television programs.  Refer to the mythtv package for more information.
+MythTV provides a unified graphical interface for recording and
+viewing television programs. Refer to the mythtv package for more
+information.
 
 This package contains only the client software, which provides a
-front-end for playback and configuration.  It requires access to a
+front-end for playback and configuration. It requires access to a
 mythtv-backend installation, either on the same system or one
 reachable via the network.
 
-%package backend
-Summary:        Server component of mythtv (a PVR).
-Group: A        pplications/Multimedia
-Conflicts:      xmltv-grabbers < 0.5.34
-Requires:       mythtv = %{version}
+%description frontend -l pl.UTF-8
+MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
+oglądania programów telewizyjnych. Więcej informacji w pakiecie
+mythtv.
 
-%description backend
-MythTV provides a unified graphical interface for recording and viewing
-television programs.  Refer to the mythtv package for more information.
-
-This package contains only the server software, which provides video
-and audio capture and encoding services.  In order to be useful, it
-requires a mythtv-frontend installation, either on the same system or
-one reachable via the network.
+Ten pakiet zawiera tylko oprogramowanie klienckie, dostarczające
+frontend do odtwarzania i konfiguracji. Wymaga dostępu do instalacji
+mythtv-backend - na tym samym systemie, albo innym osiągalnym po
+sieci.
 
 %package setup
-Summary:        Setup the mythtv backend.
-Group:          Applications/Multimedia
-Requires:       mythtv-backend = %{version}
-Requires:       mythtv-themes = %{version}
-Provides:       mythtvsetup
+Summary:       Setup the mythtv backend
+Summary(pl.UTF-8):     Konfigurator backendu mythtv
+Group:         Applications/Multimedia
+Requires:      libmyth = %{version}-%{release}
 
 %description setup
-MythTV provides a unified graphical interface for recording and viewing
-television programs.  Refer to the mythtv package for more information.
+MythTV provides a unified graphical interface for recording and
+viewing television programs. Refer to the mythtv package for more
+information.
 
 This package contains only the setup software for configuring the
 mythtv backend.
 
-%prep
-%setup -q -a 12
-
-# Install these files that MythTV doesn't include,
-# and update them with the paths set by rpmbuild.
-cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} .
-for file in mythbackend.init \
-            mythbackend.sysconfig \
-            mythbackend.logrotate; do
-  sed -e's|@logdir@|%{_logdir}|g' \
-      -e's|@rundir@|%{_rundir}|g' \
-      -e's|@sysconfigdir@|%{_sysconfigdir}|g' \
-      -e's|@initdir@|%{_initdir}|g' \
-      -e's|@bindir@|%{_bindir}|g' \
-      -e's|@sbindir@|%{_sbindir}|g' \
-      -e's|@subsysdir@|%{_subsysdir}|g' \
-      -e's|@varlibdir@|%{_varlibdir}|g' \
-      -e's|@varcachedir@|%{_varcachedir}|g' \
-      -e's|@logrotatedir@|%{_logrotatedir}|g' \
-  < $file.in > $file
-done
+%description setup -l pl.UTF-8
+MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
+oglądania programów telewizyjnych. Więcej informacji w pakiecie
+mythtv.
 
-%build
-[ -n "$QTDIR" ] || . %{_sysconfdir}/profile.d/qt.sh
-
-# Initialize the options string
-OPTS=""
-
-# Tune for the various processor types?
-%if %{?_with_cpu_autodetect:0}%{!?_with_cpu_autodetect:1}
-    %ifarch i386
-        OPTS="$OPTS --cpu=i386 --tune=pentium4 --enable-mmx"
-    %endif
-    %ifarch i686
-        OPTS="$OPTS --cpu=i686 --tune=pentium4 --enable-mmx"
-    %endif
-    %ifarch athlon
-        OPTS="$OPTS --arch=athlon"
-    %endif
-    %ifarch x86_64
-        OPTS="$OPTS --arch=x86_64"
-    %endif
-%endif
+Ten pakiet zawiera tylko program do konfigurowania backendu mythtv.
 
-# Enable arts support (or make sure it's disabled)
-%if %{with_arts}
-    OPTS="$OPTS --enable-audio-arts"
-%else
-    OPTS="$OPTS --disable-audio-arts"
-%endif
+%package themes
+Summary:       Base themes for mythtv's frontend
+Summary(pl.UTF-8):     Podstawowe motywy dla frontendu mythtv
+Group:         Themes
+Requires:      %{name}-frontend = %{version}-%{release}
 
-# Enable alsa support (or make sure it's disabled)
-%if %{with_alsa}
-    OPTS="$OPTS --enable-audio-alsa"
-%else
-    OPTS="$OPTS --disable-audio-alsa"
-%endif
+%description themes
+MythTV provides a unified graphical interface for recording and
+viewing television programs. Refer to the mythtv package for more
+information.
 
-# Enable oss support (or make sure it's disabled)
-%if %{with_oss}
-    OPTS="$OPTS --enable-audio-oss"
-%else
-    OPTS="$OPTS --disable-audio-oss"
-%endif
+This package contains only the base themes used by the frontend and
+mythtvsetup.
 
-# Enable xvmc support (or make sure it's disabled)
-%if %{with_xvmc}
-    OPTS="$OPTS --enable-xvmc --enable-xvmc-vld"
-%else
-    OPTS="$OPTS --disable-xvmc --disable-xvmc-vld"
-%endif
+%description themes -l pl.UTF-8
+MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
+oglądania programów telewizyjnych. Więcej informacji w pakiecie
+mythtv.
 
-# Enable opengl-vsync support (or make sure it's disabled)
-%if %{with_opengl_vsync}
-    OPTS="$OPTS --enable-opengl-vsync"
-%else
-    OPTS="$OPTS --disable-opengl-vsync"
-%endif
+Ten pakiet zawiera tylko podstawowe motywy używane przez frontend oraz
+mythtvsetup.
 
-# Enable lirc support (or make sure it's disabled)
-%if %{with_lirc}
-    OPTS="$OPTS --enable-lirc"
-%else
-    OPTS="$OPTS --disable-lirc"
+%package -n libmyth
+Summary:       Library providing mythtv support
+Summary(pl.UTF-8):     Biblioteka udostępniająca obsługę mythtv
+Group:         Libraries
+Requires:      QtSql-mysql
+Requires:      freetype >= 1:2.0.0
+Requires:      lame
+
+%description -n libmyth
+Common library code for MythTV and add-on modules (development) MythTV
+provides a unified graphical interface for recording and viewing
+television programs. Refer to the mythtv package for more information.
+
+%description -n libmyth -l pl.UTF-8
+Wspólny kod biblioteki dla MythTV i dodatkowych modułów MythTV
+dostarczający ujednolicony interfejs graficzny do nagrywania i
+oglądania programów telewizyjnych. Więcej informacji w pakiecie
+mythtv.
+
+%package -n libmyth-devel
+Summary:       Development files for libmyth
+Summary(pl.UTF-8):     Pliki nagłówkowe libmyth
+Group:         Development/Libraries
+Requires:      libmyth = %{version}-%{release}
+
+%description -n libmyth-devel
+This package contains the header files for developing add-ons for
+mythtv.
+
+%description -n libmyth-devel -l pl.UTF-8
+Ten pakiet zawiera pliki nagłówkowe do tworzenia dodatków dla mythtv.
+
+%package -n libmyth-static
+Summary:       Static libmyth library
+Summary(pl.UTF-8):     Statyczna biblioteka libmyth
+Group:         Development/Libraries
+Requires:      libmyth-devel = %{version}-%{release}
+
+%description -n libmyth-static
+Static libmyth library.
+
+%description -n libmyth-static -l pl.UTF-8
+Statyczna biblioteka libmyth.
+
+%package -n perl-MythTV
+Summary:       MythTV Perl bindings
+Summary(pl.UTF-8):     Interfejs Perla dla MythTV
+Group:         Libraries
+
+%description -n perl-MythTV
+MythTV Perl bindings.
+
+%description -n perl-MythTV -l pl.UTF-8
+Ten pakiet zawiera moduły Perla do tworzenia dodatków dla mythtv.
+
+%package -n python-MythTV
+Summary:       MythTV Python bindings
+Summary(pl.UTF-8):     Interfejs Pythona dla MythTV
+Group:         Libraries
+Requires:      MySQL-python
+
+%description -n python-MythTV
+MythTV Python bindings.
+
+%description -n python-MythTV -l pl.UTF-8
+Ten pakiet zawiera moduły Pythona do tworzenia dodatków dla mythtv.
+
+%prep
+
+%setup -q -n %{name}-%{version}%{snap}
+
+
+%patch0 -p1
+#%patch1 -p1
+#%patch2 -p1
+%patch3 -p1
+#%patch4 -p1
+
+%{?with_dshowserver:%patch20 -p1}
+rm -rf database/old # not supported in PLD
+
+# lib64 fix - enable to update patch
+%if %{_lib} != "lib" && 0
+find '(' -name '*.[ch]' -o -name '*.cpp' -o -name '*.pro' ')' | \
+xargs grep -l /lib . | xargs sed -i -e '
+       s,/''usr/lib/,/%{_libdir}/,g
+       s,/''lib/mythtv,/%{_lib}/mythtv,g
+       s,{PREFIX}/lib$,{PREFIX}/%{_lib},g
+'
+exit 1
 %endif
 
+# Assigning null to QMAKE_LIBDIR_QT will prevent makefiles contain
+# -L$(QTDIR)/%{_lib} and -Wl,-rpath,$(QTDIR)/%{_lib}. And that will
+# prevent compiler finding libs from system when they should be looked
+# from current buildtree.
+# but that made it link with -lqt which doesn't exist, instead of -lqt-mt
+# so we make QMAKE wrapper which will do sed subst after calling
+# qmake. this is the wrapper.
+cat > qmake-wrapper.sh <<'EOF'
+#!/bin/sh
+getmakefile() {
+       while [ $# -gt 0 ]; do
+               case "$1" in
+               -o)
+                       shift
+                       makefile="$1"
+                       return
+                       ;;
+       esac
+               shift
+       done
+}
+
+qmake-qt4 "$@"
+getmakefile "$@"
+if [ "$makefile" ]; then
+       %{__sed} -i -e '
+               s;-Wl,-rpath,$(QTDIR)/%{_lib};;
+               s;-L$(QTDIR)/%{_lib};;
+       ' $makefile
+fi
+EOF
+chmod +x qmake-wrapper.sh
+
+# move perl bindings to vendor prefix
+sed -i -e 's#perl Makefile.PL#%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"#' \
+   bindings/perl/perl.pro
 
-# Finally, actually configure
+%build
 
-%configure \
-    --prefix=%{_prefix}            \
-    --compile-type=%{compile_type} \
-    --disable-audio-jack           \
-    --enable-dvb                   \
-    --dvb-path=%{_builddir}/%{name}-%{version}/%{linuxtv_dvb_package}/linux/include/ \
-    $OPTS
-#  --disable-joystick-menu  \
-#  --disable-firewire       \
-#  --disable-ivtv           \
-#  --enable-dvb-eit         \
+%if %{with cpu_autodetect}
+# Make sure we have /proc mounted
+if [ ! -r /proc/cpuinfo ]; then
+       echo "You need to have /proc mounted in order to build with cpu_autodetect!"
+       exit 1
+fi
+%endif
 
-# MythTV doesn't support parallel builds
-qmake mythtv.pro
-make %{?_smp_mflags}
+./configure \
+       --prefix=%{_prefix} \
+       --libdir=%{_libdir} \
+       --libdir-name=`basename %{_libdir}` \
+       --mandir=%{_mandir} \
+       --disable-distcc --disable-ccache \
+       --compile-type=%{?debug:debug}%{!?debug:release} \
+       --extra-cflags="%{rpmcflags} -fomit-frame-pointer" \
+       --extra-cxxflags="%{rpmcxxflags} -fomit-frame-pointer" \
+%if %{with cpu_autodetect}
+       --enable-proc-opt \
+%else
+       %ifarch %{ix86}
+               %ifarch athlon
+                       --arch=athlon \
+               %else
+                       --cpu=i386 --tune=pentium4 \
+               %endif
+       %endif
+       %ifarch %{x8664}
+       --arch=x86_64 \
+       %endif
+       %{?with_mmx:--enable-mmx} \
+%endif
+       %{?with_dvb:--enable-dvb --dvb-path=%{_includedir}} \
+       --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \
+       --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
+       --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
+       --%{?with_jack:en}%{!?with_jack:dis}able-audio-jack \
+       --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-vsync \
+       --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
+       --%{?with_firewire:en}%{!?with_firewire:dis}able-firewire \
+       --%{?with_xrandr:en}%{!?with_xrandr:dis}able-xrandr \
+       --%{?with_xvmc:en}%{!?with_xvmc:dis}able-xvmc \
+       --%{?with_ivtv:en}%{!?with_ivtv:dis}able-ivtv \
+       --%{?with_iptv:en}%{!?with_iptv:dis}able-iptv \
+       --%{?with_nellymoserdec:en}%{!?with_nellymoserdec:dis}able-decoder=nellymoser \
+       --%{?with_vdpau:en}%{!?with_vdpau:dis}able-vdpau \
+       --%{?with_directfb:en}%{!?with_directfb:dis}able-directfb \
+       --enable-xv \
+       --enable-x11 \
+
+%{_libdir}/qt4/bin/qmake mythtv.pro
+#sed -i -e 's/usr\/\/usr/usr/g' config.ep
+
+
+%{__make}
 
-# We don't want rpm to add perl requirements to anything in contrib
-find contrib -type f | xargs -r chmod a-x
 
 %install
 rm -rf $RPM_BUILD_ROOT
-make install INSTALL_ROOT=$RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig} \
+               $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_desktopdir}} \
+               $RPM_BUILD_ROOT/var/{cache,lib,log,run}/mythtv \
+               $RPM_BUILD_ROOT%{_libdir}/mythtv \
+               $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins \
+               $RPM_BUILD_ROOT%{_pixmapsdir}
+
+%{__make} install \
+       INSTALL_ROOT=$RPM_BUILD_ROOT
+
+# required to build some plugins
+#      install libs/libavcodec/*.h $RPM_BUILD_ROOT%{_includedir}/mythtv \
+#              libs/libavformat/*.h $RPM_BUILD_ROOT%{_includedir}/mythtv \
+#              libs/libavutil/*.h $RPM_BUILD_ROOT%{_includedir}/mythtv
 
 # Install the files that we added on top of mythtv's own stuff
-install -pD mythbackend.init       $RPM_BUILD_ROOT%{_initdir}/mythbackend
-install -pD mythbackend.sysconfig  $RPM_BUILD_ROOT%{_sysconfigdir}/mythbackend
-install -pD mythbackend.logrotate  $RPM_BUILD_ROOT%{_logrotatedir}/mythbackend
-
-# Desktop entries
-#mkdir -p %{buildroot}%{_datadir}/pixmaps
-#mkdir -p %{buildroot}%{_datadir}/applications
-#for file in %{desktop_applications}; do
-#  install -p %{_sourcedir}/$file.png %{buildroot}%{_datadir}/pixmaps/$file.png
-#  desktop-file-install --vendor %{desktop_vendor} \
-#    --dir %{buildroot}%{_datadir}/applications    \
-#    --add-category X-Red-Hat-Extra                \
-#    --add-category Application                    \
-#    --add-category AudioVideo                     \
-#    %{_sourcedir}/$file.desktop
-#done
-
-# Various utility directories that we want rpm to keep track of mythtv ownership
-mkdir -p $RPM_BUILD_ROOT%{_varlibdir}/mythtv
-mkdir -p $RPM_BUILD_ROOT%{_varcachedir}/mythtv
-mkdir -p $RPM_BUILD_ROOT%{_logdir}/mythtv
-mkdir -p $RPM_BUILD_ROOT%{_logrotatedir}
-mkdir -p $RPM_BUILD_ROOT%{_initdir}
-mkdir -p $RPM_BUILD_ROOT%{_sysconfigdir}
-
-# Create the plugins directory, so rpm can know mythtv owns it
-mkdir -p $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/mythbackend
+%{?with_dshowserver:install %{SOURCE20} $RPM_BUILD_ROOT%{_datadir}/mythtv}
+
+# desktop entries
+install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
+install %{SOURCE6} $RPM_BUILD_ROOT%{_pixmapsdir}
 
 # Install settings.pro so people can see the build options we used
-install -pD settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build/settings.pro
+install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build
+install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build
 
-%clean
-rm -rf $RPM_BUILD_ROOT
+for p in mythfrontend; do
+       for l in $RPM_BUILD_ROOT%{_datadir}/mythtv/i18n/${p}_*.qm; do
+               echo $l | sed -e "s,^$RPM_BUILD_ROOT\(.*${p}_\(.*\).qm\),%%lang(\2) \1,"
+       done > $p.lang
+done
 
-# ldconfig's for packages that install %{_libdir}/*.so.*
-# -> Don't forget Requires(post) and Requires(postun): /sbin/ldconfig
-# ...and install-info's for ones that install %{_infodir}/*.info*
-# -> Don't forget Requires(post) and Requires(preun): /sbin/install-info
+# glibc language codes. attempt was made to change it on libmyth side,
+# but that was just asking for trouble due large coverage of
+# language.lower() usage.
+sed -i -e '
+s,%%lang(en_gb),%%lang(en_GB),
+s,%%lang(zh_tw),%%lang(zh_TW),
+s,%%lang(pt_br),%%lang(pt_BR),
+' *.lang
+
+rm -rf mythtvosd mythwelcome mythlcdserver
+install -d mythtvosd mythwelcome
+cp -a programs/mythtvosd/{README,*.xml} mythtvosd
+cp -a programs/mythwelcome/README mythwelcome
+cp -a programs/mythlcdserver/README mythlcdserver
 
-%post
-/sbin/ldconfig
+%clean
+rm -rf $RPM_BUILD_ROOT
 
-%postun -p /sbin/ldconfig
+# Empty newline after %addusertogroup %{name} video below is intended.
+# Do not remove it until rpm stop joining lines with that macro.
+%pre backend
+%groupadd -g 149 %{name}
+%useradd -u 149 -d /var/lib/mythtv -g %{name} -c "MythTV User" %{name}
+%addusertogroup %{name} video
+%addusertogroup %{name} audio
+
+%post backend
+/sbin/chkconfig --add mythbackend
+
+%preun backend
+if [ "$1" = "0" ]; then
+       %service -q mythbackend stop
+       /sbin/chkconfig --del mythbackend
+fi
+
+%postun backend
+if [ "$1" = "0" ]; then
+       %userremove %{name}
+       %groupremove %{name}
+fi
+
+%post  -n libmyth -p /sbin/ldconfig
+%postun        -n libmyth -p /sbin/ldconfig
+
+%post setup
+if [ "$1" = 1 ]; then
+%banner -e %{name}-setup <<EOF
+To grant mysql permissions to mythtv, please run
+zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql
+EOF
+fi
 
 %files
-%defattr(-,root,root,-)
-%doc README* UPGRADING AUTHORS COPYING FAQ
-%doc database keys.txt
-%doc docs contrib configfiles
+%defattr(644,root,root,755)
+%doc README* UPGRADING AUTHORS FAQ
+%doc docs contrib config
+%doc keys.txt mythtvosd mythwelcome mythlcdserver
 
 %files backend
-%defattr(-,root,root,-)
-%{_bindir}/mythbackend
-%{_bindir}/mythfilldatabase
-%{_bindir}/mythjobqueue
-%attr(-,mythtv,mythtv) %dir %{_varlibdir}/mythtv
-%attr(-,mythtv,mythtv) %dir %{_varcachedir}/mythtv
-%{_initdir}/mythbackend
-%config %{_sysconfigdir}/mythbackend
-%config %{_logrotatedir}/mythbackend
-%attr(-,mythtv,mythtv) %dir %{_logdir}/mythtv
-
-%files setup
-%defattr(-,root,root,-)
-%{_bindir}/mythtv-setup
-
-%files frontend
-%defattr(-,root,root,-)
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_sbindir}/mythbackend
+%attr(755,root,root) %{_sbindir}/mythcommflag
+%attr(755,root,root) %{_bindir}/mythfilldatabase
+%attr(755,root,root) %{_sbindir}/mythjobqueue
+%attr(755,root,root) %{_sbindir}/mythlcdserver
+%attr(755,root,root) %{_bindir}/mythtranscode
+%attr(755,root,root) %{_bindir}/mythreplex
+%attr(775,root,mythtv) %dir /var/lib/mythtv
+%attr(775,root,mythtv) %dir /var/cache/mythtv
+%attr(775,root,mythtv) %dir /var/run/mythtv
+%attr(754,root,root) /etc/rc.d/init.d/mythbackend
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mythbackend
+%attr(775,root,mythtv) %dir %{_localstatedir}/log/mythtv
+
+%files frontend -f mythfrontend.lang
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/mythfrontend
+%attr(755,root,root) %{_bindir}/mythshutdown
+%attr(755,root,root) %{_bindir}/mythavtest
+%attr(755,root,root) %{_bindir}/mythtvosd
+%attr(755,root,root) %{_bindir}/mythwelcome
+%dir %{_datadir}/mythtv
+%dir %{_datadir}/mythtv/themes
+%dir %{_libdir}/mythtv
 %{_datadir}/mythtv/*.xml
-%{_bindir}/mythfrontend
-%{_bindir}/mythtv
-%{_bindir}/mythepg
-%{_bindir}/mythprogfind
-%{_bindir}/mythcommflag
-%{_bindir}/mythtranscode
-%{_bindir}/mythtvosd
-%{_libdir}/mythtv/filters
-%{_libdir}/mythtv/plugins
+%dir %{_libdir}/mythtv/filters
+%dir %{_libdir}/mythtv/plugins
+%attr(755,root,root) %{_libdir}/mythtv/filters/*.so
 %{_datadir}/mythtv/*.ttf
-%{_datadir}/mythtv/i18n
-#%{_datadir}/applications/*myth*.desktop
-#%{_datadir}/pixmaps/myth*.png
+%dir %{_datadir}/mythtv/i18n
+%if %{with dshowserver}
+%{_datadir}/mythtv/dshowcodecs
+%endif
+%{_desktopdir}/*.desktop
+%{_pixmapsdir}/*.png
+
+%files setup
+%defattr(644,root,root,755)
+%doc database
+%attr(755,root,root) %{_bindir}/mythtv-setup
 
 %files themes
-%defattr(-,root,root,-)
-%{_datadir}/mythtv/themes
+%defattr(644,root,root,755)
+%{_datadir}/mythtv/themes/*
 
 %files -n libmyth
-%defattr(-,root,root,-)
-%{_libdir}/*.so.*
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/lib*.so*
+%attr(755,root,root) %{_libdir}/lib*.a
+%{_datadir}/mythtv/*.pl
 
 %files -n libmyth-devel
-%defattr(-,root,root,-)
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/*.so
 %{_includedir}/*
-%{_libdir}/*.so
-%{_libdir}/*.a
-%{_datadir}/mythtv/build/settings.pro
-
-
-%changelog
-
-* Sat Mar 26 2005 Chris Petersen <rpm@forevermore.net> - 0.18-0.20050326.snapshot
-- Finished first revision of new specfile according to new Fedora guidelines.
-- Some portions of this file are based on Axel Thimm's mythtv spec, which was
-- made incompatible by updates to mythtv's build process.
+%{_datadir}/mythtv/build
+
+%files -n libmyth-static
+%defattr(644,root,root,755)
+
+%files -n perl-MythTV
+%defattr(644,root,root,755)
+%{perl_vendorlib}/MythTV.pm
+%dir %{perl_vendorlib}/MythTV
+%{perl_vendorlib}/MythTV/*.pm
+%{perl_vendorlib}/IO/Socket/INET/MythTV.pm
+%exclude %{perl_vendorarch}/auto/MythTV/.packlist
+
+%files -n python-MythTV
+%defattr(644,root,root,755)
+%dir %{py_sitescriptdir}/MythTV
+# XXX: package .py[co] only
+%{py_sitescriptdir}/MythTV/*
+%{py_sitescriptdir}/*.egg-info
This page took 0.092808 seconds and 4 git commands to generate.