summaryrefslogtreecommitdiff
path: root/tvision/redhat/README
blob: 357ce119ec3d5a6975705dd85f038b903ee6b85b (plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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