source: README.CUSTOM@ 53f291f

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

Added missing Id tags.

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