source: README.CUSTOM@ e7655b2

2.3 2.3.x 2.4 ablfs ablfs-more legacy new_features trunk
Last change on this file since e7655b2 was e7655b2, checked in by George Boudreau <georgeb@…>, 18 years ago

Added the ability to create custom scripts that do not reference tarballs.. self contained bash scripts

  • Property mode set to 100644
File size: 5.3 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
14 LAYOUT
15 A new directory has been added to JHALFS tree which will contain the
16configuration scripts and a few examples. A switch has been added to the
17configuration file which enables/disables the inclusion of personal scripts.
18
19 custom
20 /config <-- where to put your scripts.
21 /examples <-- a few example scripts
22 template <-- ALL scripts MUST look like this
23
24
25
26 NOTE::: You are responsible for including all dependencies and ensuring they
27 are built in the proper order.
28
29 1. To add a package to the final JHALFS Makefile you must first create a file
30 in the custom/config directory.
31 **All config files MUST follow the naming convention, xxx-PKG, where xxx
32 is the order number and PKG is the name of the package. The file naming
33 format is important as it defines the build order. The example shown
34 below has an order number 950 and log files will list in alphabetical
35 order in the /logs directory after blfs-tools scripts.
36 The simplest method is to copy the template file into the config directory
37 and rename it.
38
39 2. Populate the variables with the necessary values.
40 Variable function is self explanitory except for the inclusion of the
41 build cmds. If the package you want to include is found in the BLFS
42 book then you only need to copy/paste the cmd strings between the xEOFx
43 pairs, otherwise you will need to define the build cmds yourself.
44 NOTE::: This script you just created is not usable directly but contains
45 all the information necessary for jhalfs to create a build script
46 and an entry in the jhalfs Makefile.
47
48 3. As mentioned previously the build order is dictated by the 3 digit number
49 in the file name. If a package has dependencies it must be numerically
50 larger than the dependency files.
51 ie. The package mc has glib as a dependency and build order is
52 950-glib
53 951-mc
54
55 4. A config file for BLFS-bootscripts is already created as 999-blfs_bootscripts.
56 If a package requires a bootscript to be installed add the cmd to this
57 file and NOT in the package script. The gpm script is included as an
58 example of multiple patch files and the need for a blfs bootscript.
59
60 RUNNING:::
61 Although your scripts are added to the generated makefile they are not
62 automatically built. You must tell the makefile to build the tools with
63 the cmd
64 make mk_CUSTOM_TOOLS
65
66 :::FINAL COMMENT:::
67 This feature was added so users could build the packages necessary to access
68 the internet and was not intended to replace the BLFS install system.
69
70
71#--------- GLIB example -----------
72
73 #
74 # Filename syntax xxx-PKG ie. 950-glibc
75 # Create a file in the custom/config directory
76 # Populate the file using the following script as an example
77 #
78
79PKG="glib"
80PKG_VERSION="1.2.10"
81PKG_FILE="glib-1.2.10.tar.gz"
82URL="http://gd.tuwien.ac.at/graphics/gimp/gtk/v1.2/${PKG_FILE}"
83MD5="6fe30dad87c77b91b632def29dd69ef9"
84
85 # Patches are named PATCH[1..10]
86 # This information is used to download the patch only
87 # If you do not have the MD5SUM the download will proceed with a warning.
88PATCH1="http://www.linuxfromscratch.org/patches/blfs/svn/glib-1.2.10-gcc34-1.patch 0077a1cce5e8a2231ac5a9b08c6263ba"
89
90
91 # NOTE::
92 # The convoluted scheme used to write out a temporary file is
93 # a work-around for embedded single and double quotes.
94
95( cat << "xEOFx"
96
97patch -Np1 -i ../glib-1.2.10-gcc34-1.patch &&
98./configure --prefix=/usr &&
99make
100make install &&
101chmod -v 755 /usr/lib/libgmodule-1.2.so.0.0.10
102
103xEOFx
104) > tmp
105
106
107#--------- GPM example -----------
108
109
110PKG="gpm"
111PKG_VERSION="1.20.1"
112PKG_FILE="gmp-1.20.1.tar.bz2"
113URL="ftp://arcana.linux.it/pub/gpm/gpm-1.20.1.tar.bz2"
114MD5="2c63e827d755527950d9d13fe3d87692"
115
116 # MD5SUM is not absolutely necessary but JHALFS whines and complains
117 # Add the MD5SUM if you can
118PATCH1=" http://www.linuxfromscratch.org/patches/blfs/svn/gpm-1.20.1-segfault-1.patch"
119PATCH2=" http://www.linuxfromscratch.org/patches/blfs/svn/gpm-1.20.1-silent-1.patch"
120
121
122( cat << "xEOFx"
123
124patch -Np1 -i ../gpm-1.20.1-segfault-1.patch &&
125patch -Np1 -i ../gpm-1.20.1-silent-1.patch &&
126./configure --prefix=/usr --sysconfdir=/etc &&
127LDFLAGS="-lm" make
128
129make install &&
130cp -v conf/gpm-root.conf /etc &&
131ldconfig
132
133# The normal cmd to install the boot script for gpm
134# --- PUT THIS CMD INSIDE 999-blfs_bootscripts
135#make install-gpm
136
137cat > /etc/sysconfig/mouse << "EOF"
138# Begin /etc/sysconfig/mouse
139
140MDEVICE="/dev/psaux"
141PROTOCOL="imps2"
142GPMOPTS=""
143
144# End /etc/sysconfig/mouse
145EOF
146
147xEOFx
148) > tmp
149
150
151#--------- CMDS ONLY example -----------
152 # This is an example of a self contained cmd script
153 # There are no referenced to a package or package dir.
154 # This method is useful for creating user files/profiles/etc
155 # at build time.
156
157
158PKG=""
159PKG_VERSION=""
160PKG_FILE=""
161URL=""
162MD5=""
163
164PATCH1=""
165
166
167( cat << "xEOFx"
168
169echo "JUST A USELESS TRACE"
170
171xEOFx
172) > tmp
173
Note: See TracBrowser for help on using the repository browser.