source: README.CUSTOM@ 9a536f7

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

Merged cunstomization code from experimental branch.
Let trunk to be broken for a while...

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