diff options
Diffstat (limited to 'rhtvision/redhat/README')
-rw-r--r-- | rhtvision/redhat/README | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/rhtvision/redhat/README b/rhtvision/redhat/README new file mode 100644 index 0000000..357ce11 --- /dev/null +++ b/rhtvision/redhat/README @@ -0,0 +1,79 @@ + This directory contains scripts and helpers used to create RPM packages. + The name "redhat" is because Red Hat created the RPM format. That's the +same reason why the directory to create the .deb files is called "debian" +even when a lot of small distros based on Debian are available. + + The librhtv.spec.in file is a template to create the real spec file. The +real file is created by the configuration script. If you need to do it +manually just look for names enclosed by @, like @version@ and replace them +by the proper values (currently only version needs it). The copy the file to +librhtv-@version@.spec (i.e. librhtv-2.0.2.spec). + + The spec file was contributed by Michel Catudal <bbcat@users.sf.net>. + I include this file to help people to create their own RPM files. This is +really important because a lot of important Linux distros uses it (Red Hat, +SuSE, Mandrake, etc.) and RPM packages generated for one of them doesn't have +to be useful for the other. + + Here is how to use the spec file: + +I. THE EASY WAY +=============== + + This procedure is really rigid and could be incorrect for your system. In +particular it assumes all will compile ok and nothing will fail. For this +reason I also explain it step by step in point (II). + + To create the RPM files just execute: + +$ redhat/create-rpms.sh + + Then look for the RPMs in ~/rpm/RPMS/i386/ + I'm looking for volunteers to make this script more flexible. + IMPORTANT! The script temporally changes your ~/.rpmacros file, please +back-up it if you have valuable information there. The script creates a +back-up and restores the original file but it could fail. + +II. STEP BY STEP +================ + +1) Choose a directory to create the files. If you are root you can use the +default directories for your system. If not I recommend using a directory +located in your home directory. I provide a small script that creates the +directories for you: create-dirs.sh + +$ redhat/create-dirs.sh + +Note: In the rest of the examples I assume you used your home directory. + +2) Configure rpmbuild to use the created directories: + +$ redhat/config-rpm.sh + +Note: You can skip it if you are root or you alredy configured rpmbuild. + +3) Create a tarball containing the sources: + +$ cd linux; ./compress --use-bzip2 --dir-version; cd .. +$ mv ../rhtvision-`cat version.txt`.src.tar.bz2 ~/rpm/SOURCES/librhtv-`cat version.txt`.tar.bz2 + +Note: ~/rpm/SOURCES should be replaced if you are not using your home +directory. + +4) Invoke rpmbuild to create the package: + +$ rpmbuild -bb redhat/librhtv-`cat version.txt`.spec + +Hopefuly you'll get the result in ~/rpm/RPMS/ +You just need to install them changing to `root' user. + +***************************************************************************** +Note 1: The specs doesn't allow building two RPM packages at the same time if +they use the same root directory. + +Note 2: If you want to use a directory different than ~/rpm you can use: +[bash syntax] + +$ mkdir /tmp/example +$ export SET_RPM_DIR=/tmp/example + |