source: README.CUSTOM@ fc6076c

2.3 2.3.x 2.4 ablfs ablfs-more legacy new_features trunk
Last change on this file since fc6076c was 7b6ecc5, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Started support to customize de base system build allowing Makefile regeneration.

  • Property mode set to 100644
File size: 6.4 KB
Line 
1#
2# $Id$
3#
4 HOW TO ADD CUSTOM SCRIPTS TO THE JHALFS MAKEFILE
5
6
7 Normally JHALFS creates a Makefile containing only those scripts found in
8the {B,C,H}LFS books. An automated construction tool cannot predict the
9needs of every individual and requests are made "Can you add xxxx package".
10Rather than adding numerous package scripts and switches for each request it
11was easier to add a tool for the user(s) to code their own package needs.
12
13 There is two areas that can be customized: how the base system is build
14and what additional configurations and packages requires your hardware to can
15boot and work with. Each one of this areas is handled in a diferent way.
16
17 BASE SYSTEM CUSTOMIZATION
18
19 There is two ways to alter how the base system will be built:
20
21 - Using a working copy of the book sources and editing the XML files.
22 This is the way used by book editors to test packages upgrades,
23 command changes, build order changes. etc.
24
25 This method requires you know very well the book sources and what
26 files need be edited. It will not be discussed here.
27
28 - Editing the generated build scripts to make any change you would.
29 This is the method discussed below.
30
31(TO BE WRITTEN)
32
33
34 ADDING POST-SYSTEM BUILD CONFIGURATION FILES AND EXTRA PACKAGES
35
36 The installation of BLFS packages is handled via blfs-tool and activated
37when you select the appropiate menu option. See README and README.BLFS for
38more info.
39
40 The feature descrbed below was added so users could install remaining
41configuration files, build the packages necessary to access the internet
42or to support specific hardware, or to install basic utilities that need
43have availables from the beginning, and was not intended to replace the BLFS
44install system.
45
46
47 LAYOUT
48 A new directory has been added to JHALFS tree which will contain the
49configuration scripts and a few examples. A switch has been added to the
50configuration file which enables/disables the inclusion of personal scripts.
51
52 custom
53 /config <-- where to put your scripts.
54 /examples <-- a few example scripts
55 template <-- ALL scripts MUST look like this
56
57
58
59 NOTE::: You are responsible for including all dependencies and ensuring they
60 are built in the proper order.
61
62 1. To add a package to the final JHALFS Makefile you must first create a file
63 in the custom/config directory.
64 **All config files MUST follow the naming convention, xxx-PKG, where xxx
65 is the order number and PKG is the name of the package. The file naming
66 format is important as it defines the build order. The example shown
67 below has an order number 950 and log files will list in alphabetical
68 order in the /logs directory after blfs-tools scripts.
69 The simplest method is to copy the template file into the config directory
70 and rename it.
71
72 2. Populate the variables with the necessary values.
73 Variable function is self explanitory except for the inclusion of the
74 build cmds. If the package you want to include is found in the BLFS
75 book then you only need to copy/paste the cmd strings between the xEOFx
76 pairs, otherwise you will need to define the build cmds yourself.
77 NOTE::: This script you just created is not usable directly but contains
78 all the information necessary for jhalfs to create a build script
79 and an entry in the jhalfs Makefile.
80
81 3. As mentioned previously the build order is dictated by the 3 digit number
82 in the file name. If a package has dependencies it must be numerically
83 larger than the dependency files.
84 ie. The package mc has glib as a dependency and build order is
85 950-glib
86 951-mc
87
88 4. A config file for BLFS-bootscripts is already created as 999-blfs_bootscripts.
89 If a package requires a bootscript to be installed add the cmd to this
90 file and NOT in the package script. The gpm script is included as an
91 example of multiple patch files and the need for a blfs bootscript.
92
93 RUNNING:::
94 Although your scripts are added to the generated makefile they are not
95 automatically built. You must tell the makefile to build the tools with
96 the cmd
97 make mk_CUSTOM_TOOLS
98
99
100#--------- GLIB example -----------
101
102 #
103 # Filename syntax xxx-PKG ie. 950-glibc
104 # Create a file in the custom/config directory
105 # Populate the file using the following script as an example
106 #
107
108PKG="glib"
109PKG_VERSION="1.2.10"
110PKG_FILE="glib-1.2.10.tar.gz"
111URL="http://gd.tuwien.ac.at/graphics/gimp/gtk/v1.2/${PKG_FILE}"
112MD5="6fe30dad87c77b91b632def29dd69ef9"
113
114 # Patches are named PATCH[1..10]
115 # This information is used to download the patch only
116 # If you do not have the MD5SUM the download will proceed with a warning.
117PATCH1="http://www.linuxfromscratch.org/patches/blfs/svn/glib-1.2.10-gcc34-1.patch 0077a1cce5e8a2231ac5a9b08c6263ba"
118
119
120 # NOTE::
121 # The convoluted scheme used to write out a temporary file is
122 # a work-around for embedded single and double quotes.
123
124( cat << "xEOFx"
125
126patch -Np1 -i ../glib-1.2.10-gcc34-1.patch &&
127./configure --prefix=/usr &&
128make
129make install &&
130chmod -v 755 /usr/lib/libgmodule-1.2.so.0.0.10
131
132xEOFx
133) > tmp
134
135
136#--------- GPM example -----------
137
138
139PKG="gpm"
140PKG_VERSION="1.20.1"
141PKG_FILE="gmp-1.20.1.tar.bz2"
142URL="ftp://arcana.linux.it/pub/gpm/gpm-1.20.1.tar.bz2"
143MD5="2c63e827d755527950d9d13fe3d87692"
144
145 # MD5SUM is not absolutely necessary but JHALFS whines and complains
146 # Add the MD5SUM if you can
147PATCH1=" http://www.linuxfromscratch.org/patches/blfs/svn/gpm-1.20.1-segfault-1.patch"
148PATCH2=" http://www.linuxfromscratch.org/patches/blfs/svn/gpm-1.20.1-silent-1.patch"
149
150
151( cat << "xEOFx"
152
153patch -Np1 -i ../gpm-1.20.1-segfault-1.patch &&
154patch -Np1 -i ../gpm-1.20.1-silent-1.patch &&
155./configure --prefix=/usr --sysconfdir=/etc &&
156LDFLAGS="-lm" make
157
158make install &&
159cp -v conf/gpm-root.conf /etc &&
160ldconfig
161
162# The normal cmd to install the boot script for gpm
163# --- PUT THIS CMD INSIDE 999-blfs_bootscripts
164#make install-gpm
165
166cat > /etc/sysconfig/mouse << "EOF"
167# Begin /etc/sysconfig/mouse
168
169MDEVICE="/dev/psaux"
170PROTOCOL="imps2"
171GPMOPTS=""
172
173# End /etc/sysconfig/mouse
174EOF
175
176xEOFx
177) > tmp
178
179
180#--------- CMDS ONLY example -----------
181 # This is an example of a self contained cmd script
182 # There are no referenced to a package or package dir.
183 # This method is useful for creating user files/profiles/etc
184 # at build time.
185
186
187PKG=""
188PKG_VERSION=""
189PKG_FILE=""
190URL=""
191MD5=""
192
193PATCH1=""
194
195
196( cat << "xEOFx"
197
198echo "JUST A USELESS TRACE"
199
200xEOFx
201) > tmp
202
Note: See TracBrowser for help on using the repository browser.