Porting rpm/deb package into archlinux enviroment
For some software there is only a precompiled package available (usually the case of commercial ones - for example in the my case this sw). But, the Archlinux is not as widely used distribution as the rpm/deb packaging system based distributions. This means that the package for the Archlinux is sometimes unavailable as it is in my case. Luckily, it's not so hard to get a successful port of the package. I've performed a case-example of this on the MestReNova NMR software.
This method should be avoided when the source code is available. You should have some really good motive to undergo this. Keep in mind that this is not the cleanest and the safest way how to make a SW package.
- bsdtar is capable of unpacking both the .rpm and the .deb packages, syntax is bsdtar -xf filename. It's also used by makepkg for unpacking source files.
Getting things working
- Package for fedora/RHEL requied selinux in this case - if you have it, maybe good for you. If you don't, than it's unneeded dependency.
- Dependencies sometimes show itself when binary is ran from console. This was case for almost all of dependencies.
- Sometimes running ldd on libraries provided by package helps (was case of one Qt5 library and libglu).
- If you're in dark, trying to look for package dependencies in original package could help, of course usually library in Archlinux is provided under different package compared to for example Debian.
- Don't forget to try the functionality, not only if the program gets started. In my case, the program worked until I wanted to zoom spectrum, than it segfaulted (problem was solved by the libglu library).
Getting things nice
- Make a clear archlinux installation.
- Try to get the package working under those conditions to identify all the crucial dependencies.
- It's good to read a few makepkg files and don't forget that there is also a wiki page and some man pages too.
- Make a copy of a similar makepkg recipe (just some which also goes from precompiled package) and fit it to your case.
- Usually some desktop inplementation can improve user experience (for example line 18 in this PKGBUILD )
- Clean up everything
- If you're satisfied don't forget how long it took you to get things working. When you upload your PKGBUILD to AUR, you can actually save someone this amount of time.