[mythtv-users] Arch Linux Packaging

Warpme warpme at o2.pl
Sun Nov 13 20:50:35 UTC 2011


On 11/12/11 11:37 PM, Simon Jones wrote:
>> Practically this means before plugins build You have to install first - just
>> build - first mythtv package.
>> Simply install it and try again build plugins.
>>
>> P.S this issue forced me to write my own PKGBUILD scripts....
> Warpme, would you be willing to share your PKGBUILD Scripts with me?
>
> Regards,
>
> Si
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
Hi Simon,

Sorry for late replay.
Here is attached my PKGBUILD script.
I'm using it with another script which allows me full automation of 
building mythtv base& plugins packages.
Automation script realizes mythtv-master & mythweb git source updates.
Local repo of mythtv sources is expected in <PKGBUILD 
home>/src/mythtv-master  (here git should do sync)
Local repo of mythweb sources is expected in <PKGBUILD 
home>/src/mythtv-master/mythplugins/mythweb  (here git should do sync)
Hope it will be helpful for YOU !



#----------------------------------------------------------------

root_pass="<your root password>"
unatended="yes"
pkgver=20111112
pkgrel=g47d5296

patchs=(                                                \
         'ticket2416_copy_eit_2_other_source.patch'      \
         'ticket9480_pl_eit_encodings.patch'             \
         'tid_debug_verbosity.patch'                     \
         'eit_verbosity.patch'                           \
         'make_EIT_start_at_time.patch'                  \
         'delay_4_no_concurent_start_rec.patch'          \
         'ringbuffer_verbosity.patch'                    \
         'cardutil_show_displayname.patch'               \
         'mythweb_killing_ffmpeg.patch'                  \
         'ticket9642_mythweb_channels_serviceid.patch'   \
         'ticket9720_mythweb_fix_chan_man_sched.patch'   \
         'ticket9598_mythweb_infinite_redirect.patch'    \
         )

#----------------------------------------------------------------

_gitname=mythtv-master
pkgbase=$_gitname
pkgname=('mythtv-base' 'mythtv-plugins')
pkgdesc="A personal video recorder for Linux"
url="http://www.mythtv.org"
license="GPL"
depends=('bash' 'mysql-clients>=5.0' 'qt' 'lame' 'lirc-utils' 'ffmpeg' 
'freeglut' \
         'faad2' 'libxv' 'libxvmc' 'libavc1394' 'libdc1394' 
'libiec61883' 'flac' \
         'taglib' 'libcdaudio' 'cdparanoia' \
         'perl-net-upnp')
makedepends=('libgl' 'subversion')
conflicts=('mythtv')
replaces=()
groups=('pvr')
backup=()
options=(!strip)
install=
source=(`echo ${patchs[@]:0}`)
arch=('i686' 'x86_64')

build() {

   cd $srcdir/$_gitname
   gitrel=$(git describe --dirty | sed -e "s/.*\-.*\-\(.*\)/\1/")

   msg "Making working copy..."
   rm -rf $srcdir/$_gitname-build
   cp -r  $srcdir/$_gitname $srcdir/$_gitname-build

   msg "Cleaning working copy of MythWEB..."
   cd $srcdir/$_gitname-build/mythplugins/mythweb
   find . -name '.git' | xargs /bin/rm -rf || return 0

   cd $srcdir/$_gitname-build

   msg "Adding time stapmp to sources version..."
   sed -i -e "s/\"\${SOURCE_VERSION}\"/\"\${SOURCE_VERSION}-$pkgver\"/" 
./mythtv/version.sh

   msg "Applying patchs..."
   for i in `echo ${patchs[@]:0} `
   do
     echo "==>Applying $i"
     patch -Np1  -i ${startdir}/$i  || return 1
     echo " "
   done
   msg "All patchs applied sucessfuly !"
   echo " "
   if [ $unatended != "yes" ]; then
    echo "Press any key to continue..."
    read
   fi

}

package_mythtv-base() {

   cd $srcdir/$_gitname-build/mythtv

   MAKEFLAGS="-j5"

   ARCH="${CARCH/_/-}"

   ./configure \
       --prefix=/usr \
       --cpu="${ARCH}" \
       --enable-mmx \
       --enable-audio-oss \
       --enable-audio-alsa \
       --disable-audio-jack \
       --disable-audio-pulse \
       --disable-altivec \
       --disable-distcc \
       --disable-ccache \
       --enable-vdpau \
       --enable-dvb \
       --dvb-path=/usr/include \
       --enable-lirc \
       --enable-joystick-menu \
       --enable-xrandr \
       --enable-xv \
       --enable-x11 \
       --with-bindings=perl,python \
       --python=python2 \
       --compile-type=debug

   make all || return 1

   make INSTALL_ROOT="${pkgdir}" install || return 1

   install -d ${pkgdir}/usr/share/mythtv
   cp -af contrib ${pkgdir}/usr/share/mythtv/

   install -d -m0664 ${pkgdir}/var/http/mythweb
   cp -af $srcdir/$_gitname-build/mythplugins/mythweb/. 
${pkgdir}/var/http/mythweb/
   chown -R http:http ${pkgdir}/var/http/mythweb
   chmod 0664 ${pkgdir}/var/http/mythweb

   cd $startdir
   install -D -m0644 mc.sql ${pkgdir}/usr/share/mythtv
   install -D -m0644 mythbackend.service 
${pkgdir}/etc/systemd/system/mythbackend.service
   install -D -m0644 logrotate ${pkgdir}/etc/logrotate.d/mythbacked

   }

package_mythtv-plugins() {

   echo " "
   msg "Now will install mythtv-base as it is required for building 
mythtv-plugins..."
   echo " "
   if [ $unatended != "yes" ]; then
     echo "Press any key to continue..."
     read
   fi

   (echo "$root_pass") | sudo -S pacman -Uf --noconfirm 
/home/piotro/ArchMyth/ABS/mythtv/mythtv-base-$pkgver-$pkgrel-*.pkg.tar.xz

   conflicts=('mythplugins')

   cd $srcdir/$_gitname-build/mythplugins

   MAKEFLAGS="-j5"

   ARCH="${CARCH/_/-}"

   ./configure \
     --cpu="${ARCH}" \
     --arch=${ARCH} \
     --prefix=/usr \
     --disable-mytharchive

   qmake mythplugins.pro

   make || return 1

   make INSTALL_ROOT="${pkgdir}" install || return 1

}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warpme.vcf
Type: text/x-vcard
Size: 83 bytes
Desc: not available
Url : http://www.mythtv.org/pipermail/mythtv-users/attachments/20111113/458ab88d/attachment.vcf 


More information about the mythtv-users mailing list