CategoryElsewhere
RPM packages are a great way of packaging and distributing software, unfortunately some stand alone software is distributed as a zip or tar file to be installed that way. By converting these into an RPM you can use your package manager as a distribution and removal tool. For this example we will be creating an RPM for the Example Software.
- The first thing to do is install the RPM development tools, you should only require rpmbuild.
- Create a folder to be used as a RPM development area and then create a file called .rpmmacros in your home folder that contains the following line: %_topdir <your build folder>
- Set up your RPM build area by creating the following folders – BUILD BUILDROOT RPMS SOURCES SPECS SRPMS
- Get a copy of your tar.gz or zipped software and place it in the SOURCES directory.
- Now the key part of this is to create the .spec file as this describes the build and installation part of the RPM.
- Create a new file in the SPECS folder called example.spec, fill it out with the following information –
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
%define _prefix /usr/bin/example # Your desired installation folder for the software Name: example Version: 1.0 Release: 1%{?dist} Summary: Example software for creating examples Group: Applications/System URL: http://www.example.com BuildRoot: %{_tmppath}/%{name} BuildArch: x86_64 License: Redistributable, no modification permitted Source: http://example.com/example-1.tar.gz # The web location for the source file, not required but the Name and Version values must match the file name. %description %prep %setup -q %build %install install -d %{buildroot}%{_prefix} # Create a directory for installation tar cf - . | (cd %{buildroot}%{_prefix}; tar xfp -) # rpmbuild will extract the tar.gz file, we must then copy the files to our build area and preserve file structure. %clean rm -rf %{buildroot}%{_prefix} %files %defattr(-,user,usergroup,-) # Modify for your requirements %dir %{_prefix} %{_prefix}/* %doc %changelog |
- After your spec file is created run rpmbuild -bb ./SPECS/example.spec – fix any errors that are produced, most likely problems will come from getting the correct version/name and target architecture.
- Find your completed RPM in ./RPMS/<ARCH>
Done!
I am lucky enough to be a programmer who doesn’t have to spend his whole life in an office churning out software, sometimes if the software isn’t good enough we get to venture out to sea and apply some frontline support!
I’ve been on several trips and they have been a great experience, if extremely tiring. Here’s a selection of photos from my most recent trip to the cold north (it’s actually very nice).
Just spent a bit of time installing the latest Linux Mint (14.1) on VirtualBox and struggling to get the VirtualBox 3D acceleration to work correctly. This causes the window manager to fall back to software rendering (yuk); to see if your machine is currently using software rendering run inxi -G and check for Gallium 0.4 on llvmpipe (LLVM 0x300).
To get the full 3D acceleration from VirtualBox ensure that 3D acceleration has been enabled from the settings menu and a decent amount of video RAM is available, I have it running quite well with 56MB of RAM. Load up Linux Mint and install the VirtualBox additions from the devices menu. Ignore the warnings about it already being installed and carry on. Reboot the virtual box and run inxi -G again, it should now show something similar to this –
Graphics: Card: InnoTek Systemberatung VirtualBox Graphics Adapter
X.Org: 1.13.0 drivers: ati,vboxvideo (unloaded: fbdev,vesa) Resolution: 1920×1200@60.0hz
GLX Renderer: Chromium GLX Version: 2.1 Chromium 1.9
I only get this problem on a fresh install of Linux Mint. It’s supposed to be bundled with the VirtualBox guest additions but I guess they don’t always work as they should.
Today I learnt that it is programmer’s day, apparently we’re all supposed to get beer and pizza? I for one shall be celebrating by porting various tools from Linux to Solaris.
Just seen a fantastic video of a Landrover Defender 110 built entirely from lego; not just that but it has a full five speed sequential gear box, high and low range and a choice between two and four wheel drive (not entirely authentic that part)!
It’s really worth watching just to see the inner workings and fantastic little details such as moving pistons. Some more information can be found on Sheepo’s blog.
Also this seems like a pretty good excuse to post a picture of my full size version!
© 2024 Acodemics
Theme by Anders Norén — Up ↑
Recent Comments