Motion - Packaging Motion

Packaging Motion

A brief guide to make the most popular distribution packages for motion ( rpm , deb , tgz , ebuilds , etc ).

RPM ( Red Hat , Fedora )

There're several way to create a rpm but maybe the easiest way is using an spec file , so that is the way we will make the rpm package of motion.

Basic

  • Add a new user to create the rpm ( doing rpm as root is not safe ! ).
    su - root
    adduser packager
    su - pakager
    mkdir $HOME/rpm
    mkdir $HOME/rpm/SOURCES
    mkdir $HOME/rpm/SPECS
    mkdir $HOME/rpm/SRPMS
    mkdir $HOME/rpm/BUILD
    mkdir $HOME/rpm/RPMS
    echo "%_topdir $HOME/rpm" >> $HOME/.rpmmacros

  • Get the tarball of motion ( i.ex motion-3.1.17.tar.gz ).
  • Decompress it and get the spec file ( motion.spec ).
    tar xfvz motion-3.1.17.tar.gz
    cp motion-3.1.17/motion.spec .

  • Copy the tarball to $HOME/rpm/SOURCES
    cp motion-3.1.17.tar.gz $HOME/rpm/SOURCES/.

  • Make the Rpm and Srpm.
    rpmbuild -ba motion.spec

  • Install the Rpm.
    exit
    rpm -i /home/packager/rpm/RPMS/i386/motion-3.1.17-1.i386.rpm

Advanced

  • You can create a Rpm package optimized for you CPU adding the option --target to rmpbuild.
    rpmbuild -bb --target=athlon motion.spec
    this will create a rpm optimized for athlon in /home/packager/rpm/RPMS/athlon/motion-3.1.17-1.athlon.rpm.

  • If you did a rpmbuild -ba ( to create a rpm and srpm ) you can create the optimized package from the srpm:
    rpmbuild --rebuild --target=athlon rpm/SRPMS/motion-3.1.18-1.src.rpm

DEB ( Debian / Ubuntu )

Quick Guide

  • Get a motion tarball ( i.ex motion-3.2.11.tar.gz )
  • Get the debian skel
  • Decompress motion tarball
    tar xfvz motion-3.2.11.tar.gz
  • Decompress debian skel
    tar xfvz debian-motion.tar.gz
  • Copy the debian skel directory to motion source directory.

   chmod +x debian/rules
   mv debian motion-3.2.11/   
   dpkg-buildpackage -tc -b -rfakeroot
 

NOTE
Maybe you have to change some values in some files inside debian directory

-- AngelCarpintero - 29 May 2005
Topic attachments
I Attachment Action Size Date Who Comment
debian-motion.tar.gzgz debian-motion.tar.gz manage 28 K 11 Dec 2008 - 08:55 AngelCarpintero Skel for ubuntu hardy , many fixes and new init.d script
Topic revision: r13 - 11 Dec 2008, AngelCarpintero
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.