About a year ago I explained how create packages for Archlinux. Well, today I am going to explain how to create them from packages .deb, those used in Debian / Mint / Ubuntu / etc.
This article arose after reading a question from the user in the forum jorgegc because I could not install a package from AUR, mainly because it is outdated and used a version discontinued of the PKGBUILD (luckily I have previously made packages in this way), I will also explain how to make packages of programs that need 32-bit libraries, closed code o already compiled and that it has different packages for download.
The basis for the PKGBUILD is the same, only with a few changes.
The first change will be the use of a sentence ifelif by Bash
if [ "${CARCH}" = 'x86_64' ]; then
ARCH='amd64'
md5sums=('192a0a222893d59d95f00c34f3c8a674')
depends=('openal' 'lib32-openal')
elif [ "${CARCH}" = 'i686' ]; then
ARCH='i386'
md5sums=('047c670443124193c5cc3dd54da99925')
depends=('openal')
fi
source=("http://www.unaurl.com/files/${name}.$ARCH.deb")
In this example a variable has been defined that will later be used to change the URL where is the package (in this case the architecture of the package to download).
In addition, depending on the architecture, the MD5 sums so we will change these to the corresponding ones.
Finally we see that in the example we change the dependencies. In some 64-bit programs it is necessary to install 32-bit versions of some libraries so we have to indicate them. If they are not necessary simply define the variable in the usual way.
Now for .deb packages we are only going to need the following lines inside the function package ():
cd "${srcdir}/"
tar xvzf data.tar.gz -C .
cp -r usr ${pkgdir}
As you can see, we only need 3 lines in this case to generate the package. If something else is necessary (for example copying a file that does not come with the package, or modifying the content of one) you just have to put it as with any other package.
And voila, we already have a multilib package or created from a deb package ready to use.
I hope you like it and that it has explained me well 😀
Isn't it easier to use checkinstall?
Checkinstall is used to create deb, rpm or Slackware packages more easily.
Good. Let's see if I take the time to add Iceweasel to the slacky.eu repo.
What's wrong with Firefox? : p
which is not in Debian: p
That's not exactly what I meant xD
Because Firefox does not have an official version for Debian, and if I use the Ubuntu or Mint repos, they take the same time as Iceweasel to publish them; In addition, they ask you all the time if you want to send your data or not (a really trivial function for a browser that defends privacy).
I'm not against Firefox, and honestly, I hardly use the Firefox ESR on Slackware and the Firefox Release on Windows (Iceweasel I only use it on Debian, but since Arch gives me the wonderful advantage of installing it, I'll install it). Matter of taste, nothing more.
Hi. I have some bash scripts. One to generate the basic folders and files for a deb package. And the last one to generate the package from all files and folders. If you are interested, I can share it.
Of course you can, upon payment XD
Of course it interests ... at least to me.
Now that I am with Manjaro I appreciate all possible information.
How great you are, partner.
I was going to have told you in the forum that if you could explain to me how to compile .deb packages and I have not told you anything so as not to abuse your generosity…. and I go to the page and I see that you have uploaded an article explaining the whole process.
This shows that you are a generous person.
I said, you are a crack.
All the best
Thank you, and again thank you because your question gave me the idea ^^
It's great friend, once I tried a soft that I don't remember the name that converted from .deb to .rpm, but it didn't work well for me.
someone with arch could test if this soft is passed well to rpm and the installation opens well?
http://www.justcloud.com/download/linux-64
It is to backup in the cloud, I already paid for a while and I have more than 40gb in the cloud =)
That would have to be tried by people who use Fedora, Red Hat or other derivatives.
From the description you give I suppose you mean alien (and it has nothing to do with a certain Xenoform)
Great! I always told myself that one day I wanted to make a package, even if it is to know how to do it :).
In these types of post I would appreciate that the blog implement the option to add entries like this in "favorites" of my account
Totally agree, I planted it, but nothing 🙂
It would also be good, to be able to follow certain users
Great old man, I have been using manjaro for a few days and for studies I need to install packet tracer from Cisco but it only has a .deb package of the latest version and the ke is in AUR always gives me an error when compiling, I hope with these steps I can install it since by force I have been using linux mint, thank you very much
to see if anyone dares to put in AUR Multisystem
depends on deb libraries that are not in arch
But if it works, its function is to create multi-ISO pen drives with grub2 better than unetbootin that only makes one.
At the moment I have a ubuntu ISO of hers inside that allows me to add images if I want by booting from it on the USB itself
but if no one dares save my ticket
Sorry, there is already a multisystem, and I think not
In multisystem ...
but fatresize since yaourt gives problems, and they have put it as optional
Great 😀 to approve with "Purrr" a program to rename files in bulk.
Regards,
Currently in AUR they are eliminating the packages that do not have the package () function, how can I know what lines to put there? That is, I have several packages and I did it this way but I don't know if it's okay https://github.com/abr4xas/Arch-pkgbuild/blob/master/%20django-admin-honeypot/PKGBUILD what I really did is pass what was in build () to package () but as I said, I don't know if it's okay ... Can you give me your comments and suggestions?
Thank you
Inside build () would go the compilation part of the program and in package () the part that generates the package.
To put a short example in build () would go ./configure, ./autogen.sh, cmake, make and in package () make install, etc.
Hey, thank you very much… I'm going to edit my packages 😀
Thanks for the information I will bookmark it for future reference.
Can someone explain what it is to me, I'm new, and I don't know if this helps me to install a .deb package but locally in manjaro, a game to be exact. Yes, it works?
I look for and they tell me to install the deb2targz package but I get an error when installing it from the terminal, and I don't know if it can be
The same happens to me; I need to install on Kademar which is based on Arch; a couple of packages that I only get in .deb
Can someone help me?
If what you mean is a failure in the deb2targz installation, I just finished installing it with the command yaourt -S deb2targz. Of course, in ArchLinux.
Very informative post. Thanks for sharing.
Good post. Thank you for sharing this useful information.
Thanks for this helpful post. It is going to help a lot.
hi, can you leave the script for the conversion and how to use it? It is that in parts it confuses a bit, I already have the deb that I want to convert and I know that it is possible because the google chrome of AUR is a deb but I don't know how to make "MAKEPKG SI" with another deb 🙁