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.
- Add a new user to create the rpm ( doing rpm as root is not safe ! ).
su - root
su - pakager
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
cp motion-3.1.17.tar.gz $HOME/rpm/SOURCES/.
- Make the Rpm and Srpm.
rpmbuild -ba motion.spec
- Install the Rpm.
rpm -i /home/packager/rpm/RPMS/i386/motion-3.1.17-1.i386.rpm
- You can create a Rpm package optimized for you CPU adding the option
rpmbuild -bb --target=athlon motion.spec
this will create a rpm optimized for athlon in
- 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 )
- 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
- Maybe you have to change some values in some files inside debian directory
- 29 May 2005