Ticket #7090: rpmpatch.5.diff

File rpmpatch.5.diff, 18.1 KB (added by jtwyford@…, 16 years ago)

more updates based on jarod's comments.

  • packaging/rpm/mythtv.spec

     
    1111#
    1212# The latest version of this file can be found at:
    1313#
    14 #     http://www.mythtv.org/wiki/index.php/Mythtv-svn-rpmbuild.spec
     14#     http://svn.mythtv.org/svn/trunk/packaging/rpm/mythtv.spec
    1515#
    1616# Note:
    1717#
     
    6060%define desktop_vendor  xris
    6161
    6262# SVN Revision number and branch ID
    63 %define _svnrev r21243
     63%define _svnrev r21928
    6464%define branch trunk
    6565
    6666#
    6767# Basic descriptive tags for this package:
    6868#
    6969Name:           mythtv
    70 Summary:        A digital video recorder (DVR) application.
     70Summary:        A digital video recorder (DVR) application
    7171URL:            http://www.mythtv.org/
    7272Group:          Applications/Multimedia
    7373
     
    119119
    120120################################################################################
    121121
    122 Source0:   http://www.mythtv.org/mc/mythtv-%{version}.tar.bz2
    123 Source1:   http://www.mythtv.org/mc/mythplugins-%{version}.tar.bz2
     122Source0:   mythtv-%{version}.tar.bz2
     123Source1:   mythplugins-%{version}.tar.bz2
    124124Source10:  PACKAGE-LICENSING
    125125Source101: mythbackend.sysconfig.in
    126126Source102: mythbackend.init.in
     
    179179BuildRequires:  gsm-devel
    180180BuildRequires:  lame-devel
    181181BuildRequires:  libdca-devel
    182 # libdvdcss will be dynamically loaded if installed
    183 #BuildRequires:  libdvdcss-devel >= 1.2.7
    184182BuildRequires:  libdvdnav-devel
    185183BuildRequires:  libdvdread-devel >= 0.9.4
    186184BuildRequires:  libfame-devel >= 0.9.0
     
    193191BuildRequires:  transcode >= 0.6.8
    194192BuildRequires:  x264-devel
    195193BuildRequires:  xvidcore-devel >= 0.9.1
    196 BuildRequires:  pulseaudio-libs-devel
    197194
    198195# Audio framework support
    199196BuildRequires:  alsa-lib-devel
    200197BuildRequires:  arts-devel
    201198BuildRequires:  jack-audio-connection-kit-devel
     199BuildRequires:  pulseaudio-libs-devel
    202200
    203201# Need dvb headers to build in dvb support
    204202BuildRequires: kernel-headers
     
    328326Summary: MythTV documentation
    329327Group:   Documentation
    330328
     329Requires:  mythtv-common       = %{version}
     330
    331331%description docs
    332332The MythTV documentation, contrib files, database initialization file
    333333and miscellaneous other bits and pieces.
     
    335335################################################################################
    336336
    337337%package -n libmyth
    338 Summary:   Library providing mythtv support.
     338Summary:   Library providing mythtv support
    339339Group:     System Environment/Libraries
    340340
    341341Requires:  freetype >= 2
     
    351351################################################################################
    352352
    353353%package -n libmyth-devel
    354 Summary:   Development files for libmyth.
     354Summary:   Development files for libmyth
    355355Group:     Development/Libraries
    356356
    357357Requires:  libmyth = %{version}-%{release}
     
    385385Requires:  gsm-devel
    386386Requires:  lame-devel
    387387Requires:  libdca-devel
    388 #Requires:  libdvdcss-devel >= 1.2.7
    389388Requires:  libdvdnav-devel
    390389Requires:  libdvdread-devel >= 0.9.4
    391390Requires:  libfame-devel >= 0.9.0
     
    403402Requires:  alsa-lib-devel
    404403Requires:  arts-devel
    405404Requires:  jack-audio-connection-kit-devel
     405Requires:  pulseaudio-libs-devel
    406406
    407407# Need dvb headers for dvb support
    408408Requires:  kernel-headers
     
    517517# Wish we could do this:
    518518#BuildArch:      noarch
    519519
     520Requires:  mythtv-common       = %{version}
    520521Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
    521522Requires:       perl(DBD::mysql)
    522 # Disabled because there are no RPM packages for these yet,
    523 # and RPM doesn't seem to be picking up on CPAN versions
    524 #Requires:       perl(Net::UPnP)
    525 #Requires:       perl(Net::UPnP::ControlPoint)
     523Requires:       perl(Net::UPnP)
     524Requires:       perl(Net::UPnP::ControlPoint)
    526525
    527526%description -n perl-MythTV
    528527Provides a perl-based interface to interacting with MythTV.
     
    539538# Wish we could do this:
    540539#BuildArch:      noarch
    541540
     541Requires:  mythtv-common       = %{version}
    542542Requires:       MySQL-python
    543543
    544544%description -n python-MythTV
     
    651651%description -n mythgame
    652652A game frontend (xmame, nes, snes, pc) for MythTV.
    653653
    654 ################################################################################
    655 #package -n mythgame-emulators
    656 #Summary:   Meta-package requiring emulators for game types mythgame knows about
    657 #Group:     Applications/Multimedia
    658 #Requires:  mythgame = %{version}-%{release}
    659 # Multi Arcade Machine Emulator, Amiga, Atari 2600
    660 #Requires:  sdlmame
    661 #Requires:  e-uae
    662 #Requires:  stella
    663 # Nintendo, Super Nintendo, Nintendo 64
    664 #Requires:  fceultra
    665 #Requires:  zsnes
    666 #Requires:  mupen64, mupen64-ricevideo
    667 # Sega Genesis, Sega Master System, Game Gear
    668 #Requires:  gens
    669 #Requires:  dega-sdl
    670 #Requires:  osmose
    671 # TurboGraphx 16 (and others)
    672 #Requires:  mednafen
    673 
    674 #description -n mythgame-emulators
    675 #Meta-package requiring emulators for game types mythgame knows about.
    676 
    677654%endif
    678655################################################################################
    679656%if %{with_mythmovies}
     
    796773# Replace static lib paths with %{_lib} so we build properly on x86_64
    797774# systems, where the libs are actually in lib64.
    798775    if [ "%{_lib}" != "lib" ]; then
    799         grep -rlZ /lib/  . | xargs -r0 sed -i -e 's,/lib/,/%{_lib}/,g'
    800         grep -rlZ /lib$  . | xargs -r0 sed -i -e 's,/lib$,/%{_lib},'
     776        grep -rlZ '/lib/' . | xargs -r0 sed -i -e 's,/lib/,/%{_lib}/,g'
     777        grep -rlZ '/lib$' . | xargs -r0 sed -i -e 's,/lib$,/%{_lib},'
    801778        grep -rlZ '/lib ' . | xargs -r0 sed -i -e 's,/lib ,/%{_lib} ,g'
    802779    fi
    803780
     
    891868    --libdir=%{_libdir}                         \
    892869    --libdir-name=%{_lib}                       \
    893870    --mandir=%{_mandir}                         \
    894     --enable-iptv                               \
     871    --enable-iptv                               \
    895872    --enable-pthreads                           \
    896873    --enable-ffmpeg-pthreads                    \
    897874    --enable-joystick-menu                      \
    898     --enable-audio-arts                         \
    899875    --enable-audio-alsa                         \
    900876    --enable-audio-oss                          \
    901877    --enable-audio-jack                         \
     
    947923    --compile-type=release                      \
    948924%endif
    949925    --enable-debug
    950 ###    --enable-libx264                            \
    951926
    952927# Insert rpm version-release for mythbackend --version output
    953928    find . -name version.pro -exec sed -i -e 's,svnversion \$\${SVNTREEDIR},echo "%{version}-%{release}",g' {} \;
     
    11081083
    11091084    mkdir -p %{buildroot}%{_datadir}/mythtv/build/
    11101085    install -p -m 644 settings.pro %{buildroot}%{_datadir}/mythtv/build/
    1111 
     1086# fix the base themes
     1087    chmod a-x %{buildroot}%{_datadir}/mythtv/themes/default/htmls/*.html
    11121088    cd ..
    11131089
    11141090# MythPlugins
     
    11221098%endif
    11231099%if %{with_mythvideo}
    11241100    mkdir -p %{buildroot}%{_localstatedir}/lib/mythvideo
     1101    chmod a+x %{buildroot}%{_datadir}/mythtv/mythvideo/scripts/ttvdb/{tvdb*,cache}.py
    11251102%endif
    11261103%if %{with_mythgallery}
    11271104    mkdir -p %{buildroot}%{_localstatedir}/lib/pictures
     
    11291106%if %{with_mythgame}
    11301107    mkdir -p %{buildroot}%{_datadir}/mythtv/games/nes/{roms,screens}
    11311108    mkdir -p %{buildroot}%{_datadir}/mythtv/games/snes/{roms,screens}
    1132 #   mkdir -p %{buildroot}%{_datadir}/mythtv/games/mame/{roms,screens,flyers,cabs}
    11331109    mkdir -p %{buildroot}%{_datadir}/mythtv/games/PC/screens
    11341110    mkdir -p %{buildroot}%{_datadir}/mame
    11351111    ln -s ../../mame %{buildroot}%{_datadir}/mythtv/games/xmame
     
    11471123    cp -a * %{buildroot}%{_datadir}/mythweb/
    11481124    mkdir -p %{buildroot}%{_datadir}/mythweb/{image_cache,php_sessions}
    11491125# fix up permissions
    1150     chmod -R g-x %{buildroot}%{_datadir}/mythweb
     1126    chmod a-x %{buildroot}%{_datadir}/mythweb/classes/*.php
    11511127
    11521128    mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d
    11531129    cp %{SOURCE401} %{buildroot}%{_sysconfdir}/httpd/conf.d/
     
    11601136    cd ..
    11611137%endif
    11621138
     1139
    11631140################################################################################
    11641141
    11651142%clean
     
    11751152# Add the "mythtv" user
    11761153/usr/sbin/useradd -c "mythtvbackend User" \
    11771154    -s /sbin/nologin -r -d %{_varlibdir}/mythtv mythtv 2> /dev/null || :
     1155/usr/sbin/usermod -a -G video mythtv
    11781156
    11791157%post backend
    11801158/sbin/chkconfig --add mythbackend
     
    12391217%{_datadir}/mythtv/devicemaster.xml
    12401218%{_datadir}/mythtv/deviceslave.xml
    12411219%{_datadir}/mythtv/setup.xml
     1220%{_bindir}/mythavtest
    12421221%{_bindir}/mythfrontend
    1243 %{_bindir}/mythtv
    12441222%{_bindir}/mythtvosd
    12451223%{_bindir}/mythlcdserver
    12461224%{_bindir}/mythshutdown
     
    13201298%doc mythplugins-%{version}/mythbrowser/AUTHORS
    13211299%doc mythplugins-%{version}/mythbrowser/COPYING
    13221300%doc mythplugins-%{version}/mythbrowser/README
    1323 %{_bindir}/mythbrowser
    1324 %{_libdir}/mythtv/plugins/libmythbookmarkmanager.so
     1301%{_libdir}/mythtv/plugins/libmythbrowser.so
    13251302%{_datadir}/mythtv/i18n/mythbrowser_*.qm
    13261303%endif
    13271304
     
    13611338%dir %{_datadir}/mame/flyers
    13621339%{_datadir}/mythtv/game_settings.xml
    13631340%{_datadir}/mythtv/i18n/mythgame_*.qm
    1364 
    1365 #files -n mythgame-emulators
    1366 #defattr(-,root,root,-)
    1367 #{_datadir}/mythtv/games/xmame
    1368 #{_datadir}/mame/screens
    1369 #{_datadir}/mame/flyers
    13701341%endif
    13711342
    13721343%if %{with_mythmovies}
     
    14351406%defattr(-,root,root,-)
    14361407%doc mythplugins-%{version}/mythweb/README
    14371408%config(noreplace) %{_sysconfdir}/httpd/conf.d/mythweb.conf
    1438 %defattr(-,apache,apache,0775)
     1409%defattr(-,apache,apache,-)
    14391410%dir %{_datadir}/mythweb
    14401411%{_datadir}/mythweb/*
    14411412%endif
     
    14531424################################################################################
    14541425
    14551426%changelog
     1427* Thu Sep 17 2009 James Twyford <jtwyford@gmail.com> 0.22-0.2.svn
     1428- Updates to compile with trunk and other cleanups as suggested by rpmlint
    14561429
    1457 * Thu Aug 13 2009 Chris Petersen <rpm@forevermore.net> 0.22-01.svn
     1430* Thu Aug 13 2009 Chris Petersen <rpm@forevermore.net> 0.22-0.1.svn
    14581431- Add XML::Simple requirement for mythvideo (for tmdb.pl)
    14591432- Remove now-deprecated call for XvMCNVIDIA_dynamic
    14601433
    1461 * Mon Jul 27 2009 Chris Petersen <rpm@forevermore.net> 0.22-01.svn
     1434* Mon Jul 27 2009 Chris Petersen <rpm@forevermore.net> 0.22-0.1.svn
    14621435- Rename xvmcnvidia stuff to just nvidia, and add vdpau options to it
    14631436
    1464 * Sat Jul 25 2009 Chris Petersen <rpm@forevermore.net> 0.22-01.svn
     1437* Sat Jul 25 2009 Chris Petersen <rpm@forevermore.net> 0.22-0.1.svn
    14651438- Remove all a52 references because ./configure no longer accepts even "disable"
    14661439- Remove non-GPL libfaac options (not really used by MythTV anyway)
    14671440
    1468 * Sun Jun 28 2009 Chris Petersen <rpm@forevermore.net> 0.22-01.svn
     1441* Sun Jun 28 2009 Chris Petersen <rpm@forevermore.net> 0.22-0.1.svn
    14691442- Remove xvmc-opengl references that were removed in r20723
    14701443- Add requirement for pulseaudio-libs-devel now that some distros are requiring it
    14711444
  • packaging/rpm/mythtv-themes.spec

     
    1717%define desktop_vendor  xris
    1818
    1919# SVN Revision number and branch ID
    20 %define _svnrev r19708
     20%define _svnrev r21928
    2121%define branch trunk
    2222
    2323#
     
    4141
    4242# Tarballs created from svn "themes" and "myththemes" directories
    4343# Hopefully these will merge before 0.22 is released.
    44 Source0:        http://www.mythtv.org/mc/myththemes-%{version}.tar.bz2
    45 Source1:        themes-%{version}.tar.bz2
     44Source0:        themes-%{version}.tar.bz2
     45Source1:        oldthemes-%{version}.tar.bz2
    4646
    4747BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
    4848
     
    7878################################################################################
    7979
    8080%build
    81 cd myththemes-%{version}
     81cd themes-%{version}
    8282%configure
    8383cd ..
    8484
    85 cd themes-%{version}
     85cd oldthemes-%{version}
    8686%configure
    8787cd ..
    8888
     
    9191%install
    9292rm -rf %{buildroot}
    9393
    94 cd myththemes-%{version}
     94cd themes-%{version}
    9595make install INSTALL_ROOT=%{buildroot}
    9696cd ..
    9797
    98 cd themes-%{version}
     98cd oldthemes-%{version}
    9999make install INSTALL_ROOT=%{buildroot}
    100100cd ..
    101101
  • packaging/rpm/build_myth.sh

     
    102102    # Update the SVN checkout
    103103        updatesvn mythtv "$1"
    104104        updatesvn mythplugins "$1"
     105        updatesvn themes "$1"
     106        updatesvn oldthemes "$1"
    105107    # Remove the existing libmyth-devel so it doesn't confuse qmake
    106108    # (we can't override the order of the include file path)
    107109        PKG=`rpm -q libmyth-devel`
    108110        if [ `expr match "$PKG" 'libmyth.*'` -gt 0 ]; then
    109             echo "Removing existing libmyth-devel package to avoid conflicts"
    110             sudo rpm -e libmyth-devel.i386 libmyth-devel.x86_64 2>/dev/null
     111            echo "Removing existing libmyth-devel package to avoid conflicts. Please enter root password."
     112            su -c "rpm -e libmyth-devel"
    111113        fi
    112114    # Update the spec
    113115        updatespec $REL "$ABSPATH/mythtv.spec"
     116        updatespec $REL "$ABSPATH/mythtv-themes.spec"
    114117    # Clean up any old tarballs that might exist
    115         rm -f "$ABSPATH"/mythtv/myth*.tar.bz2
     118        rm -f "$ABSPATH"/mythtv/myth*.tar.bz2 \
     119              "$ABSPATH"/mythtv-themes/*hemes*.tar.bz2
    116120    # Create the appropriate tarballs
    117121        echo "Creating tarballs from svn checkout at $SVNDIR"
    118122        cd "$SVNDIR"
     
    126130            mv "$file-$VERSION" "$file"
    127131            echo "$ABSPATH/mythtv/$file-$VERSION.tar.bz2"
    128132        done
     133        for file in themes oldthemes; do
     134            if [ -d "$file-$VERSION" ]; then
     135                rm -rf "$file-$VERSION"
     136            fi
     137            echo -n "    "
     138            mv "$file" "$file-$VERSION"
     139            tar jcf "$ABSPATH/mythtv-themes/$file-$VERSION.tar.bz2" --exclude .svn "$file-$VERSION"
     140            mv "$file-$VERSION" "$file"
     141            echo "$ABSPATH/mythtv-themes/$file-$VERSION.tar.bz2"
     142        done
     143
    129144    # Build MythTV
    130145        rpmbuild -bb "$ABSPATH"/mythtv.spec \
    131             --define "_sourcedir $ABSPATH/mythtv" \
    132             --with debug            \
    133             --without mytharchive   \
    134             --without mythgallery   \
    135             --without mythgame      \
    136             --without mythbrowser   \
    137             --without mythmovies    \
    138             --without mythnews      \
    139             --without mythzoneminder
     146            --define "_sourcedir $ABSPATH/mythtv"
     147    # Blah
     148    #    rpmbuild -bb "$ABSPATH"/mythtv-themes.spec \
     149    #        --define "_sourcedir $ABSPATH/mythtv-themes"
     150
    140151    # Error?
    141152        if [ "$?" -ne 0 ]; then
    142153            echo "MythTV build error."
     
    152163        fi
    153164    }
    154165
    155 # Function to build mythtv themes packages
    156     function buildthemes {
    157     # Update the SVN checkout -- make sure not to
    158         svnupdate mythtv-themes "$1"
    159     # Update the spec
    160         updatespec $REL "$ABSPATH/mythtv-themes.spec"
    161     # Clean up any old tarballs that might exist
    162         rm -f "$ABSPATH"/mythtv-themes/*themes*.tar.bz2
    163     # Create the appropriate tarballs
    164         for file in myththemes themes; do
    165             if [ -d "$file-$VERSION" ]; then
    166                 rm -rf "$file-$VERSION"
    167             fi
    168             echo -n "    "
    169             mv "$file" "$file-$VERSION"
    170             tar jcf "$ABSPATH/mythtv-themes/$file-$VERSION.tar.bz2" --exclude .svn "$file-$VERSION"
    171             mv "$file-$VERSION" "$file"
    172             echo "$ABSPATH/mythtv-themes/$file-$VERSION.tar.bz2"
    173         done
    174     # Disabled until I can clean this up later -- themes now require libmyth in
    175     # order to compile.
    176     #
    177     ## Build MythTV Themes
    178     #    rpmbuild -bb /usr/src/redhat/SPECS/mythtv-themes.spec
    179     ## Error?
    180     #    if [ "$?" -ne 0 ]; then
    181     #        echo "MythTV Themes build error."
    182     #        return
    183     #    fi
    184     }
    185 
    186166# A function to install mythtv packages
     167# This doesn't work when building as a user...
     168# There must be a way to get the %{_topdir} from the user's rpm macros
    187169    function installmyth {
    188170        REL="$1"
    189         sudo rpm -Uvh --force --nodeps                                                   \
    190             /usr/src/redhat/RPMS/x86_64/mythtv-docs-$VERSION-0.3.svn.r$REL.*.rpm         \
    191             /usr/src/redhat/RPMS/x86_64/libmyth-$VERSION-0.3.svn.r$REL.*.rpm             \
    192             /usr/src/redhat/RPMS/x86_64/libmyth-devel-$VERSION-0.3.svn.r$REL.*.rpm       \
    193             /usr/src/redhat/RPMS/x86_64/mythtv-base-themes-$VERSION-0.3.svn.r$REL.*.rpm  \
    194             /usr/src/redhat/RPMS/x86_64/mythtv-frontend-$VERSION-0.3.svn.r$REL.*.rpm     \
    195             /usr/src/redhat/RPMS/x86_64/mythtv-backend-$VERSION-0.3.svn.r$REL.*.rpm      \
    196             /usr/src/redhat/RPMS/x86_64/mythtv-setup-$VERSION-0.3.svn.r$REL.*.rpm        \
    197             /usr/src/redhat/RPMS/x86_64/mythtv-common-$VERSION-0.3.svn.r$REL.*.rpm       \
    198             /usr/src/redhat/RPMS/x86_64/perl-MythTV-$VERSION-0.3.svn.r$REL.*.rpm         \
    199             /usr/src/redhat/RPMS/x86_64/python-MythTV-$VERSION-0.3.svn.r$REL.*.rpm       \
    200             /usr/src/redhat/RPMS/x86_64/mythmusic-$VERSION-0.3.svn.r$REL.*.rpm           \
    201             /usr/src/redhat/RPMS/x86_64/mythvideo-$VERSION-0.3.svn.r$REL.*.rpm           \
    202             /usr/src/redhat/RPMS/x86_64/mythweather-$VERSION-0.3.svn.r$REL.*.rpm         \
    203             /usr/src/redhat/RPMS/x86_64/mythtv-debuginfo-$VERSION-0.3.svn.r$REL.*.rpm
    204             #/usr/src/redhat/RPMS/x86_64/mythtv-themes-$VERSION-0.3.svn.r$REL.*.rpm  \
     171        echo "Installing MythTV-$VERSION.r$REL. Please enter root password."
     172        su -c "rpm -Uvh /usr/src/redhat/RPMS/x86_64/{libmyth,libmyth-devel,mytharchive,mythbrowser,mythflix,mythgallery,mythgame,mythmovies,mythmusic,mythnews,mythplugins,mythtv-backend,mythtv-common,mythtv-docs,mythtv-frontend,mythtv-setup,mythvideo,mythweather,mythweb,mythzoneminder,perl-MythTV,python-MythTV,mythtv}-$VERSION-0.3.svn.r$REL.*.rpm"
    205173    }
    206174
    207 # And a function to install mythtv theme packages, since they need libmyth
    208 # to be already installed in order to build them
    209     function installthemes {
    210         REL="$1"
    211     }
    212 
    213 
    214175###############################################################################
    215176# Actually execute the program here
    216177###############################################################################