There are several ways to install programs. Almost everyone has a common part - unpack the source:
tar xvfj mega_app.tar.bz2
or:
tar xvfz mega_app.tar.gz
Execute the command ./configurethen make. These commands are used to assemble executable files, libraries and the like from source code.
It is worth noting the first command - ./configure
If you do ./configure --helpThen you will get a list of parameters that can be transferred. ./configure
For example, such a command is often possible:
./configure --prefix=/opt/mega_app
Or to point out the way to a library, which for some reason was not found by itself:
./configure --kerberos-lib=/opt/kerberos/lib
Classic.
So let's make a sequence:
./configure make
And the team that actually installs all components of the program in the system:
make install
WARNING!!! Using this method, it is easy to get very serious problems in the future. First, you probably won’t be able to uninstall the program.
We use the Checkinstall program.
It's the right way. After completing the general part, start:
checkinstall
The program will ask you about everything, or you can just press ENTER everywhere.
man checkinstall It's also a very good way to go : )
Build a package from the source code for Debian.
It’s a separate and challenging path – you need to deal with many aspects of creating deb packages (or any other). Here, this path will not be described in full, only an example of how to assemble a package of already prepared materials.
So, an example. Go to packages.ubuntu.com, find the desired package (diff for example) and download two files - the source (source).http://archive.ubuntu.com/ubuntu/pool/main/d/diffutils/diffutils_2.8.1.o...) And a patch to it that will correct the source code and create a debian folder with a magical rules file inside (see below).http://archive.ubuntu.com/ubuntu/pool/main/d/diffutils/diffutils_2.8.1-1...).
Copy them into a folder./test And we'll start by unpacking the source code.
tar xvfz diffutils_2.8.1.orig.tar.gz
And then we'll patch it.
cd diffutils-2.8.1/ gzip -cd ../diffutils_2.8.1-11ubuntu4.diff.gz | patch -p1
Now we have to do it. debian/rules executable
chmod +x debian/rules
And put together a package:
fakeroot debian/rules binary
Fakeroot is needed to build a packet by an ordinary user (usually many operations required would not allow you to make a packet).
ls ../ diff_2.8.1-11ubuntu4_i386.deb diffutils-2.8.1 diffutils_2.8.1-11ubuntu4.diff.gz diffutils_2.8.1.orig.tar.gz
As you can see, the package is ready.
Or Debian:
wget name_packet.dsc, name_packet.diff.gz, name_package.orig.tar.gz dpkg-source -x name_packet.dsc cd ./name_package/dpkg-buildpackage -rfakeroot
Conclusion
There are other ways to make a package from start to finish. You need to take the manual for creating packages from your distribution and study this process from and to it. Make lots of packages, good and necessary. If you have made a good build - throw to the developers of the distribution, keep relevant. Remember that even one package you support can be useful to hundreds of people around the world.
Let’s take a short break and watch the video about SEO optimization of the site:





comment